-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add definition of "selection set" and clarify serial execution examples #1032
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
Conversation
✅ Deploy Preview for graphql-spec-draft ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
:: A _selection set_ defines an ordered set of selections (fields, fragment | ||
spreads and inline fragments) against an object, union or interface type. |
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.
🆕 Definition of selection set.
spec/Section 6 -- Execution.md
Outdated
For example, given the following mutation operation, the root _selection set_ | ||
must be executed serially: | ||
|
||
```graphql example | ||
{ | ||
mutation { |
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.
🆕 Clarification
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.
define variable
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.
Perhaps we add the mutation example, and keep the selection set example?
|
||
```graphql example | ||
# Note: This is a selection set, not a full document using the query shorthand. |
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.
🆕 Note added
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.
This seems like a positive editorial change
@Keweiqu I've addressed your feedback, I think? Very good catch! 🙌 |
|
||
```graphql example | ||
{ | ||
mutation ChangeBirthdayAndAddress($newBirthday: String!, $newAddress: String!) { |
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.
good catch
Examples 193 and 194 relate to executing selection sets serially. There has been confusion from readers that think that these examples relate to documents (i.e. they should have the
mutation
keyword) but that is not necessarily the case, for example in future we might enable operations such as:To solve this:
I've also fixed the consistency of the casing of 'selection set'.