Skip to content

Handle SystemStackError in Execution::Next - #5705

Open
ydah wants to merge 1 commit into
rmosolgo:masterfrom
ydah:handle-execution-stack-errors
Open

Handle SystemStackError in Execution::Next#5705
ydah wants to merge 1 commit into
rmosolgo:masterfrom
ydah:handle-execution-stack-errors

Conversation

@ydah

@ydah ydah commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

This PR extends the execution-time SystemStackError handling added in #5683 to GraphQL::Execution::Next.

Previously, GraphQL::Execution::Next allowed a SystemStackError raised during execution to escape from GraphQL::Execution::Runner. This bypassed Schema#query_stack_error and returned an unhandled application error instead of GraphQL-Ruby's configured stack error response.

The runner now delegates execution-time stack errors to Schema#query_stack_error, matching the legacy interpreter behavior.

@rmosolgo

Copy link
Copy Markdown
Owner

I'm open to including this, but I'm curious, did you encounter it in normal use? Do you mind sharing a backtrace?

Execution::Next doesn't use recursive method calls like the old runtime did, so I'd be surprised if it raised these from its own execution.

If these come from application code, would rescue_from ... work to handle them?

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