-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Editorial: move "Path" to it's own section #1129
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for graphql-spec-draft ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some suggested modifications:
@benjie thanks for the feedback! I have applied your suggestions. |
f9c4359
to
2087016
Compare
the path to the error must use the aliased name, since it represents a path in | ||
the response, not in the request. | ||
`null` result is intentional or caused by a runtime error. The value of this | ||
entry is described in the [Path](#sec-Path) section. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
entry is described in the [Path](#sec-Path) section. | |
_path entry_ is described in the [Path](#sec-Path) section. |
:: A _path entry_ allows for the association with a particular field reached | ||
during GraphQL execution. The value for this entry must be a list of path | ||
segments starting at the root of the response and ending with the field to be | ||
associated with. Path segments that represent fields must be strings, and path | ||
segments that represent list indices must be 0-indexed integers. If a path | ||
segment is associated with an aliased field it must use the aliased name, since | ||
it represents a path in the response, not in the request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:: A _path entry_ allows for the association with a particular field reached | |
during GraphQL execution. The value for this entry must be a list of path | |
segments starting at the root of the response and ending with the field to be | |
associated with. Path segments that represent fields must be strings, and path | |
segments that represent list indices must be 0-indexed integers. If a path | |
segment is associated with an aliased field it must use the aliased name, since | |
it represents a path in the response, not in the request. | |
:: A _path entry_ is an entry within an _error result_ that allows for | |
association with a particular field reached during GraphQL execution. | |
The value for a _path entry_ must be a list of path segments starting at the | |
root of the response and ending with the field to be associated with. Path | |
segments that represent fields must be strings, and path segments that represent | |
list indices must be 0-indexed integers. If a path segment is associated with an | |
aliased field it must use the aliased name, since it represents a path in the | |
response, not in the request. |
I tried to make this independent of error but I was just not happy with how it read. When you integrate this into the stream/defer work, you can change just the definition, e.g. something like:
:: A _path entry_ is an entry within a _request error_ or _incremental payload_
that allows for association with a particular field reached during GraphQL
execution.
When the _path entry_ is present on an "Error result", it identifies the | ||
response field which experienced the error. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the _path entry_ is present on an "Error result", it identifies the | |
response field which experienced the error. | |
When the _path entry_ is present on an _error result_, it identifies the | |
response field which experienced the error. |
This references a definition that doesn't yet exist, but that's okay... We can create it later.
Extracted from the
@defer
/@stream
spec edits (#1110) to minimize the diff there.Since the incremental delivery response format also uses
Path
, I removed it from the Errors section and into it's own section.