🌐 AI搜索 & 代理 主页
Skip to content

Conversation

@andimarek
Copy link
Member

@andimarek andimarek commented Sep 27, 2025

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

github-actions bot commented Sep 27, 2025

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 andimarek added this to the 25.x breaking changes milestone Sep 27, 2025
@andimarek andimarek merged commit 45a7d59 into master Sep 28, 2025
2 checks passed

}

default void startComplete(ExecutionStrategyParameters parameters) {
Copy link
Member

Choose a reason for hiding this comment

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

javadoc would be nice

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