Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apollo query using "... on MyNode" returns undefined. #1531

Closed
krailler opened this issue Apr 3, 2017 · 2 comments
Closed

Apollo query using "... on MyNode" returns undefined. #1531

krailler opened this issue Apr 3, 2017 · 2 comments

Comments

@krailler
Copy link

krailler commented Apr 3, 2017

Intended outcome:
{ data: { ... }, ... }

Actual outcome:
{ data: undefined, ... }

How to reproduce the issue:
If "... on UserNode" is set, client.query(...) returns { data: undefined, ... }
Example of query:

query ($id: ID!) {
  tournament(id: $id) {
    id
    matches {
      edges {
        node {
          id
          player {
            displayName
            ... on UserNode {
              nick
            }
          }
        }
      }
    }
  }
}
@helfer
Copy link
Contributor

helfer commented Apr 4, 2017

Thanks @krailler! Could you perhaps provide a small reproduction using react-apollo-error-template?

@krailler
Copy link
Author

krailler commented Apr 4, 2017

@helfer I solve this using custom IntrospectionFragmentMatcher , see: #1363 (comment), why do I have to use this to work?

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants