Skip to content

[RFC] Add error path to response #187

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

Closed
wants to merge 1 commit into from
Closed
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
6 changes: 6 additions & 0 deletions spec/Section 7 -- Response.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ locations, where each location is a map with the keys `line` and `column`, both
positive numbers starting from `1` which describe the beginning of an
associated syntax element.

If an error can be associated to a particular field in the GraphQL response, it
should contain an entry with the key `path` with a list of path segments
starting at the root of the response and ending with the field associated with
the error. Path segments that represent object fields should be strings, and
path segments that represent array indices should be 0-indexed integers.

GraphQL servers may provide additional entries to error as they choose to
produce more helpful or machine-readable errors, however future versions of the
spec may describe additional entries to errors.
Expand Down