Skip to content

Commit 3da431c

Browse files
committed
More consistent with subscriptions
1 parent df8af06 commit 3da431c

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

spec/Section 6 -- Execution.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,13 @@ ExecuteQuery(query, schema, variableValues, initialValue):
139139
- If {defers} is an empty map and {streams} is an empty list:
140140
- Return an unordered map containing {data} and {errors}.
141141
- Otherwise:
142-
- Let {responseStream} be a new event stream.
143-
- Call {IncrementalEventStream(responseStream, data, errors, defers, streams,
144-
variableValues)} asynchronously.
145-
- Return {responseStream}.
142+
- Return {IncrementalEventStream(data, errors, defers, streams,
143+
variableValues)}.
146144

147-
IncrementalEventStream(responseStream, data, errors, initialDefers,
148-
initialStreams, variableValues):
145+
IncrementalEventStream(data, errors, initialDefers, initialStreams,
146+
variableValues):
149147

148+
- Return a new event stream {responseStream} which yields events as follows:
150149
- Let {nextId} be {0}.
151150
- Let {remainingDefers} be an empty set.
152151
- Let {remainingStreams} be an empty set.
@@ -171,7 +170,7 @@ initialStreams, variableValues):
171170
- Add {pendingStream} to {remainingStreams}.
172171
- Let {initialResponse} be an unordered map containing {data}, {errors},
173172
{pending}, and the value {true} for key {hasNext}.
174-
- Yield to {responseStream} the value {initialResponse}.
173+
- Yield an event containing {initialResponse}.
175174
- Let {incremental} be an empty list.
176175
- Let {errors} be an empty list.
177176
- Let {pending} be an empty list.
@@ -188,7 +187,7 @@ initialStreams, variableValues):
188187
- Add {pending} to {incrementalPayload}.
189188
- If {completed} is not empty:
190189
- Add {completed} to {incrementalPayload}.
191-
- Yield to {responseStream} the value {incrementalPayload}.
190+
- Yield an event containing {incrementalPayload}.
192191
- Reset {incremental} to an empty list.
193192
- Reset {errors} to an empty list.
194193
- Reset {pending} to an empty list.

0 commit comments

Comments
 (0)