@@ -328,28 +328,15 @@ MapSourceToResponseEvent(sourceStream, subscription, schema, variableValues):
328328
329329ExecuteSubscriptionEvent(subscription, schema, variableValues, initialValue):
330330
331- - Let {subsequentPayloads} be an empty list.
332331- Let {subscriptionType} be the root Subscription type in {schema}.
333332- Assert: {subscriptionType} is an Object type.
334333- Let {selectionSet} be the top level Selection Set in {subscription}.
335334- Let {data} be the result of running {ExecuteSelectionSet(selectionSet,
336- subscriptionType, initialValue, variableValues, subsequentPayloads)}
337- _ normally _ (allowing parallelization).
335+ subscriptionType, initialValue, variableValues)} _ normally _ (allowing
336+ parallelization).
338337- Let {errors} be the list of all _ field error_ raised while executing the
339338 selection set.
340- - If {subsequentPayloads} is empty:
341- - Return an unordered map containing {data} and {errors}.
342- - If {subsequentPayloads} is not empty:
343- - Let {initialResponse} be an unordered map containing {data}, {errors}, and
344- an entry named {hasNext} with the value {true}.
345- - Let {iterator} be the result of running
346- {YieldSubsequentPayloads(initialResponse, subsequentPayloads)}.
347- - For each {payload} yielded by {iterator}:
348- - If a termination signal is received:
349- - Send a termination signal to {iterator}.
350- - Return.
351- - Otherwise:
352- - Yield {payload}.
339+ - Return an unordered map containing {data} and {errors}.
353340
354341Note: The {ExecuteSubscriptionEvent()} algorithm is intentionally similar to
355342{ExecuteQuery()} since this is how each event result is produced.
@@ -690,6 +677,8 @@ visitedFragments, deferredGroupedFieldsList):
690677 argument is not {false} and is not a variable in {variableValues} with the
691678 value {false}:
692679 - Let {deferDirective} be that directive.
680+ - If this execution is for a subscription operation, raise a _ field
681+ error_ .
693682 - If {deferDirective} is not defined:
694683 - If {fragmentSpreadName} is in {visitedFragments}, continue with the next
695684 {selection} in {selectionSet}.
@@ -730,6 +719,8 @@ visitedFragments, deferredGroupedFieldsList):
730719 is not {false} and is not a variable in {variableValues} with the value
731720 {false}:
732721 - Let {deferDirective} be that directive.
722+ - If this execution is for a subscription operation, raise a _ field
723+ error_ .
733724 - If {deferDirective} is defined:
734725 - Let {label} be the value or the variable to {deferDirective}'s {label}
735726 argument.
@@ -997,6 +988,7 @@ subsequentPayloads, asyncRecord):
997988 {innerType} is the outermost return type of the list type defined for
998989 {field}:
999990 - Let {streamDirective} be that directive.
991+ - If this execution is for a subscription operation, raise a _ field error_ .
1000992 - Let {initialCount} be the value or variable provided to
1001993 {streamDirective}'s {initialCount} argument.
1002994 - If {initialCount} is less than zero, raise a _ field error_ .
0 commit comments