Skip to content

Fix defer identity for repeated fragment spreads - #4537

Merged
bbakerman merged 1 commit into
graphql-java:masterfrom
gnawf:fix-defer-label-on-duplicate-fragment-spread
Nov 5, 2026
Merged

bbakerman merged 1 commit into
graphql-java:masterfrom
gnawf:fix-defer-label-on-duplicate-fragment-spread

Conversation

@gnawf

@gnawf gnawf commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Reuse deferred executions by directive AST identity within each parent field collection. Preserve separate response scopes and accumulate possible type coverage so fragment reuse does not produce false duplicate-label failures.

Reuse deferred executions by directive AST identity within each parent field collection. Preserve separate response scopes and accumulate possible type coverage so fragment reuse does not produce false duplicate-label failures.
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Test Report

Test Results

Java Version Total Passed Failed Errors Skipped
Java 17 6261 (+30 🟢) 6205 (+30 🟢) 0 (±0) 0 (±0) 56 (±0)
Java 21 6261 (+30 🟢) 6205 (+30 🟢) 0 (±0) 0 (±0) 56 (±0)
Java 25 6261 (+30 🟢) 6205 (+30 🟢) 0 (±0) 0 (±0) 56 (±0)
jcstress 32 (±0) 32 (±0) 0 (±0) 0 (±0) 0 (±0)
Total 18815 (+90 🟢) 18647 (+90 🟢) 0 (±0) 0 (±0) 168 (±0)

Code Coverage (Java 25)

Metric Covered Missed Coverage vs Master
Lines 30348 3079 90.8% ±0.0%
Branches 8968 1504 85.6% ±0.0%
Methods 8097 1187 87.2% ±0.0%

Changed Class Coverage (1 class)

Class Line Branch Method
g.n.ExecutableNormalizedOperationFactory
$ExecutableNormalizedOperationFactoryImpl
+0.1% 🟢 +2.5% 🟢 ±0.0%

Full HTML report: build artifact jacoco-html-report

Updated: 2026-11-04 23:56:05 UTC

@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.

FYI to any one else watching

This came up in Atlassian here we had a valid query using defer and fragments but got this error message

message": "Internal error: should never happen: Duplicated @defer labels are not allowed",

This fixes it so deferred execution objects are associated with the directives that led to them and re-used

@bbakerman
bbakerman merged commit dac6604 into graphql-java:master Nov 5, 2026
9 checks passed
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