Skip to content

Commit 68e7657

Browse files
committed
Consistently use 'be the result of running'
1 parent 135ba54 commit 68e7657

File tree

1 file changed

+36
-30
lines changed

1 file changed

+36
-30
lines changed

spec/Section 6 -- Execution.md

Lines changed: 36 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ request is determined by the result of executing this operation according to the
3131

3232
ExecuteRequest(schema, document, operationName, variableValues, initialValue):
3333

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)}.
3738
- If {operation} is a query operation:
3839
- Return {ExecuteQuery(operation, schema, coercedVariableValues,
3940
initialValue)}.
@@ -152,7 +153,8 @@ variableValues):
152153
- Let {pending} be an empty list.
153154
- If {initialDefers} is not an empty object:
154155
- 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)}.
156158
- Let {pendingPayload} be an unordered map containing {id}, {path}.
157159
- Add {pendingPayload} to {pending}.
158160
- Let {defers} be {initialDefers}.
@@ -217,7 +219,7 @@ variableValues):
217219
- Let {fields} be a list of all the values of the {field} key in the
218220
entries of {fieldDetails}.
219221
- 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
221223
{ExecuteSelectionSet(selectionSet, objectType, objectValue,
222224
variableValues, path)}.
223225
- Let {childErrors} be the list of all _field error_ raised while
@@ -233,7 +235,8 @@ variableValues):
233235
{incrementalPayload} to {incremental}.
234236
- If {batchDefers} is not an empty object:
235237
- 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)}.
237240
- Let {pendingPayload} be an unordered map containing {id}, {path}.
238241
- Add {pendingPayload} to {pending}.
239242
- Let {defers} be {batchDefers}.
@@ -270,7 +273,7 @@ variableValues):
270273
- Let {index} be the result of adding {initialCount} to
271274
{remainingValueIndex}.
272275
- 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
274277
{CompleteValue(itemType, fields, remainingValue, variableValues, path)}.
275278
- Let {childErrors} be the list of all _field error_ raised while
276279
completing the value.
@@ -279,7 +282,8 @@ variableValues):
279282
- Append {incrementalPayload} to {incremental}.
280283
- If {childDefers} is not an empty object:
281284
- 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)}.
283287
- Let {pendingPayload} be an unordered map containing {id}, {path}.
284288
- Add {pendingPayload} to {pending}.
285289
- Let {defers} be {childDefers}.
@@ -445,16 +449,16 @@ CreateSourceEventStream(subscription, schema, variableValues, initialValue):
445449
- Let {subscriptionType} be the root Subscription type in {schema}.
446450
- Assert: {subscriptionType} is an Object type.
447451
- 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)}.
450454
- If {groupedFieldSet} does not have exactly one entry, raise a _request error_.
451455
- Let {fieldDetails} be the value of the first entry in {groupedFieldSet}.
452456
- Let {fieldDetail} be the first entry in {fieldDetails}.
453457
- Let {field} be the value for the key {field} in {fieldDetail}.
454458
- Let {fieldName} be the name of {field}. Note: This value is unaffected if an
455459
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)}
458462
- Let {fieldStream} be the result of running
459463
{ResolveFieldEventStream(subscriptionType, initialValue, fieldName,
460464
argumentValues)}.
@@ -536,7 +540,7 @@ ExecuteSelectionSet(selectionSet, objectType, objectValue, variableValues,
536540
parentPath):
537541

