Skip to content

Edit: clarify errors occuring during selection set execution #438

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 1, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions spec/Section 6 -- Execution.md
Original file line number Diff line number Diff line change
Expand Up @@ -337,11 +337,22 @@ ExecuteSelectionSet(selectionSet, objectType, objectValue, variableValues):
Note: {resultMap} is ordered by which fields appear first in the query. This
is explained in greater detail in the Field Collection section below.

**Errors and Non-Null Fields**

If during {ExecuteSelectionSet()} a field with a non-null {fieldType} throws a
field error then that error must propagate to this entire selection set, either
resolving to {null} if allowed or further propagated to a parent field.

If this occurs, any sibling fields which have not yet executed or have not yet
yielded a value may be cancelled to avoid unnecessary work.

See the [Errors and Non-Nullability](#sec-Errors-and-Non-Nullability) section
of Field Execution for more about this behavior.

### Normal and Serial Execution

Normally the executor can execute the entries in a grouped field set in whatever
order it chooses (often in parallel). Because the resolution of fields other
order it chooses (normally in parallel). Because the resolution of fields other
than top-level mutation fields must always be side effect-free and idempotent,
the execution order must not affect the result, and hence the server has the
freedom to execute the field entries in whatever order it deems optimal.
Expand All @@ -364,7 +375,7 @@ chose (however of course `birthday` must be resolved before `month`, and
`address` before `street`).

When executing a mutation, the selections in the top most selection set will be
executed in serial order.
executed in serial order, starting with the first appearing field textually.

When executing a grouped field set serially, the executor must consider each entry
from the grouped field set in the order provided in the grouped field set. It must
Expand Down