Skip to content

Commit 1ad7e9c

Browse files
committed
if: Boolean! = true
1 parent d84939e commit 1ad7e9c

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

spec/Section 3 -- Type System.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2128,7 +2128,7 @@ scalar UUID @specifiedBy(url: "https://tools.ietf.org/html/rfc4122")
21282128
```graphql
21292129
directive @defer(
21302130
label: String
2131-
if: Boolean
2131+
if: Boolean! = true
21322132
) on FRAGMENT_SPREAD | INLINE_FRAGMENT
21332133
```
21342134

@@ -2157,9 +2157,9 @@ fragment someFragment on User {
21572157

21582158
#### @defer Arguments
21592159

2160-
- `if: Boolean` - When `true`, fragment _should_ be deferred. When `false`,
2161-
fragment will not be deferred and data will be included in the initial
2162-
response. If omitted, defaults to `true`.
2160+
- `if: Boolean! = true` - When `true`, fragment _should_ be deferred. When
2161+
`false`, fragment will not be deferred and data will be included in the
2162+
initial response. If omitted, defaults to `true`.
21632163
- `label: String` - May be used by GraphQL clients to identify the data from
21642164
responses and associate it with the corresponding defer directive. If
21652165
provided, the GraphQL Server must add it to the corresponding payload. `label`
@@ -2169,7 +2169,11 @@ fragment someFragment on User {
21692169
### @stream
21702170

21712171
```graphql
2172-
directive @stream(label: String, initialCount: Int = 0, if: Boolean) on FIELD
2172+
directive @stream(
2173+
label: String
2174+
if: Boolean! = true
2175+
initialCount: Int = 0
2176+
) on FIELD
21732177
```
21742178

21752179
The `@stream` directive may be provided for a field of `List` type so that the
@@ -2189,15 +2193,14 @@ query myQuery($shouldStream: Boolean) {
21892193

21902194
#### @stream Arguments
21912195

2192-
- `if: Boolean` - When `true`, field _should_ be streamed. When `false`, the
2193-
field will not be streamed and all list items will be included in the initial
2194-
response. If omitted, defaults to `true`.
2196+
- `if: Boolean! = true` - When `true`, field _should_ be streamed. When `false`,
2197+
the field will not be streamed and all list items will be included in the
2198+
initial response. If omitted, defaults to `true`.
21952199
- `label: String` - May be used by GraphQL clients to identify the data from
21962200
responses and associate it with the corresponding stream directive. If
21972201
provided, the GraphQL Server must add it to the corresponding payload. `label`
21982202
must be unique label across all `@defer` and `@stream` directives in a
21992203
document. `label` must not be provided as a variable.
2200-
22012204
- `initialCount: Int` - The number of list items the server should return as
22022205
part of the initial response. If omitted, defaults to `0`. A field error will
22032206
be raised if the value of this argument is less than `0`.

0 commit comments

Comments
 (0)