-
Notifications
You must be signed in to change notification settings - Fork 96
Closed
Description
See graphql-java/graphql-java#1902
benmccann commented 4 days ago
The DataLoaderRegistry should be request-scoped. That means that users are creating every DataLoader for every request even if none or only one or two are used.
Right now we would do something like:
dataLoaderRegistry.register("user", DataLoader.newDataLoader(userBatchLoader));
We could probably fix this by making DataLoaderReigstry a singleton and instead registering a function that would provide a DataLoader:
dataLoaderRegistry.register("user", () -> DataLoader.newDataLoader(userBatchLoaderProvider.get()));
KammererTob and Inego
Metadata
Metadata
Assignees
Labels
No labels