-
-
Notifications
You must be signed in to change notification settings - Fork 816
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(errors): proxy all the errors
Previously, errors with invalid or missing paths were lost. See: #1641 https://github.com/apollographql/apollo-server/issues/4226 They are now saved! All correctly pathed errors are now inlined into the returned data by the CheckResultAndHandleErrors transform. The data is now annotated only with the remaining "unpathed" errors. These are then returned when possible if a null is encountered including the missing or potentially invalid path. Changes to error handling obviate some existing functions including getErrorsByPathSegment, getErrors in favor of getUnpathedErrors. Utility functions including slicedError and unreleased functions extendedError and unextendedError are no longer necessary.
- Loading branch information
Showing
12 changed files
with
269 additions
and
198 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export const ERROR_SYMBOL = Symbol('subschemaErrors'); | ||
export const UNPATHED_ERRORS_SYMBOL = Symbol('subschemaErrors'); | ||
export const OBJECT_SUBSCHEMA_SYMBOL = Symbol('initialSubschema'); | ||
export const FIELD_SUBSCHEMA_MAP_SYMBOL = Symbol('subschemaMap'); |
Oops, something went wrong.