@@ -863,7 +863,7 @@ variableValues, subsequentPayloads):
863
863
- Let {streamRecord} be an async payload record created from {label}, {path},
864
864
and {iterator}.
865
865
- Initialize {errors} on {streamRecord} to an empty list.
866
- - Let {indexPath } be {path} with {index} appended.
866
+ - Let {itemPath } be {path} with {index} appended.
867
867
- Let {dataExecution} be the asynchronous future value of:
868
868
- Wait for the next item from {iterator}.
869
869
- If an item is not retrieved because {iterator} has completed:
@@ -872,7 +872,7 @@ variableValues, subsequentPayloads):
872
872
- Let {payload} be an unordered map.
873
873
- Let {item} be the item retrieved from {iterator}.
874
874
- Let {data} be the result of calling {CompleteValue(innerType, fields, item,
875
- variableValues, indexPath , subsequentPayloads, parentRecord)}.
875
+ variableValues, itemPath , subsequentPayloads, parentRecord)}.
876
876
- Append any encountered field errors to {errors}.
877
877
- Increment {index}.
878
878
- Call {ExecuteStreamField(label, iterator, index, fields, innerType, path,
@@ -883,7 +883,7 @@ variableValues, subsequentPayloads):
883
883
- Add an entry to {payload} named ` errors ` with the value {errors}.
884
884
- Add an entry to {payload} named ` data ` with the value {data}.
885
885
- Add an entry to {payload} named ` label ` with the value {label}.
886
- - Add an entry to {payload} named ` path ` with the value {indexPath }.
886
+ - Add an entry to {payload} named ` path ` with the value {itemPath }.
887
887
- Return {payload}.
888
888
- Set {dataExecution} on {streamRecord}.
889
889
- Append {streamRecord} to {subsequentPayloads}.
@@ -903,7 +903,9 @@ subsequentPayloads, asyncRecord):
903
903
- If {result} is an iterator:
904
904
- Let {field} be the first entry in {fields}.
905
905
- Let {innerType} be the inner type of {fieldType}.
906
- - Let {streamDirective} be the ` @stream ` directive provided on {field}.
906
+ - If {field} provides the directive ` @stream ` and its {if} argument is
907
+ {true} or is a variable in {variableValues} with the value {true} and :
908
+ - Let {streamDirective} be that directive.
907
909
- Let {initialCount} be the value or variable provided to
908
910
{streamDirective}'s {initialCount} argument.
909
911
- If {initialCount} is less than zero, raise a _ field error_ .
@@ -912,18 +914,18 @@ subsequentPayloads, asyncRecord):
912
914
- Let {initialItems} be an empty list
913
915
- Let {index} be zero.
914
916
- While {result} is not closed:
915
- - If {streamDirective} was not provided or {index} is not greater than or
917
+ - If {streamDirective} is not defined or {index} is not greater than or
916
918
equal to {initialCount}:
917
919
- Wait for the next item from {result}.
918
920
- Let {resultItem} be the item retrieved from {result}.
919
- - Let {indexPath } be {path} with {index} appended.
921
+ - Let {itemPath } be {path} with {index} appended.
920
922
- Let {resolvedItem} be the result of calling {CompleteValue(innerType,
921
- fields, resultItem, variableValues, indexPath , subsequentPayloads,
923
+ fields, resultItem, variableValues, itemPath , subsequentPayloads,
922
924
asyncRecord)}.
923
925
- Append {resolvedItem} to {initialItems}.
924
926
- Increment {index}.
925
- - If {streamDirective} was provided and {index} is greater than or equal
926
- to {initialCount}:
927
+ - If {streamDirective} is defined and {index} is greater than or equal to
928
+ {initialCount}:
927
929
- Call {ExecuteStreamField(label, result, index, fields, innerType,
928
930
path, asyncRecord, subsequentPayloads)}.
929
931
- Let {result} be {initialItems}.
@@ -932,9 +934,9 @@ subsequentPayloads, asyncRecord):
932
934
- If {result} is not a collection of values, raise a _ field error_ .
933
935
- Let {innerType} be the inner type of {fieldType}.
934
936
- Return a list where each list item is the result of calling
935
- {CompleteValue(innerType, fields, resultItem, variableValues, indexPath ,
937
+ {CompleteValue(innerType, fields, resultItem, variableValues, itemPath ,
936
938
subsequentPayloads, asyncRecord)}, where {resultItem} is each item in
937
- {result} and {indexPath } is {path} with the index of the item appended.
939
+ {result} and {itemPath } is {path} with the index of the item appended.
938
940
- If {fieldType} is a Scalar or Enum type:
939
941
- Return the result of {CoerceResult(fieldType, result)}.
940
942
- If {fieldType} is an Object, Interface, or Union type:
0 commit comments