@@ -256,62 +256,6 @@ initialStreams, variableValues):
256
256
- {FlushStream(false)}.
257
257
- Complete {responseStream}.
258
258
259
- - TODO: Delete this
260
- - Let {nextCompleted} be an empty list.
261
- - ...
262
- - Add {defers} to {remainingDefers}.
263
- - Add each entry in {streams} to {remainingStreams}.
264
- - ...
265
- - Yield to {responseStream} an unordered map containing {data}, {errors}, and
266
- {hasNext}.
267
- - ...
268
- - Let {nextIncremental} be an empty list.
269
- - Let {nextPending} be an empty list.
270
- - Let {nextCompleted} be an empty list.
271
- - In parallel, for each entry {defers} in {remainingDefers} (including new
272
- entries added during this loop):
273
- - Let {id} be {index}, then increment {index} by one.
274
- - Let {path} be the longest common path prefix list for every path list key
275
- in {defers}, or the empty list if no such list exists.
276
- - TODO: This really needs rewording!
277
- - Let {nextPending} be an unordered map containing {id}, {path}.
278
- - Add {nextPending} to {nextPending}.
279
- - Let {moreIncrementalPayloads}, {morePendings} be the result of running
280
- {ExecutePending(pending, variableValues)}.
281
- - For each entry {payload} in {moreIncrementalPayloads}:
282
- - Add {payload} to {nextIncremental}.
283
- - For each {newPending} in {morePendings}:
284
- - Add {newPending} to {remainingPendings}.
285
- - Let {nextCompleted} be an unordered map containing {id}.
286
- - Add {nextCompleted} to {nextCompleted}.
287
- - Remove {pending} from {remainingPendings}.
288
- - Call {FlushIncremental(responseStream, nextIncremental, nextPending,
289
- nextCompleted)}, and reset {nextIncremental}, {nextPending},
290
- {nextCompleted} to empty lists.
291
- - TODO: allow this to be batched more - we can group the results from
292
- multiple {pending} executions into a single incremental response.
293
- - For each {pending} in {pendings}:
294
- - Add {pending} tp {remainingPendings}.
295
- - When {remainingPendings} is empty:
296
- - Call {FlushIncremental(stream, nextIncremental, newPending, nextCompleted,
297
- false)}.
298
- - Complete {responseStream}.
299
- - Return {responseStream}.
300
-
301
- FlushIncremental(responseStream, nextIncremental, nextPending, nextCompleted,
302
- hasNext):
303
-
304
- - If {hasNext} is not provided, initialize it to {true}.
305
- - If {nextIncremental} is not empty:
306
- - Let {incremental} be {nextIncremental}.
307
- - If {nextPending} is not empty:
308
- - Let {pending} be {nextPending}.
309
- - If {nextCompleted} is not empty:
310
- - Let {completed} be {nextCompleted}.
311
- - Let {payload} be an unordered map containing {incremental}, {pending},
312
- {completed} and {hasNext}.
313
- - Yield an event to {responseStream} containing {payload}.
314
-
315
259
### Mutation
316
260
317
261
If the operation is a mutation, the result of the operation is the result of
0 commit comments