Skip to content

Commit a301f21

Browse files
committed
improve non-null example
1 parent a938f44 commit a301f21

File tree

1 file changed

+24
-3
lines changed

1 file changed

+24
-3
lines changed

spec/Section 6 -- Execution.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,9 +1156,12 @@ error:
11561156
```graphql example
11571157
{
11581158
birthday {
1159-
... @defer {
1159+
... @defer(label: "monthDefer") {
11601160
month
11611161
}
1162+
... @defer(label: "yearDefer") {
1163+
year
1164+
}
11621165
}
11631166
}
11641167
```
@@ -1172,21 +1175,39 @@ Response 1, the initial response is sent:
11721175
}
11731176
```
11741177

1175-
Response 2, the defer payload is sent. The {data} entry has been set to {null},
1176-
as this {null} as propagated as high as the error boundary will allow.
1178+
Response 2, the defer payload for label "monthDefer" is sent. The {data} entry
1179+
has been set to {null}, as this {null} as propagated as high as the error
1180+
boundary will allow.
11771181

11781182
```json example
11791183
{
11801184
"incremental": [
11811185
{
11821186
"path": ["birthday"],
1187+
"label": "monthDefer",
11831188
"data": null
11841189
}
11851190
],
11861191
"hasNext": false
11871192
}
11881193
```
11891194

1195+
Response 3, the defer payload for label "yearDefer" is sent. The data in this
1196+
payload is unaffected by the previous null error.
1197+
1198+
```json example
1199+
{
1200+
"incremental": [
1201+
{
1202+
"path": ["birthday"],
1203+
"label": "yearDefer",
1204+
"data": { "year": "2022" }
1205+
}
1206+
],
1207+
"hasNext": false
1208+
}
1209+
```
1210+
11901211
If the `stream` directive is present on a list field with a Non-Nullable inner
11911212
type, and a field error has caused a {null} to propagate to the list item, the
11921213
{null} should not propagate any further, and the associated Stream Payload's

0 commit comments

Comments
 (0)