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

Fix ApolloError bug and GraphQLError spec compliance #3408

Merged
merged 7 commits into from
Oct 15, 2019

Conversation

trevor-scheer
Copy link
Member

@trevor-scheer trevor-scheer commented Oct 14, 2019

This PR addresses a bug with ApolloError, as well as takes a step towards GraphQLError spec compliance.

Bug:
No longer allow the 'properties' (now extensions) object to overwrite the error message provided to the ApolloError constructor.

Spec complicance:
Move ApolloError towards GraphQLError spec compliance by using extensions rather than arbitrary properties on the class itself. Previous behavior is still supported, however it's now deprecated in favor of extensions. For more context, please read the large comment block associated with this PR's change set.

* No longer allow the 'properties' object to overwrite the
  error message provided to the ApolloError constructor

* Move ApolloError towards a GraphQLError spec compliance by using
extensions rather than arbitrary properties on the class itself.
Previous behavior is still supported, however it's now deprecated
in favor of extensions. For more context, please read the large
comment block associated with this commit.
@trevor-scheer trevor-scheer changed the title WIP: Initial exploration of ApolloError bug Fix ApolloError bug and GraphQLError spec compliance Oct 15, 2019
CHANGELOG.md Outdated Show resolved Hide resolved
packages/apollo-server-errors/src/index.ts Outdated Show resolved Hide resolved
@trevor-scheer trevor-scheer merged commit faba52c into master Oct 15, 2019
@trevor-scheer trevor-scheer deleted the trevor/AS-2917 branch October 15, 2019 20:45
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 22, 2023
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.

2 participants