Skip to content

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

Merged
andimarek merged 1 commit into
masterfrom
claude/fix-issue-3927-mrgkP
May 19, 2026
Merged

Validate constant directive values on variable definitions (#3927)#4271
andimarek merged 1 commit into
masterfrom
claude/fix-issue-3927-mrgkP

Conversation

@andimarek

Copy link
Copy Markdown
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

@bbakerman bbakerman left a comment

Copy link
Copy Markdown
Member

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

github-actions Bot commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

Test Report

Test Results

Java Version Total Passed Failed Errors Skipped
Java 11 5822 (+9 🟢) 5766 (+9 🟢) 0 (±0) 0 (±0) 56 (±0)
Java 17 5822 (+9 🟢) 5765 (+9 🟢) 0 (±0) 0 (±0) 57 (±0)
Java 21 5822 (+9 🟢) 5765 (+9 🟢) 0 (±0) 0 (±0) 57 (±0)
Java 25 5822 (+9 🟢) 5765 (+9 🟢) 0 (±0) 0 (±0) 57 (±0)
jcstress 32 (±0) 32 (±0) 0 (±0) 0 (±0) 0 (±0)
Total 23320 (+36 🟢) 23093 (+36 🟢) 0 (±0) 0 (±0) 227 (±0)

Code Coverage (Java 25)

Metric Covered Missed Coverage vs Master
Lines 29494 3131 90.4% ±0.0%
Branches 8654 1534 84.9% ±0.0%
Methods 7881 1210 86.7% ±0.0%

Changed Class Coverage (1 class)

Class Line Branch Method
g.v.OperationValidator ±0.0% +0.1% 🟢 ±0.0%

Full HTML report: build artifact jacoco-html-report

Updated: 2026-05-19 02:12:08 UTC

@github-actions

Copy link
Copy Markdown
Contributor

Hello, this pull request has been inactive for 60 days, so we're marking it as stale. If you would like to continue working on this pull request, please make an update within the next 30 days, or we'll close the pull request.

@github-actions github-actions Bot added the Stale label May 19, 2026
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
@andimarek andimarek force-pushed the claude/fix-issue-3927-mrgkP branch from 50cf5e2 to 90cd5d9 Compare May 19, 2026 02:02
@andimarek andimarek merged commit b46b764 into master May 19, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants