Skip to content
This repository has been archived by the owner on Mar 7, 2022. It is now read-only.

Commit

Permalink
Partial changes from [PR ardatan#1074](ardatan#1074)
Browse files Browse the repository at this point in the history
Preserve source error extensions when merging schemas
  • Loading branch information
alexneamtu committed Apr 12, 2019
1 parent dacfd83 commit 054986b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/stitching/defaultMergedResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ const defaultMergedResolver: GraphQLFieldResolver<any, any> = (parent, args, con
const errorResult = getErrorsFromParent(parent, responseKey);

if (errorResult.kind === 'OWN') {
throw locatedError(new Error(errorResult.error.message), info.fieldNodes, responsePathAsArray(info.path));
throw locatedError(
errorResult.error.originalError || new Error(errorResult.error.message),
info.fieldNodes,
responsePathAsArray(info.path),
);
}

let result = parent[responseKey];
Expand Down

0 comments on commit 054986b

Please sign in to comment.