Spec edits for incremental delivery, Validation#1223
Open
robrichard wants to merge 2 commits intoincremental-integrationfrom
Open
Spec edits for incremental delivery, Validation#1223robrichard wants to merge 2 commits intoincremental-integrationfrom
robrichard wants to merge 2 commits intoincremental-integrationfrom
Conversation
yaacovCR
approved these changes
Apr 13, 2026
Co-authored-by: Yaacov Rydzinski <yaacovCR@gmail.com>
benjie
reviewed
Apr 16, 2026
Comment on lines
+1711
to
+1719
| ** Formal Specification ** | ||
|
|
||
| - For every {directive} in a document. | ||
| - Let {directiveName} be the name of {directive}. | ||
| - Let {mutationType} be the root Mutation type in {schema}. | ||
| - Let {subscriptionType} be the root Subscription type in {schema}. | ||
| - If {directiveName} is "defer" or "stream": | ||
| - The parent type of {directive} must not be {mutationType} or | ||
| {subscriptionType}. |
Member
There was a problem hiding this comment.
Let's split this up into a @stream and @defer rule:
Suggested change
| ** Formal Specification ** | |
| - For every {directive} in a document. | |
| - Let {directiveName} be the name of {directive}. | |
| - Let {mutationType} be the root Mutation type in {schema}. | |
| - Let {subscriptionType} be the root Subscription type in {schema}. | |
| - If {directiveName} is "defer" or "stream": | |
| - The parent type of {directive} must not be {mutationType} or | |
| {subscriptionType}. | |
| **Formal Specification** | |
| - For each `@stream` {directive} in the document: | |
| - Let {field} be the field to which the directive is applied. | |
| - The parent type of {field} must not be the {`mutation`} _root | |
| operation type_ or the {`subscription`} _root operation type_. |
For defer it's on fragments so it's a little different. I'm not a big fan of this suggested edit, it's inspired by https://spec.graphql.org/draft/#sec-Fragment-Spread-Type-Existence but I feel like maybe we should branch on inline fragment vs named fragment spread.
- For each `@defer` {directive} in the document:
- Let {fragmentType} be the target type of the fragment spread to which {directive} is applied.
- {fragmentType} must not be the {`mutation`} _root
operation type_ or the {`subscription`} _root operation type_.
Comment on lines
+1723
to
+1724
| The defer and stream directives are not allowed to be used on root fields of the | ||
| mutation or subscription type. |
Member
There was a problem hiding this comment.
Suggested change
| The defer and stream directives are not allowed to be used on root fields of the | |
| mutation or subscription type. | |
| The `@defer` and `@stream` directives are not allowed to be used on root fields of the | |
| mutation or subscription type. |
|
|
||
| ### Defer And Stream Directives Are Used On Valid Operations | ||
|
|
||
| ** Formal Specification ** |
Member
There was a problem hiding this comment.
Suggested change
| ** Formal Specification ** | |
| **Formal Specification** |
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.
Extracted from the full PR (#1110) and targeting an integration branch to aid in review.
Helpful reference material: