Skip to content

Commit 7a609a2

Browse files
authored
polish: remove misleading comment (graphql#3806)
We could not demonstrate via actual benchmarking that the tick reduction from awaiting a promise prior to returning it translates into real-world performance gains. See graphql#3796. In any case, the promise must be awaited (irrespective of performance) to allow the catch block to handle rejection errors. Simply returning `completed` would result in test failures.
1 parent 522f495 commit 7a609a2

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/execution/execute.ts

-2
Original file line numberDiff line numberDiff line change
@@ -942,8 +942,6 @@ async function completePromisedValue(
942942
asyncPayloadRecord,
943943
);
944944
if (isPromise(completed)) {
945-
// see: https://github.com/tc39/proposal-faster-promise-adoption
946-
// it is faster to await a promise prior to returning it from an async function
947945
completed = await completed;
948946
}
949947
return completed;

0 commit comments

Comments
 (0)