-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Preserve the
extensions
property when pre-execution errors oc… (#3394)
Without this change, any `extensions` that are present on the `response` are not returned to the client when an error occurs in pre-execution stages, despite the fact that `extensions` are a perfectly acceptable property to be present when pre-execution errors occur[1]. (Note that `data` is not!) For example, if a user had added their own `extensions` property in the `willSendResponse` hook of a request pipeline API, it would have been removed by the previous implementation of `throwHttpGraphQLError` which did not receive, or accept `extensions`, since it explicitly only passed the `errors` property. This will all be greatly improved when we abstract this transport out! [1]: https://graphql.github.io/graphql-spec/June2018/#sec-Response-Format
- Loading branch information
Showing
3 changed files
with
67 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters