@@ -306,12 +306,18 @@ MapSourceToResponseEvent(sourceStream, subscription, schema, variableValues):
306306 sourceValue)}.
307307 - If internal {error} was raised:
308308 - Cancel {sourceStream}.
309- - Perform {EmitErrorAndComplete(responseStream, error)}.
309+ - Let {errors} be a list containing {error}.
310+ - Let {response} be an unordered map containing {errors}.
311+ - Emit {response} on {responseStream}.
312+ - Complete {responseStream} normally.
310313 - Otherwise emit {response} on {responseStream}.
311314- When {sourceStream} completes normally:
312315 - Complete {responseStream} normally.
313316- When {sourceStream} completes with {error}:
314- - Perform {EmitErrorAndComplete(responseStream, error)}.
317+ - Let {errors} be a list containing {error}.
318+ - Let {response} be an unordered map containing {errors}.
319+ - Emit {response} on {responseStream}.
320+ - Complete {responseStream} normally.
315321- When {responseStream} is cancelled:
316322 - Cancel {sourceStream}.
317323 - Complete {responseStream} normally.
@@ -337,13 +343,6 @@ ExecuteSubscriptionEvent(subscription, schema, variableValues, initialValue):
337343Note: The {ExecuteSubscriptionEvent()} algorithm is intentionally similar to
338344{ExecuteQuery()} since this is how each event result is produced.
339345
340- EmitErrorAndComplete(responseStream, error):
341-
342- - Let {errors} be a list containing {error}.
343- - Let {response} be an unordered map containing {errors}.
344- - Emit {response} on {responseStream}.
345- - Complete {responseStream} normally.
346-
347346#### Unsubscribe
348347
349348Unsubscribe cancels the Response Stream when a client no longer wishes to
0 commit comments