@@ -137,7 +137,7 @@ ExecuteQuery(query, schema, variableValues, initialValue):
137
137
- Let {data} be the result of running {ExecuteSelectionSet(selectionSet,
138
138
queryType, initialValue, variableValues)} _ normally_ (allowing
139
139
parallelization).
140
- - Let {errors} be the list of all _ runtime error_ raised while executing the
140
+ - Let {errors} be the list of all _ execution error_ raised while executing the
141
141
selection set.
142
142
- Return an unordered map containing {data} and {errors}.
143
143
@@ -158,7 +158,7 @@ ExecuteMutation(mutation, schema, variableValues, initialValue):
158
158
- Let {selectionSet} be the top level selection set in {mutation}.
159
159
- Let {data} be the result of running {ExecuteSelectionSet(selectionSet,
160
160
mutationType, initialValue, variableValues)} _ serially_ .
161
- - Let {errors} be the list of all _ runtime error_ raised while executing the
161
+ - Let {errors} be the list of all _ execution error_ raised while executing the
162
162
selection set.
163
163
- Return an unordered map containing {data} and {errors}.
164
164
@@ -317,7 +317,7 @@ MapSourceToResponseEvent(sourceStream, subscription, schema, variableValues):
317
317
- Complete {responseStream} normally.
318
318
- Return {responseStream}.
319
319
320
- Note: Since {ExecuteSubscriptionEvent()} handles all _ runtime error_ , and
320
+ Note: Since {ExecuteSubscriptionEvent()} handles all _ execution error_ , and
321
321
_ request error_ only occur during {CreateSourceEventStream()}, the only
322
322
remaining error condition handled from {ExecuteSubscriptionEvent()} are internal
323
323
exceptional errors not described by this specification.
@@ -330,7 +330,7 @@ ExecuteSubscriptionEvent(subscription, schema, variableValues, initialValue):
330
330
- Let {data} be the result of running {ExecuteSelectionSet(selectionSet,
331
331
subscriptionType, initialValue, variableValues)} _ normally_ (allowing
332
332
parallelization).
333
- - Let {errors} be the list of all _ runtime error_ raised while executing the
333
+ - Let {errors} be the list of all _ execution error_ raised while executing the
334
334
selection set.
335
335
- Return an unordered map containing {data} and {errors}.
336
336
@@ -384,10 +384,10 @@ is explained in greater detail in the Field Collection section below.
384
384
** Errors and Non-Null Types**
385
385
386
386
If during {ExecuteSelectionSet()} a _ response position_ with a non-null type
387
- raises a _ runtime error_ then that error must propagate to the parent response
388
- position (the entire selection set in the case of a field, or the entire list in
389
- the case of a list position), either resolving to {null} if allowed or being
390
- further propagated to a parent response position.
387
+ raises an _ execution error_ then that error must propagate to the parent
388
+ response position (the entire selection set in the case of a field, or the
389
+ entire list in the case of a list position), either resolving to {null} if
390
+ allowed or being further propagated to a parent response position.
391
391
392
392
If this occurs, any sibling response positions which have not yet executed or
393
393
have not yet yielded a value may be cancelled to avoid unnecessary work.
@@ -628,7 +628,7 @@ At each argument position in an operation may be a literal {Value}, or a
628
628
{Variable} to be provided at runtime.
629
629
630
630
Any _ request error_ raised during {CoerceArgumentValues()} should be treated
631
- instead as a _ runtime error_ .
631
+ instead as an _ execution error_ .
632
632
633
633
CoerceArgumentValues(objectType, field, variableValues):
634
634
@@ -656,7 +656,7 @@ CoerceArgumentValues(objectType, field, variableValues):
656
656
- Add an entry to {coercedValues} named {argumentName} with the value
657
657
{defaultValue}.
658
658
- Otherwise if {argumentType} is a Non-Nullable type, and either {hasValue} is
659
- not {true} or {value} is {null}, raise a _ runtime error_ .
659
+ not {true} or {value} is {null}, raise an _ execution error_ .
660
660
- Otherwise if {hasValue} is {true}:
661
661
- If {value} is {null}:
662
662
- Add an entry to {coercedValues} named {argumentName} with the value
@@ -666,7 +666,7 @@ CoerceArgumentValues(objectType, field, variableValues):
666
666
{value}.
667
667
- Otherwise:
668
668
- If {value} cannot be coerced according to the input coercion rules of
669
- {argumentType}, raise a _ runtime error_ .
669
+ {argumentType}, raise an _ execution error_ .
670
670
- Let {coercedValue} be the result of coercing {value} according to the
671
671
input coercion rules of {argumentType}.
672
672
- Add an entry to {coercedValues} named {argumentName} with the value
@@ -713,12 +713,12 @@ CompleteValue(fieldType, fields, result, variableValues):
713
713
- Let {innerType} be the inner type of {fieldType}.
714
714
- Let {completedResult} be the result of calling {CompleteValue(innerType,
715
715
fields, result, variableValues)}.
716
- - If {completedResult} is {null}, raise a _ runtime error_ .
716
+ - If {completedResult} is {null}, raise an _ execution error_ .
717
717
- Return {completedResult}.
718
718
- If {result} is {null} (or another internal value similar to {null} such as
719
719
{undefined}), return {null}.
720
720
- If {fieldType} is a List type:
721
- - If {result} is not a collection of values, raise a _ runtime error_ .
721
+ - If {result} is not a collection of values, raise an _ execution error_ .
722
722
- Let {innerType} be the inner type of {fieldType}.
723
723
- Return a list where each list item is the result of calling
724
724
{CompleteValue(innerType, fields, resultItem, variableValues)}, where
@@ -753,7 +753,7 @@ CoerceResult(leafType, value):
753
753
- Return the result of calling the internal method provided by the type system
754
754
for determining the "result coercion" of {leafType} given the value {value}.
755
755
This internal method must return a valid value for the type and not {null}.
756
- Otherwise raise a _ runtime error_ .
756
+ Otherwise raise an _ execution error_ .
757
757
758
758
Note: If a field resolver returns {null} then it is handled within
759
759
{CompleteValue()} before {CoerceResult()} is called. Therefore both the input
@@ -814,39 +814,39 @@ MergeSelectionSets(fields):
814
814
815
815
### Handling Runtime Errors
816
816
817
- A _ runtime error_ is an error raised from a particular field during value
817
+ An _ execution error_ is an error raised from a particular field during value
818
818
resolution or coercion. While these errors should be reported in the response,
819
819
they are "handled" by producing a partial response.
820
820
821
821
Note: This is distinct from a _ request error_ which results in a response with
822
822
no data.
823
823
824
- If a runtime error is raised while resolving a field (either directly or nested
825
- inside any lists), it is handled as though the position at which the error
826
- occurred resulted in {null}, and the error must be added to the {"errors"} list
827
- in the response.
824
+ If an execution error is raised while resolving a field (either directly or
825
+ nested inside any lists), it is handled as though the position at which the
826
+ error occurred resulted in {null}, and the error must be added to the {"errors"}
827
+ list in the response.
828
828
829
829
If the result of resolving a _ response position_ is {null} (either due to the
830
- result of {ResolveFieldValue()} or because a runtime error was raised), and that
831
- position is of a ` Non-Null ` type, then a runtime error is raised at that
830
+ result of {ResolveFieldValue()} or because an execution error was raised), and
831
+ that position is of a ` Non-Null ` type, then an execution error is raised at that
832
832
position. The error must be added to the {"errors"} list in the response.
833
833
834
- If a _ response position_ returns {null} because of a runtime error which has
834
+ If a _ response position_ returns {null} because of an execution error which has
835
835
already been added to the {"errors"} list in the response, the {"errors"} list
836
836
must not be further affected. That is, only one error should be added to the
837
837
errors list per _ response position_ .
838
838
839
- Since ` Non-Null ` response positions cannot be {null}, runtime errors are
839
+ Since ` Non-Null ` response positions cannot be {null}, execution errors are
840
840
propagated to be handled by the parent _ response position_ . If the parent
841
841
response position may be {null} then it resolves to {null}, otherwise if it is a
842
- ` Non-Null ` type, the runtime error is further propagated to its parent _ response
843
- position_ .
842
+ ` Non-Null ` type, the execution error is further propagated to its parent
843
+ _ response position_ .
844
844
845
845
If a ` List ` type wraps a ` Non-Null ` type, and one of the elements of that list
846
846
resolves to {null}, then the entire list must resolve to {null}. If the ` List `
847
- type is also wrapped in a ` Non-Null ` , the runtime error continues to propagate
847
+ type is also wrapped in a ` Non-Null ` , the execution error continues to propagate
848
848
upwards.
849
849
850
850
If all response positions from the root of the request to the source of the
851
- runtime error return ` Non-Null ` types, then the {"data"} entry in the response
851
+ execution error return ` Non-Null ` types, then the {"data"} entry in the response
852
852
should be {null}.
0 commit comments