-
Notifications
You must be signed in to change notification settings - Fork 294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to add raw batch loader instances to BatchLoaderRegistry alongside registration methods #870
Comments
…try alongside BiFunction registration methods. resolves spring-projects#870
…try alongside BiFunction registration methods. resolves spring-projects#870
…try alongside BiFunction registration methods. resolves spring-projects#870 & spring-projects#869
I've started implementing something that hopefully will be a good starting point for discussion around what I've proposed. I've tested it all locally and everything is working in this branch: main...bsara:spring-graphql:batch-loader-registry-updates. So, anyone should be able to pull it down and try it out. I don't have automated tests in place yet. I was hoping to get feedback and find out if these updates would even be considered before I went that far 😄. Here's what I've done:
|
…try alongside BiFunction registration methods. resolves spring-projects#870
…try alongside BiFunction registration methods. resolves spring-projects#870
…try alongside BiFunction registration methods. resolves spring-projects#870
@bsara thanks for raising this discussion and happy to provide feedback, but could you please take a step back and better explain the issues you are facing in a new comment below? I see you have a detailed draft in a branch, but we can't look at a solution without understanding the problems it is trying to solve. |
This comment has been minimized.
This comment has been minimized.
@bsara is totally right. Adding the changes he is proposing would help a lot to reuse existing DataLoader classes. Plus, we are facing the same issue with generic collections, we cannot register BatchLoaders because of the types problem. |
@rstoyanchev bump |
There are times when the registration methods for batch loaders are too limited or when using them creates code that is not in a preferred style for a project. Also, it is not possible to register a batch loader that returns a typed collection which itself is accurately typed when placed in the registry because we can't specify a value type with generics.
The text was updated successfully, but these errors were encountered: