@@ -31,9 +31,10 @@ request is determined by the result of executing this operation according to the
31
31
32
32
ExecuteRequest(schema, document, operationName, variableValues, initialValue):
33
33
34
- - Let {operation} be the result of {GetOperation(document, operationName)}.
35
- - Let {coercedVariableValues} be the result of {CoerceVariableValues(schema,
36
- operation, variableValues)}.
34
+ - Let {operation} be the result of running {GetOperation(document,
35
+ operationName)}.
36
+ - Let {coercedVariableValues} be the result of running
37
+ {CoerceVariableValues(schema, operation, variableValues)}.
37
38
- If {operation} is a query operation:
38
39
- Return {ExecuteQuery(operation, schema, coercedVariableValues,
39
40
initialValue)}.
@@ -152,7 +153,8 @@ variableValues):
152
153
- Let {pending} be an empty list.
153
154
- If {initialDefers} is not an empty object:
154
155
- Let {id} be {nextId} and increment {nextId} by one.
155
- - Let {path} be {LongestCommonPathPrefix(initialDefers)}.
156
+ - Let {path} be the result of running
157
+ {LongestCommonPathPrefix(initialDefers)}.
156
158
- Let {pendingPayload} be an unordered map containing {id}, {path}.
157
159
- Add {pendingPayload} to {pending}.
158
160
- Let {defers} be {initialDefers}.
@@ -217,7 +219,7 @@ variableValues):
217
219
- Let {fields} be a list of all the values of the {field} key in the
218
220
entries of {fieldDetails}.
219
221
- Let {selectionSet} be a new selection set consisting of {fields}.
220
- - Let {data}, {childDefers} and {childStreams} be
222
+ - Let {data}, {childDefers} and {childStreams} be the result of running
221
223
{ExecuteSelectionSet(selectionSet, objectType, objectValue,
222
224
variableValues, path)}.
223
225
- Let {childErrors} be the list of all _ field error_ raised while
@@ -233,7 +235,8 @@ variableValues):
233
235
{incrementalPayload} to {incremental}.
234
236
- If {batchDefers} is not an empty object:
235
237
- Let {id} be {nextId} and increment {nextId} by one.
236
- - Let {path} be {LongestCommonPathPrefix(batchDefers)}.
238
+ - Let {path} be the result of running
239
+ {LongestCommonPathPrefix(batchDefers)}.
237
240
- Let {pendingPayload} be an unordered map containing {id}, {path}.
238
241
- Add {pendingPayload} to {pending}.
239
242
- Let {defers} be {batchDefers}.
@@ -270,7 +273,7 @@ variableValues):
270
273
- Let {index} be the result of adding {initialCount} to
271
274
{remainingValueIndex}.
272
275
- Let {path} be a copy of {parentPath} with {index} appended.
273
- - Let {value}, {childDefers} and {childStreams} be the result of calling
276
+ - Let {value}, {childDefers} and {childStreams} be the result of running
274
277
{CompleteValue(itemType, fields, remainingValue, variableValues, path)}.
275
278
- Let {childErrors} be the list of all _ field error_ raised while
276
279
completing the value.
@@ -279,7 +282,8 @@ variableValues):
279
282
- Append {incrementalPayload} to {incremental}.
280
283
- If {childDefers} is not an empty object:
281
284
- Let {id} be {nextId} and increment {nextId} by one.
282
- - Let {path} be {LongestCommonPathPrefix(childDefers)}.
285
+ - Let {path} be the result of running
286
+ {LongestCommonPathPrefix(childDefers)}.
283
287
- Let {pendingPayload} be an unordered map containing {id}, {path}.
284
288
- Add {pendingPayload} to {pending}.
285
289
- Let {defers} be {childDefers}.
@@ -445,16 +449,16 @@ CreateSourceEventStream(subscription, schema, variableValues, initialValue):
445
449
- Let {subscriptionType} be the root Subscription type in {schema}.
446
450
- Assert: {subscriptionType} is an Object type.
447
451
- Let {selectionSet} be the top level Selection Set in {subscription}.
448
- - Let {groupedFieldSet} be the result of {CollectFields(subscriptionType,
449
- selectionSet, variableValues)}.
452
+ - Let {groupedFieldSet} be the result of running
453
+ {CollectFields(subscriptionType, selectionSet, variableValues)}.
450
454
- If {groupedFieldSet} does not have exactly one entry, raise a _ request error_ .
451
455
- Let {fieldDetails} be the value of the first entry in {groupedFieldSet}.
452
456
- Let {fieldDetail} be the first entry in {fieldDetails}.
453
457
- Let {field} be the value for the key {field} in {fieldDetail}.
454
458
- Let {fieldName} be the name of {field}. Note: This value is unaffected if an
455
459
alias is used.
456
- - Let {argumentValues} be the result of {CoerceArgumentValues(subscriptionType,
457
- field, variableValues)}
460
+ - Let {argumentValues} be the result of running
461
+ {CoerceArgumentValues(subscriptionType, field, variableValues)}
458
462
- Let {fieldStream} be the result of running
459
463
{ResolveFieldEventStream(subscriptionType, initialValue, fieldName,
460
464
argumentValues)}.
@@ -536,7 +540,7 @@ ExecuteSelectionSet(selectionSet, objectType, objectValue, variableValues,
536
540
parentPath):
537
541
538
542
- If {parentPath} is not provided, initialize it to an empty list.
539
- - Let {groupedFieldSet} be the result of {CollectFields(objectType,
543
+ - Let {groupedFieldSet} be the result of running {CollectFields(objectType,
540
544
selectionSet, variableValues, parentPath)}.
541
545
- Initialize {resultMap} to an empty ordered map.
542
546
- Let {defers} be an empty unordered map.
@@ -556,8 +560,8 @@ parentPath):
556
560
- Otherwise:
557
561
- Let {fields} be a list of all the values of the {field} key in the
558
562
entries of {fieldDetails}.
559
- - Let {resolvedValue} be {ExecuteField(objectType, objectValue, fieldType ,
560
- fields, variableValues, path)}.
563
+ - Let {resolvedValue} be the result of running {ExecuteField(objectType,
564
+ objectValue, fieldType, fields, variableValues, path)}.
561
565
- Let {nullableFieldType} be the inner type of {fieldType} if {fieldType}
562
566
is a non-nullable type, otherwise let {nullableFieldType} be
563
567
{fieldType}.
@@ -578,7 +582,7 @@ parentPath):
578
582
- Let {initialValues} be the first {initialCount} entries in
579
583
{resolvedValue}, and {remainingValues} be the remainder.
580
584
- Let {initialResponseValue}, {childDefers}, {childStreams} be the
581
- result of calling {CompleteValue(nullableFieldType, fields,
585
+ result of running {CompleteValue(nullableFieldType, fields,
582
586
initialValues, variableValues, path)}.
583
587
- Add the entries of {childDefers} into {defers}. Note: {childDefers}
584
588
and {defers} will never have keys in common.
@@ -592,8 +596,8 @@ parentPath):
592
596
- Append {streamDetails} to {streams}.
593
597
- Otherwise:
594
598
- Let {responseValue}, {childDefers} and {childStreams} be the result of
595
- {CompleteValue(fieldType, fields, resolvedValue, variableValues ,
596
- path)}.
599
+ running {CompleteValue(fieldType, fields, resolvedValue,
600
+ variableValues, path)}.
597
601
- Add the entries of {childDefers} into {defers}. Note: {childDefers}
598
602
and {defers} will never have keys in common.
599
603
- For each entry {stream} in {childStreams}, append {stream} to
@@ -790,7 +794,7 @@ visitedFragments, parentPath):
790
794
in {variableValues} with the value {false}:
791
795
- Let {fragmentIsDeferred} be {true}.
792
796
- Let {fragmentSelectionSet} be the top-level selection set of {fragment}.
793
- - Let {fragmentGroupedFieldSet} be the result of calling
797
+ - Let {fragmentGroupedFieldSet} be the result of running
794
798
{CollectFields(objectType, fragmentSelectionSet, variableValues,
795
799
fragmentIsDeferred, visitedFragments, parentPath)}.
796
800
- For each {fragmentGroup} in {fragmentGroupedFieldSet}:
@@ -811,7 +815,7 @@ visitedFragments, parentPath):
811
815
in {variableValues} with the value {false}:
812
816
- Let {fragmentIsDeferred} be {true}.
813
817
- Let {fragmentSelectionSet} be the top-level selection set of {selection}.
814
- - Let {fragmentGroupedFieldSet} be the result of calling
818
+ - Let {fragmentGroupedFieldSet} be the result of running
815
819
{CollectFields(objectType, fragmentSelectionSet, variableValues,
816
820
fragmentIsDeferred, visitedFragments, parentPath)}.
817
821
- For each {fragmentGroup} in {fragmentGroupedFieldSet}:
@@ -849,10 +853,10 @@ ExecuteField(objectType, objectValue, fieldType, fields, variableValues, path):
849
853
850
854
- Let {field} be the first entry in {fields}.
851
855
- Let {fieldName} be the field name of {field}.
852
- - Let {argumentValues} be the result of {CoerceArgumentValues(objectType, field,
853
- variableValues)}
854
- - Let {resolvedValue} be {ResolveFieldValue(objectType, objectValue, fieldName ,
855
- argumentValues)}.
856
+ - Let {argumentValues} be the result of running
857
+ {CoerceArgumentValues(objectType, field, variableValues)}
858
+ - Let {resolvedValue} be the result of running {ResolveFieldValue(objectType,
859
+ objectValue, fieldName, argumentValues)}.
856
860
- Return {resolvedValue}.
857
861
858
862
### Coercing Field Arguments
@@ -944,7 +948,7 @@ CompleteValue(fieldType, fields, result, variableValues, path):
944
948
945
949
- If the {fieldType} is a Non-Null type:
946
950
- Let {innerType} be the inner type of {fieldType}.
947
- - Let {completedResult}, {defers} and {streams} be the result of calling
951
+ - Let {completedResult}, {defers} and {streams} be the result of running
948
952
{CompleteValue(innerType, fields, result, variableValues, path)}.
949
953
- If {completedResult} is {null}, raise a _ field error_ .
950
954
- Return {completedResult}, {defers} and {streams}.
@@ -963,25 +967,27 @@ CompleteValue(fieldType, fields, result, variableValues, path):
963
967
- For each entry {resultItem} at zero-based index {resultIndex} in {result}:
964
968
- Let {listItemPath} be a copy of {path} with {resultIndex} appended.
965
969
- Let {completedItemResult}, {childDefers} and {childStreams} be the result
966
- of calling {CompleteValue(innerType, fields, resultItem, variableValues,
970
+ of running {CompleteValue(innerType, fields, resultItem, variableValues,
967
971
listItemPath)}.
968
972
- Add the entries of {childDefers} into {defers}. Note: {childDefers} and
969
973
{defers} will never have keys in common.
970
974
- For each entry {stream} in {childStreams}, append {stream} to {streams}.
971
975
- Append {completedItemResult} to {completedResult}.
972
976
- Return {completedResult}, {defers} and {streams}.
973
977
- If {fieldType} is a Scalar or Enum type:
974
- - Let {completedResult} be the result of {CoerceResult(fieldType, result)}.
978
+ - Let {completedResult} be the result of running {CoerceResult(fieldType,
979
+ result)}.
975
980
- Let {defers} be an empty unordered map.
976
981
- Let {streams} be an empty list.
977
982
- Return {completedResult}, {defers} and {streams}.
978
983
- If {fieldType} is an Object, Interface, or Union type:
979
984
- If {fieldType} is an Object type.
980
985
- Let {objectType} be {fieldType}.
981
986
- Otherwise if {fieldType} is an Interface or Union type.
982
- - Let {objectType} be {ResolveAbstractType(fieldType, result)}.
983
- - Let {subSelectionSet} be the result of calling {MergeSelectionSets(fields)}.
984
- - Let {completedResult}, {defers} and {streams} be the result of evaluating
987
+ - Let {objectType} be the result of running {ResolveAbstractType(fieldType,
988
+ result)}.
989
+ - Let {subSelectionSet} be the result of running {MergeSelectionSets(fields)}.
990
+ - Let {completedResult}, {defers} and {streams} be the result of running
985
991
{ExecuteSelectionSet(subSelectionSet, objectType, result, variableValues,
986
992
path)} _ normally_ (allowing for parallelization).
987
993
- Return {completedResult}, {defers} and {streams}.
0 commit comments