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