Skip to content

Conversation

@trevorah
Copy link
Contributor

Elasticsearch records its index path and attaches it to errors. Its useful, but sadly that path property means that graphql-js assumes that an elasticsearch error is a GraphQLError, and so the index path gets leaked instead of the useful graphql query path.

The fix is to be a little bit stricter.

There is probably a better fix to recognise a GraphQLError across contexts, but this will at least improve the situation. Plus, the added tests should make any better solution easier to test.

@leebyron leebyron merged commit 997bd8f into graphql:master Nov 30, 2017
@leebyron
Copy link
Contributor

Nice, thanks for adding tests!

@trevorah trevorah deleted the prefer-grapql-errors branch November 30, 2017 22:07
@trevorah
Copy link
Contributor Author

@leebyron no worries, thanks for the awesome library!

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.

3 participants