@@ -430,8 +430,8 @@ objectValue, variableValues, path, subsequentPayloads, asyncRecord):
430
430
- Let {responseValue} be {ExecuteField(objectType, objectValue, fieldType,
431
431
fields, variableValues, path, subsequentPayloads, asyncRecord)}.
432
432
- Set {responseValue} as the value for {responseKey} in {resultMap}.
433
- - For each {deferredGroupFieldSet} and {label} in {deferredGroupedFieldsList}
434
- - Call {ExecuteDeferredFragment(label, objectType, objectValue,
433
+ - For each {deferredGroupFieldSet} in {deferredGroupedFieldsList}
434
+ - Call {ExecuteDeferredFragment(objectType, objectValue,
435
435
deferredGroupFieldSet, path, variableValues, asyncRecord,
436
436
subsequentPayloads)}
437
437
- Return {resultMap}.
@@ -695,13 +695,10 @@ deferredGroupedFieldsList):
695
695
with the next {selection} in {selectionSet}.
696
696
- Let {fragmentSelectionSet} be the top-level selection set of {fragment}.
697
697
- If {deferDirective} is defined:
698
- - Let {label} be the value or the variable to {deferDirective}'s {label}
699
- argument.
700
698
- Let {deferredGroupedFields} be the result of calling
701
699
{CollectFields(objectType, fragmentSelectionSet, variableValues,
702
700
visitedFragments, deferredGroupedFieldsList)}.
703
- - Append a record containing {label} and {deferredGroupedFields} to
704
- {deferredGroupedFieldsList}.
701
+ - Append {deferredGroupedFields} to {deferredGroupedFieldsList}.
705
702
- Continue with the next {selection} in {selectionSet}.
706
703
- Let {fragmentGroupedFieldSet} be the result of calling
707
704
{CollectFields(objectType, fragmentSelectionSet, variableValues,
@@ -725,13 +722,10 @@ deferredGroupedFieldsList):
725
722
- If this execution is for a subscription operation, raise a _ field
726
723
error_ .
727
724
- If {deferDirective} is defined:
728
- - Let {label} be the value or the variable to {deferDirective}'s {label}
729
- argument.
730
725
- Let {deferredGroupedFields} be the result of calling
731
726
{CollectFields(objectType, fragmentSelectionSet, variableValues,
732
727
visitedFragments, deferredGroupedFieldsList)}.
733
- - Append a record containing {label} and {deferredGroupedFields} to
734
- {deferredGroupedFieldsList}.
728
+ - Append {deferredGroupedFields} to {deferredGroupedFieldsList}.
735
729
- Continue with the next {selection} in {selectionSet}.
736
730
- Let {fragmentGroupedFieldSet} be the result of calling
737
731
{CollectFields(objectType, fragmentSelectionSet, variableValues,
@@ -764,7 +758,6 @@ DoesFragmentTypeApply(objectType, fragmentType):
764
758
An Async Payload Record is either a Deferred Fragment Record or a Stream Record.
765
759
All Async Payload Records are structures containing:
766
760
767
- - {label}: value derived from the corresponding ` @defer ` or ` @stream ` directive.
768
761
- {path}: a list of field names and indices from root to the location of the
769
762
corresponding ` @defer ` or ` @stream ` directive.
770
763
- {iterator}: The underlying iterator if created from a ` @stream ` directive.
@@ -776,10 +769,10 @@ All Async Payload Records are structures containing:
776
769
777
770
#### Execute Deferred Fragment
778
771
779
- ExecuteDeferredFragment(label, objectType, objectValue, groupedFieldSet, path,
772
+ ExecuteDeferredFragment(objectType, objectValue, groupedFieldSet, path,
780
773
variableValues, parentRecord, subsequentPayloads):
781
774
782
- - Let {deferRecord} be an async payload record created from {label} and { path}.
775
+ - Let {deferRecord} be an async payload record created from {path}.
783
776
- Initialize {errors} on {deferRecord} to an empty list.
784
777
- Let {dataExecution} be the asynchronous future value of:
785
778
- Let {payload} be an unordered map.
@@ -803,8 +796,6 @@ variableValues, parentRecord, subsequentPayloads):
803
796
- Add an entry to {payload} named ` data ` with the value {null}.
804
797
- Otherwise:
805
798
- Add an entry to {payload} named ` data ` with the value {resultMap}.
806
- - If {label} is defined:
807
- - Add an entry to {payload} named ` label ` with the value {label}.
808
799
- Add an entry to {payload} named ` path ` with the value {path}.
809
800
- Return {payload}.
810
801
- Set {dataExecution} on {deferredFragmentRecord}.
@@ -965,11 +956,11 @@ yielded items satisfies `initialCount` specified on the `@stream` directive.
965
956
966
957
#### Execute Stream Field
967
958
968
- ExecuteStreamField(label, iterator, index, fields, innerType, path,
969
- parentRecord, variableValues, subsequentPayloads):
959
+ ExecuteStreamField(iterator, index, fields, innerType, path, parentRecord ,
960
+ variableValues, subsequentPayloads):
970
961
971
- - Let {streamRecord} be an async payload record created from {label}, { path},
972
- and {iterator}.
962
+ - Let {streamRecord} be an async payload record created from {path}, and
963
+ {iterator}.
973
964
- Initialize {errors} on {streamRecord} to an empty list.
974
965
- Let {itemPath} be {path} with {index} appended.
975
966
- Let {dataExecution} be the asynchronous future value of:
@@ -987,7 +978,7 @@ parentRecord, variableValues, subsequentPayloads):
987
978
item, variableValues, itemPath, subsequentPayloads, parentRecord)}.
988
979
- Append any encountered field errors to {errors}.
989
980
- Increment {index}.
990
- - Call {ExecuteStreamField(label, iterator, index, fields, innerType, path,
981
+ - Call {ExecuteStreamField(iterator, index, fields, innerType, path,
991
982
streamRecord, variableValues, subsequentPayloads)}.
992
983
- If a field error was raised, causing a {null} to be propagated to {data},
993
984
and {innerType} is a Non-Nullable type:
@@ -997,8 +988,6 @@ parentRecord, variableValues, subsequentPayloads):
997
988
{data}.
998
989
- If {errors} is not empty:
999
990
- Add an entry to {payload} named ` errors ` with the value {errors}.
1000
- - If {label} is defined:
1001
- - Add an entry to {payload} named ` label ` with the value {label}.
1002
991
- Add an entry to {payload} named ` path ` with the value {itemPath}.
1003
992
- If {parentRecord} is defined:
1004
993
- Wait for the result of {dataExecution} on {parentRecord}.
@@ -1030,16 +1019,14 @@ subsequentPayloads, asyncRecord):
1030
1019
- Let {initialCount} be the value or variable provided to
1031
1020
{streamDirective}'s {initialCount} argument.
1032
1021
- If {initialCount} is less than zero, raise a _ field error_ .
1033
- - Let {label} be the value or variable provided to {streamDirective}'s
1034
- {label} argument.
1035
1022
- Let {iterator} be an iterator for {result}.
1036
1023
- Let {items} be an empty list.
1037
1024
- Let {index} be zero.
1038
1025
- While {result} is not closed:
1039
1026
- If {streamDirective} is defined and {index} is greater than or equal to
1040
1027
{initialCount}:
1041
- - Call {ExecuteStreamField(label, iterator, index, fields, innerType,
1042
- path, asyncRecord, subsequentPayloads)}.
1028
+ - Call {ExecuteStreamField(iterator, index, fields, innerType, path ,
1029
+ asyncRecord, subsequentPayloads)}.
1043
1030
- Return {items}.
1044
1031
- Otherwise:
1045
1032
- Wait for the next item from {result} via the {iterator}.
@@ -1179,10 +1166,10 @@ error:
1179
1166
``` graphql example
1180
1167
{
1181
1168
birthday {
1182
- ... @defer ( label : " monthDefer " ) {
1169
+ ... @defer {
1183
1170
month
1184
1171
}
1185
- ... @defer ( label : " yearDefer " ) {
1172
+ ... @defer {
1186
1173
year
1187
1174
}
1188
1175
}
@@ -1198,32 +1185,29 @@ Response 1, the initial response is sent:
1198
1185
}
1199
1186
```
1200
1187
1201
- Response 2, the defer payload for label "monthDefer" is sent. The {data} entry
1202
- has been set to {null}, as this {null} as propagated as high as the error
1203
- boundary will allow.
1188
+ Response 2, a defer payload is sent. The {data} entry has been set to {null}, as
1189
+ this {null} as propagated as high as the error boundary will allow.
1204
1190
1205
1191
``` json example
1206
1192
{
1207
1193
"incremental" : [
1208
1194
{
1209
1195
"path" : [" birthday" ],
1210
- "label" : " monthDefer" ,
1211
1196
"data" : null
1212
1197
}
1213
1198
],
1214
1199
"hasNext" : false
1215
1200
}
1216
1201
```
1217
1202
1218
- Response 3, the defer payload for label "yearDefer" is sent. The data in this
1219
- payload is unaffected by the previous null error.
1203
+ Response 3, another defer payload is sent. The data in this payload is
1204
+ unaffected by the previous null error.
1220
1205
1221
1206
``` json example
1222
1207
{
1223
1208
"incremental" : [
1224
1209
{
1225
1210
"path" : [" birthday" ],
1226
- "label" : " yearDefer" ,
1227
1211
"data" : { "year" : " 2022" }
1228
1212
}
1229
1213
],
0 commit comments