X Tutup
Skip to content

Validate constant directive values on variable definitions (#3927)#4271

Open
andimarek wants to merge 5 commits intomasterfrom
claude/fix-issue-3927-mrgkP
Open

Validate constant directive values on variable definitions (#3927)#4271
andimarek wants to merge 5 commits intomasterfrom
claude/fix-issue-3927-mrgkP

Conversation

@andimarek
Copy link
Member

Per the GraphQL spec, directives applied to variable definitions accept
only constant values. Variable references like $v are not allowed in
directive arguments on variable definitions. For example, the query
query ($v:Int @dir(arg:$v)) { ... } should be rejected.

Add a new validation rule VARIABLES_NOT_ALLOWED_IN_DIRECTIVES_ON_VARIABLE_DEFINITIONS
that detects variable references inside directive arguments on variable
definitions and reports a VariableNotAllowed error.

https://claude.ai/code/session_01QH4Ce5Fs9zfEjktZV4j1i2

Per the GraphQL spec, directives applied to variable definitions accept
only constant values. Variable references like $v are not allowed in
directive arguments on variable definitions. For example, the query
`query ($v:Int @dir(arg:$v)) { ... }` should be rejected.

Add a new validation rule VARIABLES_NOT_ALLOWED_IN_DIRECTIVES_ON_VARIABLE_DEFINITIONS
that detects variable references inside directive arguments on variable
definitions and reports a VariableNotAllowed error.

https://claude.ai/code/session_01QH4Ce5Fs9zfEjktZV4j1i2
Copy link
Member

@bbakerman bbakerman left a comment

Choose a reason for hiding this comment

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

Thanks Claude

@graphql-java graphql-java deleted a comment from github-actions bot Mar 9, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2026

Test Report

Test Results

Java Version Total Passed Failed Errors Skipped
Java 11 5699 (+7 🟢) 5643 (+7 🟢) 0 (±0) 0 (±0) 56 (±0)
Java 17 5699 (+7 🟢) 5642 (+7 🟢) 0 (±0) 0 (±0) 57 (±0)
Java 21 5699 (+7 🟢) 5642 (+7 🟢) 0 (±0) 0 (±0) 57 (±0)
Java 25 5699 (+7 🟢) 5642 (+7 🟢) 0 (±0) 0 (±0) 57 (±0)
jcstress 32 (±0) 32 (±0) 0 (±0) 0 (±0) 0 (±0)
Total 22828 (+28 🟢) 22601 (+28 🟢) 0 (±0) 0 (±0) 227 (±0)

Code Coverage (Java 25)

Metric Covered Missed Coverage vs Master
Lines 28743 3122 90.2% ±0.0%
Branches 8359 1513 84.7% ±0.0%
Methods 7685 1222 86.3% ±0.0%

Changed Class Coverage (2 classes)

Class Line Branch Method
g.e.i.d.ExhaustedDataLoaderDispatchStrategy -1.2% 🔴 -7.7% 🔴 ±0.0%
g.v.OperationValidator -0.1% 🔴 -0.1% 🔴 ±0.0%

Full HTML report: build artifact jacoco-html-report

Updated: 2026-03-09 04:14:11 UTC

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.

3 participants

X Tutup