-
-
Notifications
You must be signed in to change notification settings - Fork 827
Incorrect error handling behavior #1719
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
Comments
Can you create a minimal reproduction? Thanks! |
Is this possible related to #1047 |
It's likely related, I'll create a minimal reproduction tomorrow. Thanks! |
Unable to repro in an isolated environment. It's possible that some of the deep dependency in production app is using an older version of graphql-tools. Closing this until I have more information. Thank you Edit: Update |
Context:
Here's what the schema looks like in this scenario:
We were running into a bug where ANY error in
Viewer.institutions
resolver would ALWAYS throw out aError: Cannot return null for non-nullable field User.id
for the GQL request which makes absolutely no sense at all.Investigation:
Upon some rigorous digging, here's what happens:
Apollo executes the GraphQL schema -> GraphQL resolves
viewer
(with a wrappedresolveFn
coming from this package). The wrapper callsdelegateRequest
, the result trace so far is correct.Then we get to this part,
transformer.transformResult
convertsinto
This is not what the caller expects, so tries to resolve
id
from{institution: Error}
. I think this is incorrect behavior. I'm not familiar enough with internals to suggest a proper fix excepthandleNull
needs to handle this.The text was updated successfully, but these errors were encountered: