FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

New Exhaustion based data loader dispatching strategy by andimarek · Pull Request #4130 · graphql-java/graphql-java · GitHub

New Exhaustion based data loader dispatching strategy - #4130

Merged
andimarek merged 17 commits into
masterfrom
exhausted-dispatcher
Sep 28, 2025
Merged

New Exhaustion based data loader dispatching strategy#4130
andimarek merged 17 commits into
masterfrom
exhausted-dispatcher

Conversation

andimarek commented Sep 27, 2025
edited
Loading

Copy link
Copy Markdown
Member

This PR introduces an alternative data loader strategy that mimics in some way how the JS event loop Data Loader dispatcher works:

Instead of dispatching per Level (the current default) this strategy dispatches as soon as the engine is not "busy" anymore.

Busy here means specifically:

  • No sub selection is currently being fetched (on any level
  • No completion is currently executed
  • No Data Loader is currently dispatched

This also handles "chained data loaders": data loaders being used after another data loader inside one DataFetcher.

This new dispatching strategy can be enabled by setting

  graphQLContext.put(DataLoaderDispatchingContextKeys.ENABLE_DATA_LOADER_EXHAUSTED_DISPATCHING, true);

or

 GraphQL.unusualConfiguration(graphqlContext).dataloaderConfig().enableDataLoaderExhaustedDispatching(true)

github-actions Bot commented Sep 27, 2025
edited
Loading

Copy link
Copy Markdown
Contributor

Test Results

  325 files    325 suites   5m 7s ⏱️
5 189 tests 5 183 ✅ 6 💤 0 ❌
5 278 runs  5 272 ✅ 6 💤 0 ❌

Results for commit 6c9d267.

♻️ This comment has been updated with latest results.

andimarek added this to the 25.x breaking changes milestone Sep 27, 2025
andimarek merged commit 45a7d59 into master Sep 28, 2025
2 checks passed

}

default void startComplete(ExecutionStrategyParameters parameters) {

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

javadoc would be nice

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL