@@ -4,18 +4,21 @@ A GraphQL service generates a response from a request via execution.
4
4
5
5
:: A _ request_ for execution consists of a few pieces of information:
6
6
7
- - The schema to use, typically solely provided by the GraphQL service.
8
- - A {Document} which must contain GraphQL {OperationDefinition} and may contain
9
- {FragmentDefinition}.
10
- - Optionally: The name of the Operation in the Document to execute.
11
- - Optionally: Values for any Variables defined by the Operation.
12
- - An initial value corresponding to the root type being executed. Conceptually,
13
- an initial value represents the "universe" of data available via a GraphQL
14
- Service. It is common for a GraphQL Service to always use the same initial
15
- value for every request.
16
-
17
- Given this information, the result of {ExecuteRequest()} produces the response,
18
- to be formatted according to the Response section below.
7
+ - {schema}: The schema to use, typically solely provided by the GraphQL service.
8
+ - {document}: A {Document} which must contain GraphQL {OperationDefinition} and
9
+ may contain {FragmentDefinition}.
10
+ - {operationName} (optional): The name of the Operation in the Document to
11
+ execute.
12
+ - {variableValues} (optional): Values for any Variables defined by the
13
+ Operation.
14
+ - {initialValue} (optional): An initial value corresponding to the root type
15
+ being executed. Conceptually, an initial value represents the "universe" of
16
+ data available via a GraphQL Service. It is common for a GraphQL Service to
17
+ always use the same initial value for every request.
18
+
19
+ Given this information, the result of {ExecuteRequest(schema, document,
20
+ operationName, variableValues, initialValue)} produces the response, to be
21
+ formatted according to the Response section below.
19
22
20
23
Note: GraphQL requests do not require any specific serialization format or
21
24
transport mechanism. Message serialization and transport mechanisms should be
@@ -284,11 +287,11 @@ subscription _selection set_ using that event as a root value.
284
287
MapSourceToResponseEvent(sourceStream, subscription, schema, variableValues):
285
288
286
289
- Return a new event stream {responseStream} which yields events as follows:
287
- - For each {event} on {sourceStream}:
288
- - Let {response} be the result of running
289
- {ExecuteSubscriptionEvent(subscription, schema, variableValues, event)}.
290
- - Yield an event containing {response}.
291
- - When {responseStream } completes: complete this event stream .
290
+ - For each {event} on {sourceStream}:
291
+ - Let {response} be the result of running
292
+ {ExecuteSubscriptionEvent(subscription, schema, variableValues, event)}.
293
+ - Yield an event containing {response}.
294
+ - When {sourceStream } completes: complete {responseStream} .
292
295
293
296
ExecuteSubscriptionEvent(subscription, schema, variableValues, initialValue):
294
297
0 commit comments