@@ -2185,9 +2185,9 @@ directive @defer(
2185
2185
2186
2186
The `@defer ` directive may be provided on a fragment spread or inline fragment
2187
2187
to indicate that execution of the related selection set should be deferred . When
2188
- a request includes the `@defer ` directive , the result may consist of multiple
2189
- responses : the initial response containing all non -deferred data , while
2190
- subsequent responses include deferred data .
2188
+ a request includes the `@defer ` directive , it may return an _incremental stream_
2189
+ consisting of an _intitial response_ containing all non -deferred data , followed
2190
+ by one or more _subsequent payloads_ including the deferred data .
2191
2191
2192
2192
The `@include ` and `@skip ` directives take precedence over `@defer `.
2193
2193
@@ -2212,11 +2212,11 @@ fragment someFragment on User {
2212
2212
related note below). When `false `, fragment must not be deferred . Defaults to
2213
2213
`true ` when omitted .
2214
2214
- `label : String ` - An optional string literal (variables are disallowed) used
2215
- by GraphQL clients to identify data from responses and associate it with the
2216
- corresponding defer directive . If provided , the GraphQL service must include
2217
- this label in the corresponding pending object within the response . The
2218
- `label ` argument must be unique across all `@defer ` and ` @stream ` directives
2219
- in the document .
2215
+ by GraphQL clients to identify data in the _incremental stream_ and associate
2216
+ it with the corresponding defer directive . If provided , the GraphQL service
2217
+ must include this label in the corresponding pending object within the
2218
+ _incremental stream_ . The `label ` argument must be unique across all `@defer `
2219
+ and ` @stream ` directives in the document .
2220
2220
2221
2221
### @stream
2222
2222
@@ -2230,7 +2230,7 @@ directive @stream(
2230
2230
2231
2231
The `@stream ` directive may be provided for a field whose type incorporates a
2232
2232
`List ` type modifier . The directive enables returning a partial list initially ,
2233
- followed by additional items in subsequent responses . Should the field type
2233
+ followed by additional items in subsequent payloads . Should the field type
2234
2234
incorporate multiple `List ` type modifiers , only the outermost list is streamed .
2235
2235
2236
2236
Note : The mechanism through which items are streamed is implementation -defined
@@ -2262,26 +2262,26 @@ query myQuery($shouldStream: Boolean! = true) {
2262
2262
is not present —it must not be streamed and all of the list items must be
2263
2263
included . Defaults to `true ` when omitted .
2264
2264
- `label : String ` - An optional string literal (variables are disallowed) used
2265
- by GraphQL clients to identify data from responses and associate it with the
2266
- corresponding stream directive . If provided , the GraphQL service must include
2267
- this label in the corresponding pending object within the response . The
2268
- `label ` argument must be unique across all `@defer ` and ` @stream ` directives
2269
- in the document .
2265
+ by GraphQL clients to identify data in the _incremental stream_ and associate
2266
+ it with the corresponding stream directive . If provided , the GraphQL service
2267
+ must include this label in the corresponding pending object within the
2268
+ _incremental stream_ . The `label ` argument must be unique across all `@defer `
2269
+ and ` @stream ` directives in the document .
2270
2270
2271
2271
Note : The
2272
2272
[Defer And Stream Directive Labels Are Unique ](#sec-Defer-And-Stream-Directive-Labels-Are-Unique)
2273
2273
validation rule ensures uniqueness of the values passed to `label` on both the
2274
2274
`@defer` and `@stream` directives. Variables are disallowed in the `label`
2275
2275
because their values may not be known during validation.
2276
2276
2277
- Note : The ability to defer and /or stream parts of a response can have a
2278
- potentially significant impact on application performance . Developers generally
2279
- need clear , predictable control over their application's performance. It is
2280
- highly recommended that GraphQL services honor the `@defer` and `@stream`
2281
- directives on each execution. However, the specification allows advanced use
2282
- cases where the service can determine that it is more performant to not defer
2283
- and/or stream. Therefore, GraphQL clients _must_ be able to process a response
2277
+ Note : The ability to defer and /or stream data can have a potentially significant
2278
+ impact on application performance . Developers generally need clear , predictable
2279
+ control over their application's performance. It is highly recommended that
2280
+ GraphQL services honor the `@defer` and `@stream` directives on each execution.
2281
+ However, the specification allows advanced use cases where the service can
2282
+ determine that it is more performant to not defer and/or stream. Therefore,
2283
+ GraphQL clients _must_ be able to process a _response_ or _incremental stream_
2284
2284
that ignores individual `@defer` and/or `@stream` directives. This also applies
2285
2285
to the `initialCount` argument on the `@stream` directive. Clients must be able
2286
- to process a streamed response that contains more initial list items than what
2287
- was specified in the `initialCount` argument.
2286
+ to process a streamed field result that contains more initial list items than
2287
+ what was specified in the `initialCount` argument.
0 commit comments