@@ -15,15 +15,25 @@ A GraphQL service generates a response from a request via execution.
1515 being executed. Conceptually, an initial value represents the "universe" of
1616 data available via a GraphQL Service. It is common for a GraphQL Service to
1717 always use the same initial value for every request.
18- - {errors } (optional): The _ error behavior_ that is desired, see
18+ - {onError } (optional): The _ error behavior_ that is desired, see
1919 [ Handling Execution Errors] ( #sec-Handling-Execution-Errors ) .
2020
2121Given this information, the result of {ExecuteRequest(schema, document,
2222operationName, variableValues, initialValue)} produces the response, to be
23- formatted according to the Response section below. The value of {errors} is
24- referenced by the [ Handling Execution Errors] ( #sec-Handling-Execution-Errors )
25- section only, so we do not complicate the algorithms by passing it through every
26- call.
23+ formatted according to the Response section below.
24+
25+ Servers should use the value of {onError}, if present, as the _ error behavior_
26+ of the request described in
27+ [ Handling Execution Errors] ( #sec-Handling-Execution-Errors ) . However, it should
28+ be noted that previous versions of this specification did not make this option
29+ available and thus a client must not rely on the server to honor the {onError}
30+ value it has specified. If a _ response_ includes {"errors"}, the client must
31+ check the {"onError"} of the _ response_ determine how errors are treated. If no
32+ such property is present, the client must treat the request as if it had
33+ specified {onError} as {"PROPAGATE"}.
34+
35+ If {onError} is present and it's value is not one of {"PROPAGATE"},
36+ {"NO_PROPAGATE"}, or {"ABORT"} then a request error must be raised.
2737
2838Note: GraphQL requests do not require any specific serialization format or
2939transport mechanism. Message serialization and transport mechanisms should be
@@ -833,7 +843,8 @@ If a `List` type wraps a `Non-Null` type, and one of the elements of that list
833843resolves to {null}, then an execution error is raised by the list item.
834844
835845:: The _ error behavior_ is the way in which the request wishes for errors to be
836- handled. Valid values are {"PROPAGATE"}, {"NO_PROPAGATE"} and {"ABORT"}; their
846+ handled. It can be specified by the client using the {onError} property of the
847+ _ request_ . Valid values are {"PROPAGATE"}, {"NO_PROPAGATE"} and {"ABORT"}; their
837848respective behaviors are detailed below.
838849
839850Implementations are free to choose the default value to use if _ error behavior_
0 commit comments