Skip to content

Fix unknown argument validation#1373

Open
zohnannor wants to merge 3 commits intographql-rust:masterfrom
zohnannor:fix-unknown-argument-validation
Open

Fix unknown argument validation#1373
zohnannor wants to merge 3 commits intographql-rust:masterfrom
zohnannor:fix-unknown-argument-validation

Conversation

@zohnannor
Copy link
Copy Markdown

@zohnannor zohnannor commented Apr 6, 2026

As per GraphQL S5.4.1 Argument Names,

Every argument provided to a field or directive must be defined in the set of possible arguments of that field or directive

But currently, juniper allows passing the arguments even if the field doesn't have any.

MRE: https://github.com/zohnannor/juniper-mre/tree/unknown-argument-no-error


This can be considered a breaking change, however, anyone relying on this was essentially abusing a bug unknowingly. Any way, should probably be mentioned in the changelog.

Copy link
Copy Markdown
Member

@LegNeato LegNeato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! Looks like CI is failing.

zohnannor and others added 2 commits April 29, 2026 21:37
Add regression coverage to ensure fields without declared arguments reject unknown arguments.
@zohnannor
Copy link
Copy Markdown
Author

You are right, I updated the old tests and added one for regression coverage.

@zohnannor zohnannor requested a review from LegNeato April 29, 2026 19:00
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