Skip to content

Commit

Permalink
label is optional
Browse files Browse the repository at this point in the history
  • Loading branch information
robrichard committed Jul 2, 2020
1 parent 528509e commit 1806812
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions spec/Section 3 -- Type System.md
Original file line number Diff line number Diff line change
Expand Up @@ -1929,7 +1929,7 @@ type ExampleType {

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

### @stream
```graphql
directive @stream(label: String!, initialCount: Int!, if: Boolean) on FIELD
directive @stream(label: String, initialCount: Int!, if: Boolean) on FIELD
```
The `@stream` directive may be provided for a field of `List` type so that the
backend can leverage technology such as asynchronous iterators to provide a partial
Expand Down
3 changes: 2 additions & 1 deletion spec/Section 7 -- Response.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,8 @@ If the response of the GraphQL operation is an event stream, subsequent values
may contain a string field `label`. This `label` is the same label passed to
the `@defer` or `@stream` directive that triggered this value. This allows
clients to identify which `@defer` or `@stream` directive is associated with
this value.
this value. `label` will not be present if the corresponding `@defer` or
`@stream` directive is not passed a `label` argument.

## Serialization Format

Expand Down

0 comments on commit 1806812

Please sign in to comment.