@@ -57,6 +57,36 @@ present in the response.
5757If an error was raised during the execution that prevented a valid response, the
5858` data ` entry in the response should be ` null ` .
5959
60+ ** Response Position**
61+
62+ :: A _ response position_ is a uniquely identifiable position in the response
63+ data produced during execution. It is either a direct entry in the {resultMap}
64+ of a {ExecuteSelectionSet()}, or it is a position in a (potentially nested) List
65+ value.
66+
67+ The response data is the result of accumulating the result of all response
68+ positions during execution.
69+
70+ Each _ response position_ is uniquely identifiable via a _ path entry_ .
71+
72+ A single field execution may result in multiple response positions. For example,
73+
74+ ``` graphql example
75+ {
76+ hero (episode : $episode ) {
77+ name
78+ friends {
79+ name
80+ }
81+ }
82+ }
83+ ```
84+
85+ The hero's name would be found in the _ response position_ identified by
86+ ` ["hero", "name"] ` . The List of the hero's friends would be found at
87+ ` ["hero", "friends"] ` , the hero's first friend at ` ["hero", "friends", 0] ` and
88+ that friend's name at ` ["hero", "friends", 0, "name"] ` .
89+
6090### Errors
6191
6292The ` errors ` entry in the response is a non-empty list of errors raised during
@@ -88,33 +118,31 @@ If a request error is raised, the `data` entry in the response must not be
88118present, the ` errors ` entry must include the error, and request execution should
89119be halted.
90120
121+ ** Execution Errors**
122+
91123<a name =" sec-Errors.Field-Errors " >
92- <!-- This link exists for legacy hyperlink support -->
124+ <!-- Legacy link, this section was previously titled "Field Errors" -->
93125</a >
94126
95- ** Execution Errors**
96-
97127:: An _ execution error_ is an error raised during the execution of a particular
98128field which results in partial response data. This may occur due to failure to
99129coerce the arguments for the field, an internal error during value resolution,
100- or failure to coerce the resulting value. An _ execution error_ may occur in any
101- _ response position_ .
130+ or failure to coerce the resulting value.
102131
103132Note: In previous versions of this specification _ execution error_ was called
104133_ field error_ .
105134
106- :: A _ response position_ is an identifiable position in the response: either a
107- _ field_ , or a (potentially nested) list position within a field if the field has
108- a ` List ` type. An _ execution error_ may only occur within a _ response position_ .
109- The _ response position_ is indicated in the _ response_ via the error's _ path
110- entry_ .
111-
112135An execution error is typically the fault of a GraphQL service.
113136
114- If an execution error is raised, execution attempts to continue and a partial
115- result is produced (see
116- [ Handling Execution Errors] ( #sec-Handling-Execution-Errors ) ). The ` data ` entry
117- in the response must be present. The ` errors ` entry must include this error.
137+ An _ execution error_ must occur at a specific _ response position_ , and may occur
138+ in any response position. The response position of an execution error is
139+ indicated via the error's ` path ` _ path entry_ .
140+
141+ When an execution error is raised at a given _ response position_ , then that
142+ response position must not be present within the _ response_ ` data ` entry (except
143+ Null), and the ` errors ` entry must include the error. Nested execution is halted
144+ and sibling execution attempts to continue, producing partial result (see
145+ [ Handling Execution Errors] ( #sec-Handling-Execution-Errors ) ).
118146
119147** Error Result Format**
120148
0 commit comments