@@ -325,24 +325,28 @@ A correct executor must generate the following result for that selection set:
325
325
```
326
326
327
327
328
- ### Error handling
328
+ ### Nullability
329
329
330
- If an error occurs when resolving a field, it should be treated as though
331
- the field returned null, and an error must be added to the "errors" list
332
- in the response .
330
+ If the result of resolving a field is ` null ` (either because the function to
331
+ resolve the field returned ` null ` or because an error occurred), and that
332
+ field is of a ` Non-Null ` type, then a field error is thrown .
333
333
334
+ If the field was ` null ` because of an error which has already been added to the
335
+ ` "errors" ` list in the response, the ` "errors" ` list must not be
336
+ further affected.
334
337
335
- ### Nullability
338
+ If the field resolve function returned ` null ` , the resulting field error must be
339
+ added to the ` "errors" ` list in the response.
336
340
337
- If the result of resolving a field is null (either because the function to
338
- resolve the field returned null or because an error occurred), and that
339
- field is marked as being non-null in the type system, then the result
340
- of evaluating the entire field set that contains this field is now
341
- null.
342
341
343
- If the field was null because of an error, then the error has already been
344
- logged, and the "errors" list in the response must not be affected.
342
+ ### Error handling
343
+
344
+ If an error occurs when resolving a field, it should be treated as though
345
+ the field returned ` null ` , and an error must be added to the ` "errors" ` list
346
+ in the response.
347
+
348
+ However, if the type of that field is of a ` Non-Null ` type, since the field
349
+ cannot be ` null ` the error is propogated to be dealt with by the parent field.
345
350
346
- If the field resolution function returned null, and the field was non-null,
347
- then no error has been logged, so an appropriate error must be added to
348
- the "errors" list.
351
+ If all fields from the root of the request to the source of the error return
352
+ ` Non-Null ` types, then the ` "data" ` entry in the response should be ` null ` .
0 commit comments