Skip to content

Commit 176172f

Browse files
committed
Address PR feedback
1 parent 65d0abe commit 176172f

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

spec/Section 3 -- Type System.md

+23-23
Original file line numberDiff line numberDiff line change
@@ -2185,9 +2185,9 @@ directive @defer(
21852185

21862186
The `@defer` directive may be provided on a fragment spread or inline fragment
21872187
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.
21912191

21922192
The `@include` and `@skip` directives take precedence over `@defer`.
21932193

@@ -2212,11 +2212,11 @@ fragment someFragment on User {
22122212
related note below). When `false`, fragment must not be deferred. Defaults to
22132213
`true` when omitted.
22142214
- `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.
22202220

22212221
### @stream
22222222

@@ -2230,7 +2230,7 @@ directive @stream(
22302230

22312231
The `@stream` directive may be provided for a field whose type incorporates a
22322232
`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
22342234
incorporate multiple `List` type modifiers, only the outermost list is streamed.
22352235

22362236
Note: The mechanism through which items are streamed is implementation-defined
@@ -2262,26 +2262,26 @@ query myQuery($shouldStream: Boolean! = true) {
22622262
is not presentit must not be streamed and all of the list items must be
22632263
included. Defaults to `true` when omitted.
22642264
- `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.
22702270

22712271
Note: The
22722272
[Defer And Stream Directive Labels Are Unique](#sec-Defer-And-Stream-Directive-Labels-Are-Unique)
22732273
validation rule ensures uniqueness of the values passed to `label` on both the
22742274
`@defer` and `@stream` directives. Variables are disallowed in the `label`
22752275
because their values may not be known during validation.
22762276

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_
22842284
that ignores individual `@defer` and/or `@stream` directives. This also applies
22852285
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

Comments
 (0)