Skip to content

Apply query token limit in Schema.validate#5668

Open
ydah wants to merge 1 commit into
rmosolgo:masterfrom
ydah:fix-schema-validate-max-query-string-tokens
Open

Apply query token limit in Schema.validate#5668
ydah wants to merge 1 commit into
rmosolgo:masterfrom
ydah:fix-schema-validate-max-query-string-tokens

Conversation

@ydah

@ydah ydah commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Schema.validate(string) parsed query strings without passing the schema's max_query_string_tokens setting. This allowed validation-only callers to bypass the configured token limit.

LimitedSchema.validate("{ value value }")
# Before => validation proceeds despite exceeding the token limit
# After => raises GraphQL::ParseError

This passes max_query_string_tokens to GraphQL.parse and adds regression coverage.

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