Fix "response position" definition; clarify sibling errors on propagation#1183
Open
Fix "response position" definition; clarify sibling errors on propagation#1183
Conversation
✅ Deploy Preview for graphql-spec-draft ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
599b654 to
a3092d9
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
a3092d9 to
fc70008
Compare
e199ebb to
4d6f01b
Compare
Member
Author
|
Plan from today's WG:
|
Contributor
|
graphql/graphql-js#4458 not sure if this is the implementation you want to test, I thought it’s the implementation for: #1184 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The intention of response position is that it includes things that were elided by error propagation; e.g. if you query
{ a { b } }andbis non-null and throws, the result will be{a: null}but the error will have path["a", "b"]indicating thea.bresponse position even though that position does not actually exist in the response.(Also:
ExecuteSelectionSet()doesn't exist any more.)Commit 1: clarify definition of response position to include these omitted values.
But the response position mentioned at the beginning of this paragraph is different to the response position from which the error originated; therefore "only one error should be added to the errors list per response position" is kind of moot. Actually what we mean here is that the response path of the error (i.e. the "path" entry in the error object) should be unique.
Commit 2: clarify it's the "path" of the error that matters, not the position that re-raised it
The use of the term "response position" is confusing, because that position might not actually exist in the response if it was omitted due to error propagation.
Commit 3: rename
response positiontoexecution positionthroughout.All of this together clarifies what happens when an error occurs to a nullable sibling of a non-nullable field that triggers error propagation.