Skip to content

Honor the default execution engine in Query#result - #5742

Merged
rmosolgo merged 1 commit into
rmosolgo:masterfrom
ydah:fix-query-result-default-execution
Sep 16, 2026
Merged

rmosolgo merged 1 commit into
rmosolgo:masterfrom
ydah:fix-query-result-default-execution

Conversation

@ydah

@ydah ydah commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Schema.execute honors default_execution_next, but Query#result always invokes Execution::Interpreter directly.

As a result, manually constructed queries ignore a schema configured with:

use GraphQL::Execution::Next, as_default: true

This is especially visible with Next-specific field resolution such as resolve_static: or resolve_batch:. The same query succeeds through Schema.execute, but GraphQL::Query.new(...).result runs the legacy resolver path and raises a missing-method error.

This PR makes Query#result select Execution::Next or Execution::Interpreter from the schema's default execution setting. Schemas that retain the legacy default continue using the interpreter.

@rmosolgo rmosolgo added this to the 2.6.11 milestone Sep 16, 2026
@rmosolgo

Copy link
Copy Markdown
Owner

Thanks!

@rmosolgo
rmosolgo merged commit 66f8a08 into rmosolgo:master Sep 16, 2026
11 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants