Skip to content

Commit eb3a4e3

Browse files
committed
Clarification on labels
1 parent d8c28d1 commit eb3a4e3

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
@@ -2160,10 +2160,11 @@ fragment someFragment on User {
21602160
- `if: Boolean` - When `true`, fragment _should_ be deferred. When `false`,
21612161
fragment will not be deferred and data will be included in the initial
21622162
response. If omitted, defaults to `true`.
2163-
- `label: String` - A unique label across all `@defer` and `@stream` directives
2164-
in an operation. This label should be used by GraphQL clients to identify the
2165-
data from patch responses and associate it with the correct fragments. If
2166-
provided, the GraphQL Server must add it to the payload.
2163+
- `label: String` - May be used by GraphQL clients to identify the data from
2164+
responses and associate it with the corresponding defer directive. If
2165+
provided, the GraphQL Server must add it to the corresponding payload. `label`
2166+
must be unique label across all `@defer` and `@stream` directives in a
2167+
document. `label` must not be provided as a variable.
21672168

21682169
### @stream
21692170

@@ -2191,10 +2192,12 @@ query myQuery($shouldStream: Boolean) {
21912192
- `if: Boolean` - When `true`, field _should_ be streamed. When `false`, the
21922193
field will not be streamed and all list items will be included in the initial
21932194
response. If omitted, defaults to `true`.
2194-
- `label: String` - A unique label across all `@defer` and `@stream` directives
2195-
in an operation. This label should be used by GraphQL clients to identify the
2196-
data from patch responses and associate it with the correct fragments. If
2197-
provided, the GraphQL Server must add it to the payload.
2195+
- `label: String` - May be used by GraphQL clients to identify the data from
2196+
responses and associate it with the corresponding stream directive. If
2197+
provided, the GraphQL Server must add it to the corresponding payload. `label`
2198+
must be unique label across all `@defer` and `@stream` directives in a
2199+
document. `label` must not be provided as a variable.
2200+
21982201
- `initialCount: Int` - The number of list items the server should return as
21992202
part of the initial response. If omitted, defaults to `0`. A field error will
22002203
be raised if the value of this argument is less than `0`.

0 commit comments

Comments
 (0)