@@ -18,9 +18,9 @@ A GraphQL service generates a response from a request via execution.
1818- {extensions} (optional): A map reserved for implementation-specific additional
1919 information.
2020
21- Given this information, the result of {Request (schema, document, operationName ,
22- variableValues, initialValue)} produces the response, to be formatted according
23- to the Response section below.
21+ Given this information, the result of {ExecuteRequest (schema, document,
22+ operationName, variableValues, initialValue)} produces the response, to be
23+ formatted according to the Response section below.
2424
2525Implementations should not add additional properties to a _ request_ , which may
2626conflict with future editions of the GraphQL specification. Instead,
@@ -39,19 +39,19 @@ and have no effect on the observable execution, validation, or response of a
3939GraphQL document. Descriptions and comments on executable documents MAY be used
4040for non-observable purposes, such as logging and other developer tools.
4141
42- ## Processing Requests
42+ ## Executing Requests
4343
4444<a name =" #sec-Executing-Requests " >
4545 <!-- Legacy link, this section was previously titled "Executing Requests" -->
4646</a >
4747
48- To process a request, the executor must have a parsed {Document} and a selected
48+ To execute a request, the executor must have a parsed {Document} and a selected
4949operation name to run if the document defines multiple operations, otherwise the
5050document is expected to only contain a single operation. The result of the
51- request is determined by the result of performing this operation according to
52- the "Performing Operations” section below.
51+ request is determined by the result of executing this operation according to the
52+ "Executing Operations” section below.
5353
54- The {Request ()} algorithm contains the preamble for _ execution_ , handling
54+ The {ExecuteRequest ()} algorithm contains the preamble for _ execution_ , handling
5555concerns such as determining the operation and coercing the inputs, before
5656passing the request on to the relevant algorithm for the operation's type which
5757then performs any other necessary preliminary steps (for example establishing
@@ -65,18 +65,19 @@ error_, and once _execution_ begins will typically be an _execution error_.
6565selection set_ through {ExecuteRootSelectionSet()}, and hence _ execution_ begins
6666when {ExecuteRootSelectionSet()} is called for the first time in a request.
6767
68- Request (schema, document, operationName, variableValues, initialValue):
68+ ExecuteRequest (schema, document, operationName, variableValues, initialValue):
6969
7070- Let {operation} be the result of {GetOperation(document, operationName)}.
7171- Let {coercedVariableValues} be the result of {CoerceVariableValues(schema,
7272 operation, variableValues)}.
7373- If {operation} is a query operation:
74- - Return {Query(operation, schema, coercedVariableValues, initialValue)}.
74+ - Return {ExecuteQuery(operation, schema, coercedVariableValues,
75+ initialValue)}.
7576- Otherwise if {operation} is a mutation operation:
76- - Return {Mutation(operation, schema, coercedVariableValues, initialValue)}.
77- - Otherwise if {operation} is a subscription operation:
78- - Return {Subscription(operation, schema, coercedVariableValues,
77+ - Return {ExecuteMutation(operation, schema, coercedVariableValues,
7978 initialValue)}.
79+ - Otherwise if {operation} is a subscription operation:
80+ - Return {Subscribe(operation, schema, coercedVariableValues, initialValue)}.
8081
8182GetOperation(document, operationName):
8283
@@ -97,11 +98,11 @@ they should be reported in the list of "errors" in the response and the request
9798must fail without execution.
9899
99100Typically validation is performed in the context of a request immediately before
100- calling {Request ()}, however a GraphQL service may process a request without
101- immediately validating the document if that exact same document is known to have
102- been validated before. A GraphQL service should only execute operations which
103- _ at some point_ were known to be free of any validation errors, and have since
104- not changed.
101+ calling {ExecuteRequest ()}, however a GraphQL service may execute a request
102+ without immediately validating the document if that exact same document is known
103+ to have been validated before. A GraphQL service should only execute operations
104+ which _ at some point_ were known to be free of any validation errors, and have
105+ since not changed.
105106
106107For example: the document may be validated during development, provided it does
107108not later change, or a service may validate a document once and memoize the
@@ -149,7 +150,7 @@ CoerceVariableValues(schema, operation, variableValues):
149150
150151Note: This algorithm is very similar to {CoerceArgumentValues()}.
151152
152- ## Performing Operations
153+ ## Executing Operations
153154
154155<a name =" #sec-Executing-Operations " >
155156 <!-- Legacy link, this section was previously titled "Executing Operations" -->
@@ -166,9 +167,9 @@ If the operation is a query, the result of the operation is the result of
166167executing the operation’s _ root selection set_ with the query root operation
167168type.
168169
169- An initial value may be provided when performing a query operation.
170+ An initial value may be provided when executing a query operation.
170171
171- Query (query, schema, variableValues, initialValue):
172+ ExecuteQuery (query, schema, variableValues, initialValue):
172173
173174- Let {queryType} be the root Query type in {schema}.
174175- Assert: {queryType} is an Object type.
@@ -186,7 +187,7 @@ It is expected that the top level fields in a mutation operation perform
186187side-effects on the underlying data system. Serial execution of the provided
187188mutations ensures against race conditions during these side-effects.
188189
189- Mutation (mutation, schema, variableValues, initialValue):
190+ ExecuteMutation (mutation, schema, variableValues, initialValue):
190191
191192- Let {mutationType} be the root Mutation type in {schema}.
192193- Assert: {mutationType} is an Object type.
@@ -201,10 +202,10 @@ _response stream_ where each event in the event stream is the result of
201202executing the operation’s _ root selection set_ for each new event on an
202203underlying _ source stream_ .
203204
204- Performing a subscription operation creates a persistent function on the service
205+ Executing a subscription operation creates a persistent function on the service
205206that maps an underlying _ source stream_ to a returned _ response stream_ .
206207
207- Subscription (subscription, schema, variableValues, initialValue):
208+ Subscribe (subscription, schema, variableValues, initialValue):
208209
209210- Let {sourceStream} be the result of running
210211 {CreateSourceEventStream(subscription, schema, variableValues, initialValue)}.
@@ -213,9 +214,9 @@ Subscription(subscription, schema, variableValues, initialValue):
213214 variableValues)}.
214215- Return {responseStream}.
215216
216- Note: In a large-scale subscription system, the {Subscription ()} and
217- {SubscriptionEvent ()} algorithms may be run on separate services to maintain
218- predictable scaling properties. See the section below on Supporting
217+ Note: In a large-scale subscription system, the {Subscribe ()} and
218+ {ExecuteSubscriptionEvent ()} algorithms may be run on separate services to
219+ maintain predictable scaling properties. See the section below on Supporting
219220Subscriptions at Scale.
220221
221222As an example, consider a chat application. To subscribe to new messages posted
@@ -336,7 +337,8 @@ MapSourceToResponseEvent(sourceStream, subscription, schema, variableValues):
336337- Let {responseStream} be a new _ event stream_ .
337338- When {sourceStream} emits {sourceValue}:
338339 - Let {executionResult} be the result of running
339- {SubscriptionEvent(subscription, schema, variableValues, sourceValue)}.
340+ {ExecuteSubscriptionEvent(subscription, schema, variableValues,
341+ sourceValue)}.
340342 - If internal {error} was raised:
341343 - Cancel {sourceStream}.
342344 - Complete {responseStream} with {error}.
@@ -350,21 +352,21 @@ MapSourceToResponseEvent(sourceStream, subscription, schema, variableValues):
350352 - Complete {responseStream} normally.
351353- Return {responseStream}.
352354
353- Note: Since {SubscriptionEvent ()} handles all _ execution error_ , and _ request
354- error_ only occur during {CreateSourceEventStream()}, the only remaining error
355- condition handled from {SubscriptionEvent ()} are internal exceptional errors not
356- described by this specification.
355+ Note: Since {ExecuteSubscriptionEvent ()} handles all _ execution error_ , and
356+ _ request error_ only occur during {CreateSourceEventStream()}, the only
357+ remaining error condition handled from {ExecuteSubscriptionEvent ()} are internal
358+ exceptional errors not described by this specification.
357359
358- SubscriptionEvent (subscription, schema, variableValues, initialValue):
360+ ExecuteSubscriptionEvent (subscription, schema, variableValues, initialValue):
359361
360362- Let {subscriptionType} be the root Subscription type in {schema}.
361363- Assert: {subscriptionType} is an Object type.
362364- Let {rootSelectionSet} be the _ root selection set_ in {subscription}.
363365- Return {ExecuteRootSelectionSet(variableValues, initialValue,
364366 subscriptionType, rootSelectionSet, "normal")}.
365367
366- Note: The {SubscriptionEvent ()} algorithm is intentionally similar to {Query()}
367- since this is how each event result is produced.
368+ Note: The {ExecuteSubscriptionEvent ()} algorithm is intentionally similar to
369+ {ExecuteQuery()} since this is how each event result is produced.
368370
369371#### Unsubscribe
370372
@@ -660,7 +662,7 @@ A valid GraphQL executor can resolve the four fields in whatever order it chose
660662(however of course ` birthday ` must be resolved before ` month ` , and ` address `
661663before ` street ` ).
662664
663- When performing a mutation, the selections in the top most selection set will be
665+ When executing a mutation, the selections in the top most selection set will be
664666executed in serial order, starting with the first appearing field textually.
665667
666668When executing a collected fields map serially, the executor must consider each
0 commit comments