Skip to content

Fix Query variables storage after max errors#5664

Merged
rmosolgo merged 1 commit into
rmosolgo:masterfrom
ydah:fix-query-variables-max-errors-storage
Jul 10, 2026
Merged

Fix Query variables storage after max errors#5664
rmosolgo merged 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.

@rmosolgo

Copy link
Copy Markdown
Owner

Thanks for taking care of this!

@rmosolgo rmosolgo merged commit c30cc15 into rmosolgo:master Jul 10, 2026
11 of 13 checks passed
@rmosolgo rmosolgo added this to the 2.6.6 milestone Jul 10, 2026
@ydah ydah deleted the fix-query-variables-max-errors-storage branch July 10, 2026 21:22
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