Skip to content

Commit 7a5be6a

Browse files
committed
remove the unnecessary clone of info
1 parent 6301f5a commit 7a5be6a

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/execution/execute.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -813,15 +813,13 @@ function completeListValue(
813813
const itemType = returnType.ofType;
814814
let containsPromise = false;
815815
const completedResults = result.map((item, index) => {
816+
// No need to modify the info object containing the path,
817+
// since from here on it is not ever accessed by resolver functions.
816818
const childExePath = exePath.slice();
817819
childExePath.push(index);
818820

819-
const childInfo = Object.assign({}, info, {
820-
executionPath: childExePath
821-
});
822-
823821
const completedItem = completeValueCatchingError(
824-
exeContext, itemType, fieldASTs, childInfo, childExePath, item);
822+
exeContext, itemType, fieldASTs, info, childExePath, item);
825823

826824
if (!containsPromise && isThenable(completedItem)) {
827825
containsPromise = true;

0 commit comments

Comments
 (0)