Skip to content

Commit 4938517

Browse files
robrichardyaacovCR
authored andcommitted
improve non-null example
1 parent 1cebffb commit 4938517

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
@@ -1155,9 +1155,12 @@ error:
11551155
```graphql example
11561156
{
11571157
birthday {
1158-
... @defer {
1158+
... @defer(label: "monthDefer") {
11591159
month
11601160
}
1161+
... @defer(label: "yearDefer") {
1162+
year
1163+
}
11611164
}
11621165
}
11631166
```
@@ -1171,21 +1174,39 @@ Response 1, the initial response is sent:
11711174
}
11721175
```
11731176

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

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

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

0 commit comments

Comments
 (0)