GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — make dataloader work inside defer blocks by andimarek · Pull Request #3980 · graphql-java/graphql-java

Conversation

@andimarek

@andimarek andimarek commented May 22, 2025

Copy link
Copy Markdown
Member

No description provided.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@andimarek
make dataloader work inside defer blocks
15f6952
@github-actions

github-actions Bot commented May 22, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Test Results

  316 files  ±    0    316 suites  ±0   2m 26s ⏱️ ±0s
4 656 tests +1 002  4 647 ✅ +998  9 💤 +4  0 ❌ ±0 
4 745 runs  +1 002  4 736 ✅ +998  9 💤 +4  0 ❌ ±0 

Results for commit a7cc794. ± Comparison against base commit 9ac3e63.

This pull request removes 192 and adds 1172 tests. Note that renamed tests count towards both.
	?
                __schema { types { fields { args { type { name fields { name }}}}}}
                __schema { types { fields { type { name fields { name }}}}}
                __schema { types { inputFields { type { inputFields { name }}}}}
                __schema { types { interfaces { fields { type { interfaces { name } } } } } }
                __schema { types { name} }
                __type(name : "t") { name }
                a1: __schema { types { name} }
                a1: __type(name : "t") { name }
                a2 :  __type(name : "t1") { name }
…
graphql.AssertTest ‑ assertFalse with different number of error args but false does not throw assertions [toRun: <graphql.AssertTest$__spock_feature_0_21prov0_closure23@6f3f0fae delegate=graphql.AssertTest@7a2e0858 owner=graphql.AssertTest@7a2e0858 thisObject=graphql.AssertTest@7a2e0858 resolveStrategy=0 directive=0 parameterTypes=[class java.lang.Object] maximumNumberOfParameters=1 bcw=null>, expectedMessage: error arg1, #0]
graphql.AssertTest ‑ assertFalse with different number of error args but false does not throw assertions [toRun: <graphql.AssertTest$__spock_feature_0_21prov0_closure24@63fdffcd delegate=graphql.AssertTest@7a2e0858 owner=graphql.AssertTest@7a2e0858 thisObject=graphql.AssertTest@7a2e0858 resolveStrategy=0 directive=0 parameterTypes=[class java.lang.Object] maximumNumberOfParameters=1 bcw=null>, expectedMessage: error arg1 arg2, #1]
graphql.AssertTest ‑ assertFalse with different number of error args but false does not throw assertions [toRun: <graphql.AssertTest$__spock_feature_0_21prov0_closure25@7428de63 delegate=graphql.AssertTest@7a2e0858 owner=graphql.AssertTest@7a2e0858 thisObject=graphql.AssertTest@7a2e0858 resolveStrategy=0 directive=0 parameterTypes=[class java.lang.Object] maximumNumberOfParameters=1 bcw=null>, expectedMessage: error arg1 arg2 arg3, #2]
graphql.AssertTest ‑ assertFalse with different number of error args throws assertions [toRun: <graphql.AssertTest$__spock_feature_0_20prov0_closure20@655523dd delegate=graphql.AssertTest@7a2e0858 owner=graphql.AssertTest@7a2e0858 thisObject=graphql.AssertTest@7a2e0858 resolveStrategy=0 directive=0 parameterTypes=[class java.lang.Object] maximumNumberOfParameters=1 bcw=null>, expectedMessage: error arg1, #0]
graphql.AssertTest ‑ assertFalse with different number of error args throws assertions [toRun: <graphql.AssertTest$__spock_feature_0_20prov0_closure21@6f7e336b delegate=graphql.AssertTest@7a2e0858 owner=graphql.AssertTest@7a2e0858 thisObject=graphql.AssertTest@7a2e0858 resolveStrategy=0 directive=0 parameterTypes=[class java.lang.Object] maximumNumberOfParameters=1 bcw=null>, expectedMessage: error arg1 arg2, #1]
graphql.AssertTest ‑ assertFalse with different number of error args throws assertions [toRun: <graphql.AssertTest$__spock_feature_0_20prov0_closure22@3a2b2322 delegate=graphql.AssertTest@7a2e0858 owner=graphql.AssertTest@7a2e0858 thisObject=graphql.AssertTest@7a2e0858 resolveStrategy=0 directive=0 parameterTypes=[class java.lang.Object] maximumNumberOfParameters=1 bcw=null>, expectedMessage: error arg1 arg2 arg3, #2]
graphql.AssertTest ‑ assertNotNull with different number of  error args throws assertions [toRun: <graphql.AssertTest$__spock_feature_0_5prov0_closure3@60e21209 delegate=graphql.AssertTest@7a2e0858 owner=graphql.AssertTest@7a2e0858 thisObject=graphql.AssertTest@7a2e0858 resolveStrategy=0 directive=0 parameterTypes=[class java.lang.Object] maximumNumberOfParameters=1 bcw=null>, expectedMessage: error arg1, #0]
graphql.AssertTest ‑ assertNotNull with different number of  error args throws assertions [toRun: <graphql.AssertTest$__spock_feature_0_5prov0_closure4@35835fa delegate=graphql.AssertTest@7a2e0858 owner=graphql.AssertTest@7a2e0858 thisObject=graphql.AssertTest@7a2e0858 resolveStrategy=0 directive=0 parameterTypes=[class java.lang.Object] maximumNumberOfParameters=1 bcw=null>, expectedMessage: error arg1 arg2, #1]
graphql.AssertTest ‑ assertNotNull with different number of  error args throws assertions [toRun: <graphql.AssertTest$__spock_feature_0_5prov0_closure5@4dafba3e delegate=graphql.AssertTest@7a2e0858 owner=graphql.AssertTest@7a2e0858 thisObject=graphql.AssertTest@7a2e0858 resolveStrategy=0 directive=0 parameterTypes=[class java.lang.Object] maximumNumberOfParameters=1 bcw=null>, expectedMessage: error arg1 arg2 arg3, #2]
graphql.AssertTest ‑ assertNotNull with different number of error args with non null does not throw assertions [toRun: <graphql.AssertTest$__spock_feature_0_6prov0_closure6@15bc339 delegate=graphql.AssertTest@7a2e0858 owner=graphql.AssertTest@7a2e0858 thisObject=graphql.AssertTest@7a2e0858 resolveStrategy=0 directive=0 parameterTypes=[class java.lang.Object] maximumNumberOfParameters=1 bcw=null>, expectedMessage: error arg1, #0]
…
This pull request skips 4 tests.
graphql.GraphqlErrorHelperTest ‑ can handle custom extensions and custom error classification
graphql.GraphqlErrorHelperTest ‑ can handle custom extensions with classification
graphql.GraphqlErrorHelperTest ‑ can parse out a map and make an error
graphql.GraphqlErrorHelperTest ‑ can turn error classifications into extensions

♻️ This comment has been updated with latest results.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@andimarek andimarek mentioned this pull request May 22, 2025
makes the level notion more clear #3981
Closed
andimarek added 9 commits May 22, 2025 22:21
@andimarek
green tests
da6886a
@andimarek
update gradle wrapper validation
018248a
@andimarek
update gradle wrapper validation
9aaa118
@andimarek
Merge branch 'master' into defer-dataloader
e7e4c36
@andimarek
cleanup
386ce8f
@andimarek
more complex test
fcf7261
@andimarek
cleanup
17911d3
@andimarek
cleanup and docs
5c64ad4
@andimarek
cleanup
c8f4362
felipe-gdr
felipe-gdr reviewed May 23, 2025
View reviewed changes
Comment thread src/test/groovy/graphql/execution/instrumentation/dataloader/DeferWithDataLoaderTest.groovy Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/test/groovy/graphql/execution/incremental/IncrementalCallStateDeferTest.groovy Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/main/java/graphql/execution/incremental/DeferredCallContext.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

felipe-gdr
felipe-gdr reviewed May 23, 2025
View reviewed changes
Comment thread src/main/java/graphql/schema/DataFetchingEnvironmentImpl.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

andimarek added 4 commits May 23, 2025 11:30
@andimarek
testing
e0181e3
@andimarek
cleanup
f345f14
@andimarek
cleanup
c12be77
@andimarek
cleanup
aa206d7
@dondonz dondonz added this to the 25.x breaking changes milestone May 23, 2025
@andimarek andimarek mentioned this pull request May 23, 2025
Defer dataloader with profiler #3986
Closed
felipe-gdr
felipe-gdr reviewed May 25, 2025
View reviewed changes
Comment thread src/main/java/graphql/execution/incremental/DeferredExecutionSupport.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

felipe-gdr
felipe-gdr reviewed May 25, 2025
View reviewed changes
Comment thread ...in/java/graphql/execution/instrumentation/dataloader/PerLevelDataLoaderDispatchStrategy.java
* The expected field fetch count is accurate when all execute object calls happened
* The expected execute object count is accurate when all sub selections fetched
* are done in the previous level
* A general overview of teh tracked data:

@felipe-gdr felipe-gdr May 25, 2025

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

typo: "the"

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
felipe-gdr
felipe-gdr reviewed May 25, 2025
View reviewed changes
Comment thread ...in/java/graphql/execution/instrumentation/dataloader/PerLevelDataLoaderDispatchStrategy.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

felipe-gdr
felipe-gdr reviewed May 25, 2025
View reviewed changes
Comment thread ...in/java/graphql/execution/instrumentation/dataloader/PerLevelDataLoaderDispatchStrategy.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

felipe-gdr
felipe-gdr reviewed May 25, 2025
View reviewed changes
Comment thread ...in/java/graphql/execution/instrumentation/dataloader/PerLevelDataLoaderDispatchStrategy.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

felipe-gdr
felipe-gdr reviewed May 25, 2025
View reviewed changes
Comment thread src/test/groovy/graphql/execution/instrumentation/dataloader/BatchCompareDataFetchers.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

felipe-gdr
felipe-gdr approved these changes May 25, 2025
View reviewed changes
@andimarek
PR feedback
a7cc794
felipe-gdr
felipe-gdr approved these changes May 26, 2025
View reviewed changes
@andimarek
andimarek merged commit 6e9e023 into master May 26, 2025
@dondonz
dondonz deleted the defer-dataloader branch August 15, 2025 06:14
timward60 added a commit to timward60/graphql-java that referenced this pull request Feb 17, 2026
@timward60
Fix dataloader dispatch in @defer with multiple deferred fragments
54bb6c2
Use mergedFields.size() (per-fragment field count) instead of
deferredFields.size() (total across all fragments) when constructing
AlternativeCallContext. The inflated count prevented dispatch strategies
from ever triggering dispatch since each fragment only fetches its own
fields.

Fixes the bug introduced in graphql-java#3980.

Co-authored-by: Copilot <[email protected]>
This was referenced Feb 24, 2026
Dataloader dispatch never triggers inside @defer when multiple deferred fragments exist #4269
Closed
Fix dataloader dispatch in @defer when multiple deferred fragments exist #4270
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@felipe-gdr felipe-gdr felipe-gdr approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

25.x breaking changes

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@andimarek @felipe-gdr @dondonz
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.