@@ -142,12 +142,12 @@ ExecuteQuery(query, schema, variableValues, initialValue):
142
142
{hasNext} with the value {true}.
143
143
- Let {iterator} be the result of running
144
144
{YieldSubsequentPayloads(subsequentPayloads)}.
145
- - For each {payload } yielded by {iterator}:
145
+ - For each {payloadList } yielded by {iterator}:
146
146
- If a termination signal is received:
147
147
- Send a termination signal to {iterator}.
148
148
- Return.
149
149
- Otherwise:
150
- - Yield {payload }.
150
+ - Yield {payloadList }.
151
151
152
152
### Mutation
153
153
@@ -175,12 +175,12 @@ ExecuteMutation(mutation, schema, variableValues, initialValue):
175
175
{hasNext} with the value {true}.
176
176
- Let {iterator} be the result of running
177
177
{YieldSubsequentPayloads(subsequentPayloads)}.
178
- - For each {payload } yielded by {iterator}:
178
+ - For each {payloadList } yielded by {iterator}:
179
179
- If a termination signal is received:
180
180
- Send a termination signal to {iterator}.
181
181
- Return.
182
182
- Otherwise:
183
- - Yield {payload }.
183
+ - Yield {payloadList }.
184
184
185
185
### Subscription
186
186
@@ -337,12 +337,12 @@ ExecuteSubscriptionEvent(subscription, schema, variableValues, initialValue):
337
337
{hasNext} with the value {true}.
338
338
- Let {iterator} be the result of running
339
339
{YieldSubsequentPayloads(subsequentPayloads)}.
340
- - For each {payload } yielded by {iterator}:
340
+ - For each {payloadList } yielded by {iterator}:
341
341
- If a termination signal is received:
342
342
- Send a termination signal to {iterator}.
343
343
- Return.
344
344
- Otherwise:
345
- - Yield {payload }.
345
+ - Yield {payloadList }.
346
346
347
347
Note: The {ExecuteSubscriptionEvent()} algorithm is intentionally similar to
348
348
{ExecuteQuery()} since this is how each event result is produced.
@@ -372,21 +372,24 @@ YieldSubsequentPayloads(subsequentPayloads):
372
372
- If {record} contains {iterator}:
373
373
- Send a termination signal to {iterator}.
374
374
- Return.
375
- - Let {record} be the first item in {subsequentPayloads} with a completed
376
- {dataExecution}.
377
- - Remove {record} from {subsequentPayloads}.
378
- - If {isCompletedIterator} on {record} is {true}:
379
- - If {subsequentPayloads} is empty:
380
- - Yield a map containing a field ` hasNext ` with the value {false}.
381
- - Return.
382
- - If {subsequentPayloads} is not empty:
383
- - Continue to the next record in {subsequentPayloads}.
384
- - Let {payload} be the completed result returned by {dataExecution}.
385
- - If {record} is not the final element in {subsequentPayloads}:
386
- - Add an entry to {payload} named ` hasNext ` with the value {true}.
387
- - If {record} is the final element in {subsequentPayloads}:
388
- - Add an entry to {payload} named ` hasNext ` with the value {false}.
389
- - Yield {payload}
375
+ - Let {completed} be the next set of items in {subsequentPayloads} with
376
+ completed {dataExecution} results.
377
+ - Initialize {payloadList} to an empty list.
378
+ - For each {record} in {completed}.
379
+ - Remove {record} from {subsequentPayloads}.
380
+ - If {isCompletedIterator} on {record} is {true}:
381
+ - If {subsequentPayloads} is empty:
382
+ - Yield a map containing a field ` hasNext ` with the value {false}.
383
+ - Return.
384
+ - If {subsequentPayloads} is not empty:
385
+ - Continue to the next record in {subsequentPayloads}.
386
+ - Let {payload} be the completed result returned by {dataExecution}.
387
+ - If {record} is not the final element in {subsequentPayloads}:
388
+ - Add an entry to {payload} named ` hasNext ` with the value {true}.
389
+ - If {record} is the final element in {subsequentPayloads}:
390
+ - Add an entry to {payload} named ` hasNext ` with the value {false}.
391
+ - Append {payload} to {payloadList}
392
+ - Yield {payloadList}
390
393
391
394
## Executing Selection Sets
392
395
0 commit comments