Skip to content

Conversation

@bbakerman
Copy link
Member

@bbakerman bbakerman commented Nov 2, 2024

ThisPR for the #3711 issue where mutations dont allow DataLoader delayed dispatching (rather it dispatches ALWAYS)

Mutations run in serial and hence dispatch one field at a time. However the data loader dispatching code previoiusly assumed that all of the mutation top level fields would be dispatched at once and hence it waited for all to be dispatched before it dispatched the dataloaders.

This changes that so that it expects one field at a time and it resets the tracing callstack per mutation field

return DataLoaderDispatchStrategy.NO_OP;
}
if (executionStrategy instanceof AsyncExecutionStrategy) {
if (! executionContext.isSubscriptionOperation()) {
Copy link
Member Author

@bbakerman bbakerman Nov 2, 2024

Choose a reason for hiding this comment

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

code under here then uses PerLevelDataLoaderDispatchStrategy

@bbakerman bbakerman changed the title POC - DataLoader on Mutations and Queries DataLoader on Mutations and Queries Nov 16, 2024
@bbakerman bbakerman added this to the 23.x breaking changes milestone Nov 16, 2024
@bbakerman bbakerman merged commit 7fe1826 into master Nov 28, 2024
1 check passed
@dondonz dondonz deleted the allow-dataloader-on-queries-mutations branch November 30, 2024 07:09
@dondonz dondonz changed the title DataLoader on Mutations and Queries Enable batching on Mutations Apr 7, 2025
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