Skip to content

Commit 3d379b5

Browse files
robrichardyaacovCR
authored andcommitted
Clarification on labels
1 parent 7d15d19 commit 3d379b5

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

spec/Section 3 -- Type System.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2206,10 +2206,11 @@ fragment someFragment on User {
22062206
- `if: Boolean` - When `true`, fragment _should_ be deferred. When `false`,
22072207
fragment will not be deferred and data will be included in the initial
22082208
response. If omitted, defaults to `true`.
2209-
- `label: String` - A unique label across all `@defer` and `@stream` directives
2210-
in an operation. This label should be used by GraphQL clients to identify the
2211-
data from patch responses and associate it with the correct fragments. If
2212-
provided, the GraphQL Server must add it to the payload.
2209+
- `label: String` - May be used by GraphQL clients to identify the data from
2210+
responses and associate it with the corresponding defer directive. If
2211+
provided, the GraphQL Server must add it to the corresponding payload. `label`
2212+
must be unique label across all `@defer` and `@stream` directives in a
2213+
document. `label` must not be provided as a variable.
22132214

22142215
### @stream
22152216

@@ -2237,10 +2238,12 @@ query myQuery($shouldStream: Boolean) {
22372238
- `if: Boolean` - When `true`, field _should_ be streamed. When `false`, the
22382239
field will not be streamed and all list items will be included in the initial
22392240
response. If omitted, defaults to `true`.
2240-
- `label: String` - A unique label across all `@defer` and `@stream` directives
2241-
in an operation. This label should be used by GraphQL clients to identify the
2242-
data from patch responses and associate it with the correct fragments. If
2243-
provided, the GraphQL Server must add it to the payload.
2241+
- `label: String` - May be used by GraphQL clients to identify the data from
2242+
responses and associate it with the corresponding stream directive. If
2243+
provided, the GraphQL Server must add it to the corresponding payload. `label`
2244+
must be unique label across all `@defer` and `@stream` directives in a
2245+
document. `label` must not be provided as a variable.
2246+
22442247
- `initialCount: Int` - The number of list items the server should return as
22452248
part of the initial response. If omitted, defaults to `0`. A field error will
22462249
be raised if the value of this argument is less than `0`.

0 commit comments

Comments
 (0)