Skip to content
This repository has been archived by the owner on Mar 20, 2023. It is now read-only.

Added resolver-returned value to the error object, plus further docum… #612

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

machineghost
Copy link

Documentation on expected error fields (#590)

@coveralls
Copy link

Coverage Status

Coverage remained the same at 99.76% when pulling 0cdd645 on machineghost:master into c609a6d on graphql:master.

- **message:** the error message
- **locations:** the location(s) in the Javascript code where the error ocurred
- **path:** the path within the returned results where the error occurred (eg. in a schema violation error, the path to the part of the results that violated the schema)
- **result:** the value which was returned by the resolver (if any)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@machineghost Don't think we have it on any of errors?


- **message:** the error message
- **locations:** the location(s) in the Javascript code where the error ocurred
- **path:** the path within the returned results where the error occurred (eg. in a schema violation error, the path to the part of the results that violated the schema)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean by schema violation error?

Although the fields on the error provided to this function may vary (based on the error type), they will typically include:

- **message:** the error message
- **locations:** the location(s) in the Javascript code where the error ocurred
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be locations inside query/SDL string not inside JS code

Base automatically changed from master to main February 10, 2021 15:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants