@@ -288,9 +288,8 @@ CreateSourceEventStream(subscription, schema, variableValues, initialValue):
288
288
error_ .
289
289
- Let {fieldInfo} be the value of the first entry in {collectedFieldsMap}.
290
290
- Let {field} be the value of the {field} property in {fieldInfo}.
291
- - Let {fieldName} be the name of the first entry in {fields}' {field} property. Note: This value
292
- is unaffected if an alias is used.
293
- - Let {field} be the first entry in {fields}.
291
+ - Let {fieldName} be the name of {field}. Note: This value is unaffected if an
292
+ alias is used.
294
293
- Let {argumentValues} be the result of {CoerceArgumentValues(subscriptionType,
295
294
field, variableValues)}.
296
295
- Let {sourceStream} be the result of running
@@ -483,13 +482,14 @@ fragmentVariables):
483
482
- Let {fragmentType} be the type condition on {fragment}.
484
483
- If {DoesFragmentTypeApply(objectType, fragmentType)} is {false}, continue
485
484
with the next {selection} in {selectionSet}.
486
- - Let {variableDefinitions} be the variable definitions for {fragment}.
485
+ - Let {variableDefinitions} be the variable definitions for {fragment}.
487
486
- Initialize {signatures} to an empty list.
488
487
- For each {variableDefinition} of {variableDefinitions}:
489
488
- Append the result of {GetVariableSignature(variableDefinition)} to
490
489
{signatures}.
491
- - Let {values} be the result of {CoerceArgumentValues(fragment,
492
- argumentDefinitions, variableValues, fragmentVariables)}.
490
+ - Let {argumentValues} be the arguments provided in {selection}.
491
+ - Let {values} be the result of {CoerceArgumentValues(selection,
492
+ variableDefinitions, argumentValues, variableValues, fragmentVariables)}.
493
493
- Let {newFragmentVariables} be an unordered map containing {signatures} and
494
494
{values}.
495
495
- Let {fragmentSelectionSet} be the top-level selection set of {fragment}.
@@ -578,7 +578,7 @@ CollectSubfields(objectType, fields, variableValues):
578
578
- Let {fieldsForResponseName} be the _ field set_ value in
579
579
{collectedFieldsMap} for the key {responseName}; otherwise create the
580
580
entry with an empty ordered set.
581
- - Add each fieldInfo from {subfields } to {fieldsForResponseName}.
581
+ - Add each fieldInfo from {subfieldInfos } to {fieldsForResponseName}.
582
582
- Return {collectedFieldsMap}.
583
583
584
584
Note: All the {fields} passed to {CollectSubfields()} share the same _ response
@@ -600,14 +600,15 @@ variableValues):
600
600
- For each {responseName} and {fieldInfos} in {collectedFieldsMap}:
601
601
- Let {fieldInfo} be the first entry in {fieldInfos}.
602
602
- Let {field} be the field property of {fieldInfo}.
603
- - Let {fieldName} be the name of the first entry in {fields}. Note: This value
604
- is unaffected if an alias is used.
605
- - Let {fragmentVariableValues} be the fragmentVariables property of {fieldInfo}.
603
+ - Let {fieldName} be the name of {field}. Note: This value is unaffected if an
604
+ alias is used.
605
+ - Let {fragmentVariableValues} be the fragmentVariables property of
606
+ {fieldInfo}.
606
607
- Let {fieldType} be the return type defined for the field {fieldName} of
607
608
{objectType}.
608
609
- If {fieldType} is defined:
609
610
- Let {responseValue} be {ExecuteField(objectType, objectValue, fieldType,
610
- fields , variableValues, fragmentVariableValues)}.
611
+ fieldInfos , variableValues, fragmentVariableValues)}.
611
612
- Set {responseValue} as the value for {responseName} in {resultMap}.
612
613
- Return {resultMap}.
613
614
@@ -741,16 +742,20 @@ first coerces any provided argument values, then resolves a value for the field,
741
742
and finally completes that value either by recursively executing another
742
743
selection set or coercing a scalar value.
743
744
744
- ExecuteField(objectType, objectValue, fieldType, fieldDetailsList, variableValues,
745
- fragmentVariables):
745
+ ExecuteField(objectType, objectValue, fieldType, fieldDetailsList,
746
+ variableValues, fragmentVariables):
746
747
747
748
- Let {fieldDetails} be the first entry in {fieldDetailsList}.
748
- - Let {field} and {fragmentVariables} be the corresponding entries on {fieldDetails}.
749
+ - Let {field} and {fragmentVariables} be the corresponding entries on
750
+ {fieldDetails}.
749
751
- Let {fieldName} be the field name of {field}.
750
- - Let {argumentDefinitions} be the arguments defined by {objectType} for the field named {fieldName}.
751
- - Let {argumentValues} be the result of {CoerceArgumentValues(field, argumentDefinitions, variableValues, fragmentVariables)}.
752
- - Let {resolvedValue} be {ResolveFieldValue(objectType, objectValue, fieldName, argumentValues)}.
753
- Return the result of {CompleteValue(fieldType, fieldDetailsList, resolvedValue, variableValues)}.
752
+ - Let {argumentDefinitions} be the arguments defined by {objectType} for the
753
+ field named {fieldName}.
754
+ - Let {argumentValues} be the result of {CoerceArgumentValues(field,
755
+ argumentDefinitions, variableValues, fragmentVariables)}.
756
+ - Let {resolvedValue} be {ResolveFieldValue(objectType, objectValue, fieldName,
757
+ argumentValues)}. Return the result of {CompleteValue(fieldType,
758
+ fieldDetailsList, resolvedValue, variableValues)}.
754
759
755
760
### Coercing Arguments
756
761
@@ -776,6 +781,7 @@ fragmentVariableValues):
776
781
CoerceArgumentValues(node, argumentDefinitions, argumentValues, variableValues,
777
782
fragmentVariableValues):
778
783
784
+ - Let {coercedValues} be an empty unordered Map.
779
785
- For each {argumentDefinition} in {argumentDefinitions}:
780
786
- Let {argumentName} be the name of {argumentDefinition}.
781
787
- Let {argumentType} be the expected type of {argumentDefinition}.
@@ -792,7 +798,7 @@ fragmentVariableValues):
792
798
for {variableName}; otherwise, let it be {variableValues}.
793
799
- Let {hasValue} be {true} if {scopedVariableValues} provides a value for
794
800
the name {variableName}.
795
- - Let {value} be the value provided in {variableValues } for the name
801
+ - Let {value} be the value provided in {scopedVariableValues } for the name
796
802
{variableName}.
797
803
- Otherwise, let {value} be {argumentValue}.
798
804
- If {hasValue} is not {true} and {defaultValue} exists (including {null}):
@@ -873,8 +879,8 @@ CompleteValue(fieldType, fieldDetailsList, result, variableValues):
873
879
- If {result} is not a collection of values, raise an _ execution error_ .
874
880
- Let {innerType} be the inner type of {fieldType}.
875
881
- Return a list where each list item is the result of calling
876
- {CompleteValue(innerType, fieldDetailsList, resultItem, variableValues)}, where
877
- {resultItem} is each item in {result}.
882
+ {CompleteValue(innerType, fieldDetailsList, resultItem, variableValues)},
883
+ where {resultItem} is each item in {result}.
878
884
- If {fieldType} is a Scalar or Enum type:
879
885
- Return the result of {CoerceResult(fieldType, result)}.
880
886
- If {fieldType} is an Object, Interface, or Union type:
0 commit comments