Skip to content

Commit 90b31ae

Browse files
committed
defer/stream response => payload
1 parent 3944d05 commit 90b31ae

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

spec/Section 7 -- Response.md

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ validation error, this entry must not be present.
2424

2525
When the response of the GraphQL operation is an event stream, the first value
2626
will be the initial response. All subsequent values may contain an `incremental`
27-
entry, containing a list of Defer or Stream responses.
27+
entry, containing a list of Defer or Stream payloads.
2828

29-
The `label` and `path` entries on Defer and Stream responses are used by clients
29+
The `label` and `path` entries on Defer and Stream payloads are used by clients
3030
to identify the `@defer` or `@stream` directive from the GraphQL operation that
3131
triggered this response to be included in an `incremental` entry on a value
3232
returned by the event stream. When a label is provided, the combination of these
33-
two entries will be unique across all Defer and Stream responses returned in the
33+
two entries will be unique across all Defer and Stream payloads returned in the
3434
event stream.
3535

3636
If the response of the GraphQL operation is an event stream, each response map
@@ -49,7 +49,7 @@ set, must have a map as its value. This entry is reserved for implementors to
4949
extend the protocol however they see fit, and hence there are no additional
5050
restrictions on its contents. When the response of the GraphQL operation is an
5151
event stream, implementors may send subsequent payloads containing only
52-
`hasNext` and `extensions` entries. Defer and Stream responses may also contain
52+
`hasNext` and `extensions` entries. Defer and Stream payloads may also contain
5353
an entry with the key `extensions`, also reserved for implementors to extend the
5454
protocol however they see fit.
5555

@@ -267,38 +267,38 @@ discouraged.
267267
### Incremental
268268

269269
The `incremental` entry in the response is a non-empty list of Defer or Stream
270-
responses. If the response of the GraphQL operation is an event stream, this
270+
payloads. If the response of the GraphQL operation is an event stream, this
271271
field may appear on both the initial and subsequent values.
272272

273-
#### Stream response
273+
#### Stream payload
274274

275-
A stream response is a map that may appear as an item in the `incremental` entry
276-
of a response. A stream response is the result of an associated `@stream`
277-
directive in the operation. A stream response must contain `items` and `path`
275+
A stream payload is a map that may appear as an item in the `incremental` entry
276+
of a response. A stream payload is the result of an associated `@stream`
277+
directive in the operation. A stream payload must contain `items` and `path`
278278
entries and may contain `label`, `errors`, and `extensions` entries.
279279

280280
##### Items
281281

282-
The `items` entry in a stream response is a list of results from the execution
283-
of the associated @stream directive. This output will be a list of the same type
284-
of the field with the associated `@stream` directive. If `items` is set to
285-
`null`, it indicates that an error has caused a `null` to bubble up to a field
286-
higher than the list field with the associated `@stream` directive.
282+
The `items` entry in a stream payload is a list of results from the execution of
283+
the associated @stream directive. This output will be a list of the same type of
284+
the field with the associated `@stream` directive. If `items` is set to `null`,
285+
it indicates that an error has caused a `null` to bubble up to a field higher
286+
than the list field with the associated `@stream` directive.
287287

288-
#### Defer response
288+
#### Defer payload
289289

290-
A defer response is a map that may appear as an item in the `incremental` entry
291-
of a response. A defer response is the result of an associated `@defer`
292-
directive in the operation. A defer response must contain `data` and `path`
293-
entries and may contain `label`, `errors`, and `extensions` entries.
290+
A defer payload is a map that may appear as an item in the `incremental` entry
291+
of a response. A defer payload is the result of an associated `@defer` directive
292+
in the operation. A defer payload must contain `data` and `path` entries and may
293+
contain `label`, `errors`, and `extensions` entries.
294294

295295
##### Data
296296

297-
The `data` entry in a Defer response will be of the type of a particular field
298-
in the GraphQL result. The adjacent `path` field will contain the path segments
299-
of the field this data is associated with. If `data` is set to `null`, it
300-
indicates that an error has caused a `null` to bubble up to a field higher than
301-
the field that contains the fragment with the associated `@defer` directive.
297+
The `data` entry in a Defer payload will be of the type of a particular field in
298+
the GraphQL result. The adjacent `path` field will contain the path segments of
299+
the field this data is associated with. If `data` is set to `null`, it indicates
300+
that an error has caused a `null` to bubble up to a field higher than the field
301+
that contains the fragment with the associated `@defer` directive.
302302

303303
#### Path
304304

@@ -310,7 +310,7 @@ indices should be 0-indexed integers. If the path is associated to an aliased
310310
field, the path should use the aliased name, since it represents a path in the
311311
response, not in the request.
312312

313-
When the `path` field is present on a Stream response, it indicates that the
313+
When the `path` field is present on a Stream payload, it indicates that the
314314
`items` field represents the partial result of the list field containing the
315315
corresponding `@stream` directive. All but the non-final path segments must
316316
refer to the location of the list field containing the corresponding `@stream`
@@ -319,7 +319,7 @@ integer indicates that this result is set at a range, where the beginning of the
319319
range is at the index of this integer, and the length of the range is the length
320320
of the data.
321321

322-
When the `path` field is present on a Defer response, it indicates that the
322+
When the `path` field is present on a Defer payload, it indicates that the
323323
`data` field represents the result of the fragment containing the corresponding
324324
`@defer` directive. The path segments must point to the location of the result
325325
of the field containing the associated `@defer` directive.
@@ -329,7 +329,7 @@ field which experienced the error.
329329

330330
#### Label
331331

332-
Stream and Defer responses may contain a string field `label`. This `label` is
332+
Stream and Defer payloads may contain a string field `label`. This `label` is
333333
the same label passed to the `@defer` or `@stream` directive associated with the
334334
response. This allows clients to identify which `@defer` or `@stream` directive
335335
is associated with this value. `label` will not be present if the corresponding

0 commit comments

Comments
 (0)