@@ -288,9 +288,8 @@ CreateSourceEventStream(subscription, schema, variableValues, initialValue):
288288 error_ .
289289- Let {fieldInfo} be the value of the first entry in {collectedFieldsMap}.
290290- 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.
294293- Let {argumentValues} be the result of {CoerceArgumentValues(subscriptionType,
295294 field, variableValues)}.
296295- Let {sourceStream} be the result of running
@@ -483,13 +482,14 @@ fragmentVariables):
483482 - Let {fragmentType} be the type condition on {fragment}.
484483 - If {DoesFragmentTypeApply(objectType, fragmentType)} is {false}, continue
485484 with the next {selection} in {selectionSet}.
486- - Let {variableDefinitions} be the variable definitions for {fragment}.
485+ - Let {variableDefinitions} be the variable definitions for {fragment}.
487486 - Initialize {signatures} to an empty list.
488487 - For each {variableDefinition} of {variableDefinitions}:
489488 - Append the result of {GetVariableSignature(variableDefinition)} to
490489 {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)}.
493493 - Let {newFragmentVariables} be an unordered map containing {signatures} and
494494 {values}.
495495 - Let {fragmentSelectionSet} be the top-level selection set of {fragment}.
@@ -578,7 +578,7 @@ CollectSubfields(objectType, fields, variableValues):
578578 - Let {fieldsForResponseName} be the _ field set_ value in
579579 {collectedFieldsMap} for the key {responseName}; otherwise create the
580580 entry with an empty ordered set.
581- - Add each fieldInfo from {subfields } to {fieldsForResponseName}.
581+ - Add each fieldInfo from {subfieldInfos } to {fieldsForResponseName}.
582582- Return {collectedFieldsMap}.
583583
584584Note: All the {fields} passed to {CollectSubfields()} share the same _ response
@@ -600,14 +600,15 @@ variableValues):
600600- For each {responseName} and {fieldInfos} in {collectedFieldsMap}:
601601 - Let {fieldInfo} be the first entry in {fieldInfos}.
602602 - 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}.
606607 - Let {fieldType} be the return type defined for the field {fieldName} of
607608 {objectType}.
608609 - If {fieldType} is defined:
609610 - Let {responseValue} be {ExecuteField(objectType, objectValue, fieldType,
610- fields , variableValues, fragmentVariableValues)}.
611+ fieldInfos , variableValues, fragmentVariableValues)}.
611612 - Set {responseValue} as the value for {responseName} in {resultMap}.
612613- Return {resultMap}.
613614
@@ -741,16 +742,20 @@ first coerces any provided argument values, then resolves a value for the field,
741742and finally completes that value either by recursively executing another
742743selection set or coercing a scalar value.
743744
744- ExecuteField(objectType, objectValue, fieldType, fieldDetailsList, variableValues,
745- fragmentVariables):
745+ ExecuteField(objectType, objectValue, fieldType, fieldDetailsList,
746+ variableValues, fragmentVariables):
746747
747748- 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}.
749751- 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)}.
754759
755760### Coercing Arguments
756761
@@ -776,6 +781,7 @@ fragmentVariableValues):
776781CoerceArgumentValues(node, argumentDefinitions, argumentValues, variableValues,
777782fragmentVariableValues):
778783
784+ - Let {coercedValues} be an empty unordered Map.
779785- For each {argumentDefinition} in {argumentDefinitions}:
780786 - Let {argumentName} be the name of {argumentDefinition}.
781787 - Let {argumentType} be the expected type of {argumentDefinition}.
@@ -792,7 +798,7 @@ fragmentVariableValues):
792798 for {variableName}; otherwise, let it be {variableValues}.
793799 - Let {hasValue} be {true} if {scopedVariableValues} provides a value for
794800 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
796802 {variableName}.
797803 - Otherwise, let {value} be {argumentValue}.
798804 - If {hasValue} is not {true} and {defaultValue} exists (including {null}):
@@ -873,8 +879,8 @@ CompleteValue(fieldType, fieldDetailsList, result, variableValues):
873879 - If {result} is not a collection of values, raise an _ execution error_ .
874880 - Let {innerType} be the inner type of {fieldType}.
875881 - 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}.
878884- If {fieldType} is a Scalar or Enum type:
879885 - Return the result of {CoerceResult(fieldType, result)}.
880886- If {fieldType} is an Object, Interface, or Union type:
0 commit comments