-
Notifications
You must be signed in to change notification settings - Fork 160
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
Unsure how to troubleshoot "Missing __typename in selection for the <something> interface" error #218
Comments
Thanks for using the library and your report, it's an ergonomics problem indeed. For code generation to work, you need to query for the In your case I will keep this issue open because we should improve the error message, and suggest where to add |
Looks like that was exactly what I needed: colindean/ledger-getquote-blocktap@5bb8eee Thank you! |
FWIW I came across the same issue. Changing query RepoUrl($id: ID!) {
node(id: $id) {
... on Repository {
url
}
}
} to query RepoUrl($id: ID!) {
node(id: $id) {
__typename
... on Repository {
url
}
}
} did the trick. Perhaps a more detailed error message would help out here. |
I'm pretty inexperienced with GraphQL, but it is frustrating having a working query like query GetIssueOrPr($repo:String!, $owner:String!, $number:Int!) {
repository(name:$repo, owner:$owner) {
issueOrPullRequest(number: $number) {
... on Issue {
title
url
id
number
body
repository { id name archivedAt owner{ login }}
projectsV2(first:100) { nodes { id }
}
}
... on PullRequest {
title
url
id
number
body
repository { id name archivedAt owner{ login }}
projectsV2(first:100) { nodes { id }
}
}
}
}
} and the error message just saying that |
I'm trying out this library and GraphQL for the first time. My usage of graphql-rust is here and the schema is here.
or using the CLI tool
I don't really understand what's missing or how to figure it out. If it's something missing from the JSON schema, some kind of path to the expected but missing property would really expedite this.
The text was updated successfully, but these errors were encountered: