graphql / graphql/graphql-spec
@defer + errors / nullability
- Dominant language
- JavaScript
- Stars
- 14.6k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
Hey, thanks for the great talk about "experiements in GraphQL," so many good ideas there!
I'm exploring `@defer` and I have a couple clarifying questions about error handling.
Let's say you have a non-null field on an object which returns null (bad). The spec says the error should "propagate," making the parent object null:
> However, if the type of that field is of a Non-Null type, since the field cannot be null the error is propagated to be dealt with by the parent field.
([Error Handling](http://facebook.github.io/graphql/#sec-Error-handling))
So,
1. In that case, should we cancel all deferred fields whose parents were cancelled?
2. If a non-null field was deferred, but returns null, should we patch the parent object to be null? Or simply _not issue_ a patch for that illegally-null field?
Contributor guide
Assessment
This issue has not been assessed yet.