@@ -340,7 +340,8 @@ ExecuteSelectionSet(selectionSet, objectType, objectValue, variableValues):
340340- For each {groupedFieldSet} as {responseKey} and {fields}:
341341 - Let {fieldName} be the name of the first entry in {fields}. Note: This value
342342 is unaffected if an alias is used.
343- - Let {fragmentVariableValues} be the fragment-variables value of the first entry in {fields}.
343+ - Let {fragmentVariableValues} be the fragment-variables value of the first
344+ entry in {fields}.
344345 - Let {fieldType} be the return type defined for the field {fieldName} of
345346 {objectType}.
346347 - If {fieldType} is defined:
@@ -491,21 +492,22 @@ The depth-first-search order of the field groups produced by {CollectFields()}
491492is maintained through execution, ensuring that fields appear in the executed
492493response in a stable and predictable order.
493494
494- CollectFields(objectType, selectionSet, variableValues, visitedFragments, localVariableValues):
495+ CollectFields(objectType, selectionSet, variableValues, visitedFragments,
496+ localVariableValues):
495497
496498- If {visitedFragments} is not provided, initialize it to the empty set.
497499- Initialize {groupedFields} to an empty ordered map of lists.
498500- For each {selection} in {selectionSet}:
499501 - If {selection} provides the directive ` @skip ` , let {skipDirective} be that
500502 directive.
501503 - If {skipDirective}'s {if} argument is {true} or is a variable in
502- {localVariableValues} or {variableValues} with the value {true}, continue with the next {selection}
503- in {selectionSet}.
504+ {localVariableValues} or {variableValues} with the value {true}, continue
505+ with the next {selection} in {selectionSet}.
504506 - If {selection} provides the directive ` @include ` , let {includeDirective} be
505507 that directive.
506508 - If {includeDirective}'s {if} argument is not {true} and is not a variable
507- in {localVariableValues} or {variableValues} with the value {true}, continue with the next
508- {selection} in {selectionSet}.
509+ in {localVariableValues} or {variableValues} with the value {true},
510+ continue with the next {selection} in {selectionSet}.
509511 - If {selection} is a {Field}:
510512 - Let {responseKey} be the response key of {selection} (the alias if
511513 defined, otherwise the field name).
@@ -525,7 +527,8 @@ CollectFields(objectType, selectionSet, variableValues, visitedFragments, localV
525527 - If {DoesFragmentTypeApply(objectType, fragmentType)} is {false}, continue
526528 with the next {selection} in {selectionSet}.
527529 - Let {localVariableValues} be the result of calling
528- {getArgumentValuesFromSpread(selection, fragmentDefinition, variableValues, localVariableValues)}.
530+ {getArgumentValuesFromSpread(selection, fragmentDefinition,
531+ variableValues, localVariableValues)}.
529532 - Let {fragmentGroupedFieldSet} be the result of calling
530533 {CollectFields(objectType, fragmentSelectionSet, variableValues,
531534 visitedFragments)}.
@@ -564,24 +567,27 @@ DoesFragmentTypeApply(objectType, fragmentType):
564567 - If {objectType} is a possible type of {fragmentType}, return {true}
565568 otherwise return {false}.
566569
567- getArgumentValuesFromSpread(fragmentSpread, fragmentDefinition, variableValues, fragmentArgumentValues):
570+ getArgumentValuesFromSpread(fragmentSpread, fragmentDefinition, variableValues,
571+ fragmentArgumentValues):
568572
569573- Let {coercedValues} be an empty unordered Map.
570574- For each {variableDefinition} in {fragmentDefinition}:
571575 - Let {variableName} be the name of {variableDefinition}.
572576 - Let {variableType} be the type of {variableDefinition}.
573577 - Let {defaultValue} be the default value for {variableDefinition}.
574- - Let {argumentNode} be the node provided in the fragment-spread for {variableName}
578+ - Let {argumentNode} be the node provided in the fragment-spread for
579+ {variableName}
575580 - If {argumentNode} isn't present or is null
576581 - If {defaultValue} exists
577582 - Add an entry to {coercedValues} named {argumentName} with the value
578583 {defaultValue}.
579584 - If {variableType} is non-nullable raise a field-error
580- - Let {hasValue} be {true} if {fragmentArgumentValues} or {variableValues} provides a value for the name
581- {variableName}.
582- - If {variableType} is non-nullable and {hasValue} is {false} raise a field-error
583- - Add an entry to {coercedValues} named {argumentName} with the value
584- found in {variableValues} or {fragmentArgumentValues}.
585+ - Let {hasValue} be {true} if {fragmentArgumentValues} or {variableValues}
586+ provides a value for the name {variableName}.
587+ - If {variableType} is non-nullable and {hasValue} is {false} raise a
588+ field-error
589+ - Add an entry to {coercedValues} named {argumentName} with the value found in
590+ {variableValues} or {fragmentArgumentValues}.
585591- Return {coercedValues}.
586592
587593Note: The steps in {CollectFields()} evaluating the ` @skip ` and ` @include `
@@ -595,7 +601,8 @@ coerces any provided argument values, then resolves a value for the field, and
595601finally completes that value either by recursively executing another selection
596602set or coercing a scalar value.
597603
598- ExecuteField(objectType, objectValue, fieldType, fields, variableValues, fragmentVariableValues):
604+ ExecuteField(objectType, objectValue, fieldType, fields, variableValues,
605+ fragmentVariableValues):
599606
600607- Let {field} be the first entry in {fields}.
601608- Let {fieldName} be the field name of {field}.
@@ -615,7 +622,8 @@ the type system to have a specific input type.
615622At each argument position in an operation may be a literal {Value}, or a
616623{Variable} to be provided at runtime.
617624
618- CoerceFieldArgumentValues(objectType, field, variableValues, fragmentVariableValues):
625+ CoerceFieldArgumentValues(objectType, field, variableValues,
626+ fragmentVariableValues):
619627
620628- Let {argumentValues} be the argument values provided in {field}.
621629- Let {fieldName} be the name of {field}.
@@ -624,7 +632,8 @@ CoerceFieldArgumentValues(objectType, field, variableValues, fragmentVariableVal
624632- Return {CoerceArgumentValues(argumentDefinitions, argumentValues,
625633 variableValues, fragmentVariableValues)}
626634
627- CoerceArgumentValues(argumentDefinitions, argumentValues, variableValues, fragmentVariableValues):
635+ CoerceArgumentValues(argumentDefinitions, argumentValues, variableValues,
636+ fragmentVariableValues):
628637
629638- For each {argumentDefinition} in {argumentDefinitions}:
630639 - Let {argumentName} be the name of {argumentDefinition}.
@@ -636,8 +645,8 @@ CoerceArgumentValues(argumentDefinitions, argumentValues, variableValues, fragme
636645 {argumentName}.
637646 - If {argumentValue} is a {Variable}:
638647 - Let {variableName} be the name of {argumentValue}.
639- - Let {hasValue} be {true} if {fragmentVariableValues} provides a value for the name
640- {variableName}.
648+ - Let {hasValue} be {true} if {fragmentVariableValues} provides a value for
649+ the name {variableName}.
641650 - Let {value} be the value provided in {fragmentVariableValues} for the name
642651 {variableName}.
643652 - Let {hasValue} be {true} if {variableValues} provides a value for the name
0 commit comments