Skip to content

Conversation

@andimarek
Copy link
Member

This is port of the concept of a dispatch strategy from GraphQL Java to DataLoader itself.

It allows DataLoader to be used with an automatic dispatch strategy.

One DispatchStrategy which is based on the concept of being busy or not, is provided.

importorg.jspecify.annotations.NullMarked;

@NullMarked
@PublicApi
Copy link
Member

Choose a reason for hiding this comment

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

Is an SPI right? We would expect people to implement it?

Copy link
Member

Choose a reason for hiding this comment

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

@PublicSPI

CompletableFuture<V> result = loadImpl(key, keyContext);
options.getDispatchStrategy().loadCalled(this);
returnresult;
}
Copy link
Member

Choose a reason for hiding this comment

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

I feel like this should be in DataLoaderHelper which is really the guts of the code

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@andimarek@bbakerman@dondonz