Skip to content

Commit

Permalink
remove the unnecessary clone of info
Browse files Browse the repository at this point in the history
  • Loading branch information
Slava committed Jun 10, 2016
1 parent 6301f5a commit 7a5be6a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/execution/execute.js
Original file line number Diff line number Diff line change
Expand Up @@ -813,15 +813,13 @@ function completeListValue(
const itemType = returnType.ofType;
let containsPromise = false;
const completedResults = result.map((item, index) => {
// No need to modify the info object containing the path,
// since from here on it is not ever accessed by resolver functions.
const childExePath = exePath.slice();
childExePath.push(index);

const childInfo = Object.assign({}, info, {
executionPath: childExePath
});

const completedItem = completeValueCatchingError(
exeContext, itemType, fieldASTs, childInfo, childExePath, item);
exeContext, itemType, fieldASTs, info, childExePath, item);

if (!containsPromise && isThenable(completedItem)) {
containsPromise = true;
Expand Down

0 comments on commit 7a5be6a

Please sign in to comment.