@@ -329,28 +329,15 @@ MapSourceToResponseEvent(sourceStream, subscription, schema, variableValues):
329
329
330
330
ExecuteSubscriptionEvent(subscription, schema, variableValues, initialValue):
331
331
332
- - Let {subsequentPayloads} be an empty list.
333
332
- Let {subscriptionType} be the root Subscription type in {schema}.
334
333
- Assert: {subscriptionType} is an Object type.
335
334
- Let {selectionSet} be the top level Selection Set in {subscription}.
336
335
- Let {data} be the result of running {ExecuteSelectionSet(selectionSet,
337
- subscriptionType, initialValue, variableValues, subsequentPayloads)}
338
- _ normally _ (allowing parallelization).
336
+ subscriptionType, initialValue, variableValues)} _ normally _ (allowing
337
+ parallelization).
339
338
- Let {errors} be the list of all _ field error_ raised while executing the
340
339
selection set.
341
- - If {subsequentPayloads} is empty:
342
- - Return an unordered map containing {data} and {errors}.
343
- - If {subsequentPayloads} is not empty:
344
- - Let {initialResponse} be an unordered map containing {data}, {errors}, and
345
- an entry named {hasNext} with the value {true}.
346
- - Let {iterator} be the result of running
347
- {YieldSubsequentPayloads(initialResponse, subsequentPayloads)}.
348
- - For each {payload} yielded by {iterator}:
349
- - If a termination signal is received:
350
- - Send a termination signal to {iterator}.
351
- - Return.
352
- - Otherwise:
353
- - Yield {payload}.
340
+ - Return an unordered map containing {data} and {errors}.
354
341
355
342
Note: The {ExecuteSubscriptionEvent()} algorithm is intentionally similar to
356
343
{ExecuteQuery()} since this is how each event result is produced.
@@ -691,6 +678,8 @@ visitedFragments, deferredGroupedFieldsList):
691
678
argument is not {false} and is not a variable in {variableValues} with the
692
679
value {false}:
693
680
- Let {deferDirective} be that directive.
681
+ - If this execution is for a subscription operation, raise a _ field
682
+ error_ .
694
683
- If {deferDirective} is not defined:
695
684
- If {fragmentSpreadName} is in {visitedFragments}, continue with the next
696
685
{selection} in {selectionSet}.
@@ -731,6 +720,8 @@ visitedFragments, deferredGroupedFieldsList):
731
720
is not {false} and is not a variable in {variableValues} with the value
732
721
{false}:
733
722
- Let {deferDirective} be that directive.
723
+ - If this execution is for a subscription operation, raise a _ field
724
+ error_ .
734
725
- If {deferDirective} is defined:
735
726
- Let {label} be the value or the variable to {deferDirective}'s {label}
736
727
argument.
@@ -998,6 +989,7 @@ subsequentPayloads, asyncRecord):
998
989
{innerType} is the outermost return type of the list type defined for
999
990
{field}:
1000
991
- Let {streamDirective} be that directive.
992
+ - If this execution is for a subscription operation, raise a _ field error_ .
1001
993
- Let {initialCount} be the value or variable provided to
1002
994
{streamDirective}'s {initialCount} argument.
1003
995
- If {initialCount} is less than zero, raise a _ field error_ .
0 commit comments