@@ -387,26 +387,30 @@ YieldSubsequentPayloads(initialResponse, subsequentPayloads):
387
387
{incremental}.
388
388
- Yield {initialResponse}.
389
389
- While {subsequentPayloads} is not empty:
390
- - If a termination signal is received:
391
- - For each {record} in {subsequentPayloads}:
392
- - If {record} contains {iterator}:
393
- - Send a termination signal to {iterator}.
394
- - Return.
395
- - Wait for at least one record in {subsequentPayloads} to have a completed
396
- {dataExecution}.
397
- - Let {subsequentResponse} be an unordered map with an entry {incremental}
398
- initialized to an empty list.
399
- - Let {records} be the items in {subsequentPayloads} with a completed
400
- {dataExecution}.
390
+ - If a termination signal is received:
391
+ - For each {record} in {subsequentPayloads}:
392
+ - If {record} contains {iterator}:
393
+ - Send a termination signal to {iterator}.
394
+ - Return.
395
+ - Wait for at least one record in {subsequentPayloads} to have a completed
396
+ {dataExecution}.
397
+ - Let {subsequentResponse} be an unordered map with an entry {incremental}
398
+ initialized to an empty list.
399
+ - Let {records} be the items in {subsequentPayloads} with a completed
400
+ {dataExecution}.
401
401
- For each {record} in {records}:
402
402
- Remove {record} from {subsequentPayloads}.
403
403
- If {isCompletedIterator} on {record} is {true}:
404
404
- Continue to the next record in {records}.
405
405
- Let {payload} be the completed result returned by {dataExecution}.
406
- - Append {payload} to {incremental}.
406
+ - Append {payload} to the {incremental} entry on {subsequentResponse }.
407
407
- If {subsequentPayloads} is empty:
408
- - Add an entry to {response} named ` hasNext ` with the value {false}.
409
- - Yield {response}
408
+ - Add an entry to {subsequentResponse} named ` hasNext ` with the value
409
+ {false}.
410
+ - Otherwise, if {subsequentPayloads} is not empty:
411
+ - Add an entry to {subsequentResponse} named ` hasNext ` with the value
412
+ {true}.
413
+ - Yield {subsequentResponse}
410
414
411
415
## Executing Selection Sets
412
416
0 commit comments