Skip to content

Fix Query variables storage after max errors#5664

Open
ydah wants to merge 1 commit into
rmosolgo:masterfrom
ydah:fix-query-variables-max-errors-storage
Open

Fix Query variables storage after max errors#5664
ydah wants to merge 1 commit into
rmosolgo:masterfrom
ydah:fix-query-variables-max-errors-storage

Conversation

@ydah

@ydah ydah commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Fix GraphQL::Query::Variables so @storage remains a hash when variable validation stops after reaching validate_max_errors.

This is a narrow edge case: normal execution already returns validation errors, but callers may still inspect result.query.variables for logging, instrumentation, or error handling. Previously, the break inside each_with_object could make the whole expression return nil, causing delegated methods like length, to_h, or [] to raise NoMethodError.

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.

1 participant