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