-
Notifications
You must be signed in to change notification settings - Fork 30
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
Bug: GraphQL spec does not mandate that "data" is always returned #240
Comments
What is expected behavior if |
|
Oh, you are right! Then I don't know what else could we do here. |
I think ideally raising |
This codebase assumes that the
data
key must always be present in the result. This is not the case according to the GraphQL spec: https://spec.graphql.org/October2021/#sec-Response-Format. If a query couldn't be executed (e.g., due to failing authentication on some servers), it will not include adata
field -- onlyerrors
.Consequently, this library doesn't handle that and will instead raise
GraphQlClientInvalidResponseError
.The text was updated successfully, but these errors were encountered: