From 23461d4c1c0750536f5b00d8393fbe5d412bee44 Mon Sep 17 00:00:00 2001 From: Cameron Currey Date: Tue, 25 Jun 2024 12:03:33 -0600 Subject: [PATCH] Fix single non zeroth index resolving --- graphql_core_promise/execute/promise.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphql_core_promise/execute/promise.py b/graphql_core_promise/execute/promise.py index c5ae1a9..0054606 100644 --- a/graphql_core_promise/execute/promise.py +++ b/graphql_core_promise/execute/promise.py @@ -460,7 +460,7 @@ def on_one_resolved(result): # If there is only one index, avoid the overhead of parallelization. index = awaitable_indices[0] - return completed_results[0].then(on_one_resolved) + return completed_results[index].then(on_one_resolved) def on_all_resolve(results): for index, result in zip(awaitable_indices, results, strict=False):