Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upDataLoaderRegistry inefficiency #1902
Comments
|
This makes a lot of sense. DataLoaderRegistry is in the https://github.com/graphql-java/java-dataloader code base. I have raised this issue there as well |
The
DataLoaderRegistryshould be request-scoped. That means that users are creating everyDataLoaderfor every request even if none or only one or two are used.Right now we would do something like:
We could probably fix this by making
DataLoaderReigstrya singleton and instead registering a function that would provide aDataLoader: