-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Nasty misleading bug: Cannot return null for non-nullable field #2877
Comments
We're also seeing this issue. It seems to happen when we dont try/catch something in an async resolver function that then throws. |
So, yeah, this is definitely a |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This bug report should include:
So, TDLR. GraphQLError:
Cannot return null for non-nullable field
is thrown with a field reference that is not the correct nulled field.In my case, I spent hours and hours debugging
GraphQLError: Cannot return null for non-nullable field Social__User.id.
. And the id was there! Turns out, I returned a null value on another non nullable field on that type and either graphql or apollo indicates the wrong frigging field on the error message!Apollo client: 2.6.2
Apollo server express 2.6.2
graphql 14.3.1
graphql-tools 4.0.4
The text was updated successfully, but these errors were encountered: