Skip to content

Commit fcf898f

Browse files
committed
PR feedback
1 parent 0310656 commit fcf898f

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

spec/Section 3 -- Type System.md

+14-9
Original file line numberDiff line numberDiff line change
@@ -1943,11 +1943,6 @@ by a validator, executor, or client tool such as a code generator.
19431943

19441944
GraphQL implementations should provide the `@skip` and `@include` directives.
19451945

1946-
GraphQL implementations are not required to implement the `@defer` and `@stream`
1947-
directives. If either or both of these directives are implemented, they must be
1948-
implemented according to this specification. GraphQL implementations that do not
1949-
support these directives must not make them available via introspection.
1950-
19511946
GraphQL implementations that support the type system definition language must
19521947
provide the `@deprecated` directive if representing deprecated portions of the
19531948
schema.
@@ -2171,6 +2166,14 @@ scalar UUID @specifiedBy(url: "https://tools.ietf.org/html/rfc4122")
21712166

21722167
### @defer
21732168

2169+
GraphQL implementations are not required to implement the `@defer` and `@stream`
2170+
directives. If either or both of these directives are implemented, they must be
2171+
implemented according to this specification. GraphQL implementations that do not
2172+
support these directives must not make them available via introspection. The
2173+
[Directives Are Defined](#sec-Directives-Are-Defined) validation rule will
2174+
prevent GraphQL Operations containing the `@defer` or `@stream` directive from
2175+
being executed by a GraphQL service that does not implement these directives.
2176+
21742177
```graphql
21752178
directive @defer(
21762179
label: String
@@ -2182,9 +2185,8 @@ The `@defer` directive may be provided for fragment spreads and inline fragments
21822185
to inform the executor to delay the execution of the current fragment to
21832186
indicate deprioritization of the current fragment. A query with `@defer`
21842187
directive will cause the request to potentially return multiple responses, where
2185-
non-deferred data is delivered in the initial response and data deferred is
2186-
delivered in a subsequent response. `@include` and `@skip` take precedence over
2187-
`@defer`.
2188+
deferred data is delivered in subsequent responses. `@include` and `@skip` take
2189+
precedence over `@defer`.
21882190

21892191
```graphql example
21902192
query myQuery($shouldDefer: Boolean) {
@@ -2226,7 +2228,10 @@ directive @stream(
22262228
The `@stream` directive may be provided for a field of `List` type so that the
22272229
backend can leverage technology such as asynchronous iterators to provide a
22282230
partial list in the initial response, and additional list items in subsequent
2229-
responses. `@include` and `@skip` take precedence over `@stream`.
2231+
responses. `@include` and `@skip` take precedence over `@stream`. The
2232+
[Stream Directives Are Used On List Fields](#sec-Stream-Directives-Are-Used-On-List-Fields)
2233+
validation rule is used to prevent the `@stream` directive from being applied to
2234+
a field that is not a `List` type.
22302235

22312236
```graphql example
22322237
query myQuery($shouldStream: Boolean) {

0 commit comments

Comments
 (0)