538542
- 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,
540544
selectionSet, variableValues, parentPath)}.
541545
- Initialize {resultMap} to an empty ordered map.
542546
- Let {defers} be an empty unordered map.
@@ -556,8 +560,8 @@ parentPath):
556560
- Otherwise:
557561
- Let {fields} be a list of all the values of the {field} key in the
558562
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)}.
561565
- Let {nullableFieldType} be the inner type of {fieldType} if {fieldType}
562566
is a non-nullable type, otherwise let {nullableFieldType} be
563567
{fieldType}.
@@ -578,7 +582,7 @@ parentPath):
578582
- Let {initialValues} be the first {initialCount} entries in
579583
{resolvedValue}, and {remainingValues} be the remainder.
580584
- Let {initialResponseValue}, {childDefers}, {childStreams} be the
581-
result of calling {CompleteValue(nullableFieldType, fields,
585+
result of running {CompleteValue(nullableFieldType, fields,
582586
initialValues, variableValues, path)}.
583587
- Add the entries of {childDefers} into {defers}. Note: {childDefers}
584588
and {defers} will never have keys in common.
@@ -592,8 +596,8 @@ parentPath):
592596
- Append {streamDetails} to {streams}.
593597
- Otherwise:
594598
- 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)}.
597601
- Add the entries of {childDefers} into {defers}. Note: {childDefers}
598602
and {defers} will never have keys in common.
599603
- For each entry {stream} in {childStreams}, append {stream} to
@@ -790,7 +794,7 @@ visitedFragments, parentPath):
790794
in {variableValues} with the value {false}:
791795
- Let {fragmentIsDeferred} be {true}.
792796
- 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
794798
{CollectFields(objectType, fragmentSelectionSet, variableValues,
795799
fragmentIsDeferred, visitedFragments, parentPath)}.
796800
- For each {fragmentGroup} in {fragmentGroupedFieldSet}:
@@ -811,7 +815,7 @@ visitedFragments, parentPath):
811815
in {variableValues} with the value {false}:
812816
- Let {fragmentIsDeferred} be {true}.
813817
- 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
815819
{CollectFields(objectType, fragmentSelectionSet, variableValues,
816820
fragmentIsDeferred, visitedFragments, parentPath)}.
817821
- For each {fragmentGroup} in {fragmentGroupedFieldSet}:
@@ -849,10 +853,10 @@ ExecuteField(objectType, objectValue, fieldType, fields, variableValues, path):
849853

850854
- Let {field} be the first entry in {fields}.
851855
- 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)}.
856860
- Return {resolvedValue}.
857861

858862
### Coercing Field Arguments
@@ -944,7 +948,7 @@ CompleteValue(fieldType, fields, result, variableValues, path):
944948

945949
- If the {fieldType} is a Non-Null type:
946950
- 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
948952
{CompleteValue(innerType, fields, result, variableValues, path)}.
949953
- If {completedResult} is {null}, raise a _field error_.
950954
- Return {completedResult}, {defers} and {streams}.
@@ -963,25 +967,27 @@ CompleteValue(fieldType, fields, result, variableValues, path):
963967
- For each entry {resultItem} at zero-based index {resultIndex} in {result}:
964968
- Let {listItemPath} be a copy of {path} with {resultIndex} appended.
965969
- Let {completedItemResult}, {childDefers} and {childStreams} be the result
966-
of calling {CompleteValue(innerType, fields, resultItem, variableValues,
970+
of running {CompleteValue(innerType, fields, resultItem, variableValues,
967971
listItemPath)}.
968972
- Add the entries of {childDefers} into {defers}. Note: {childDefers} and
969973
{defers} will never have keys in common.
970974
- For each entry {stream} in {childStreams}, append {stream} to {streams}.
971975
- Append {completedItemResult} to {completedResult}.
972976
- Return {completedResult}, {defers} and {streams}.
973977
- 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)}.
975980
- Let {defers} be an empty unordered map.
976981
- Let {streams} be an empty list.
977982
- Return {completedResult}, {defers} and {streams}.
978983
- If {fieldType} is an Object, Interface, or Union type:
979984
- If {fieldType} is an Object type.
980985
- Let {objectType} be {fieldType}.
981986
- 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
985991
{ExecuteSelectionSet(subSelectionSet, objectType, result, variableValues,
986992
path)} _normally_ (allowing for parallelization).
987993
- Return {completedResult}, {defers} and {streams}.

0 commit comments

Comments
 (0)