Skip to content
This repository has been archived by the owner on Apr 15, 2020. It is now read-only.

Commit

Permalink
perf(stitching): remove unnecessary map
Browse files Browse the repository at this point in the history
  • Loading branch information
yaacovCR committed Nov 4, 2019
1 parent 9e133c6 commit 22d5238
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/stitching/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {
GraphQLError,
ASTNode
} from 'graphql';
import { forEach } from 'iterall';

export let ERROR_SYMBOL: any;
if (
Expand Down Expand Up @@ -65,7 +66,9 @@ export function annotateWithChildrenErrors(object: any, childrenErrors: Readonly
byIndex[index] = current;
});

return object.map((item, index) => annotateWithChildrenErrors(item, byIndex[index]));
object.forEach((item, index) => annotateWithChildrenErrors(item, byIndex[index]));

return object;
}

object[ERROR_SYMBOL] = childrenErrors.map(error => {
Expand Down

0 comments on commit 22d5238

Please sign in to comment.