@@ -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
@@ -290,11 +293,11 @@ subscription _selection set_ using that event as a root value.
290
293
MapSourceToResponseEvent(sourceStream, subscription, schema, variableValues):
291
294
292
295
- Return a new event stream {responseStream} which yields events as follows:
293
- - For each {event} on {sourceStream}:
294
- - Let {response} be the result of running
295
- {ExecuteSubscriptionEvent(subscription, schema, variableValues, event)}.
296
- - Yield an event containing {response}.
297
- - When {responseStream } completes: complete this event stream .
296
+ - For each {event} on {sourceStream}:
297
+ - Let {response} be the result of running
298
+ {ExecuteSubscriptionEvent(subscription, schema, variableValues, event)}.
299
+ - Yield an event containing {response}.
300
+ - When {sourceStream } completes: complete {responseStream} .
298
301
299
302
ExecuteSubscriptionEvent(subscription, schema, variableValues, initialValue):
300
303
0 commit comments