Skip to content
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

Add custom GraphQL error attributes #506

Merged
merged 3 commits into from
May 30, 2017

Conversation

sav007
Copy link
Contributor

@sav007 sav007 commented May 27, 2017

Some implementations of GraphQL server extends generic Error type and include custom attributes.
One example is https://docs.scaphold.io/errors/ where error can be:

{
  "data":{"loginUser":null},
  "errors":[{
    "message":"Could not find a user with that username",
    "locations":[{"line":1,"column":53}],
    "path":["loginUser"],
    "name":"GraphQLError"}
  ]}

Some implementations of GraphQL server extends generic Error type and include custom attributes.
One example is https://docs.scaphold.io/errors/ where error can be:
```
{
  "data":{"loginUser":null},
  "errors":[{
    "message":"Could not find a user with that username",
    "locations":[{"line":1,"column":53}],
    "path":["loginUser"],
    "name":"GraphQLError"}
  ]}
```
@sav007 sav007 merged commit a951d0f into apollographql:master May 30, 2017
@sav007 sav007 deleted the feature/error-custom-attributes branch May 30, 2017 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants