Skip to content

Commit 1806812

Browse files
committed
label is optional
1 parent 528509e commit 1806812

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

spec/Section 3 -- Type System.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1929,7 +1929,7 @@ type ExampleType {
19291929

19301930
### @defer
19311931
```graphql
1932-
directive @defer(label: String!, if: Boolean) on FRAGMENT_SPREAD | INLINE_FRAGMENT
1932+
directive @defer(label: String, if: Boolean) on FRAGMENT_SPREAD | INLINE_FRAGMENT
19331933
```
19341934
The `@defer` directive may be provided for fragment spreads and inline fragments to
19351935
inform the executor to delay the execution of the current fragment to indicate
@@ -1955,7 +1955,7 @@ fragment someFragment on User {
19551955

19561956
### @stream
19571957
```graphql
1958-
directive @stream(label: String!, initialCount: Int!, if: Boolean) on FIELD
1958+
directive @stream(label: String, initialCount: Int!, if: Boolean) on FIELD
19591959
```
19601960
The `@stream` directive may be provided for a field of `List` type so that the
19611961
backend can leverage technology such as asynchronous iterators to provide a partial

spec/Section 7 -- Response.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,8 @@ If the response of the GraphQL operation is an event stream, subsequent values
258258
may contain a string field `label`. This `label` is the same label passed to
259259
the `@defer` or `@stream` directive that triggered this value. This allows
260260
clients to identify which `@defer` or `@stream` directive is associated with
261-
this value.
261+
this value. `label` will not be present if the corresponding `@defer` or
262+
`@stream` directive is not passed a `label` argument.
262263

263264
## Serialization Format
264265

0 commit comments

Comments
 (0)