Skip to content
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

Application-level asynchronous dataloading #1382

Open
tinducvo opened this issue Oct 12, 2021 · 0 comments
Open

Application-level asynchronous dataloading #1382

tinducvo opened this issue Oct 12, 2021 · 0 comments

Comments

@tinducvo
Copy link

Is your feature request related to a problem? Please describe.
I would like to be able to solve the N+1 problem on the application-layer. For dataloader components, there will be a one-to-one key-value result expectation, so I application layer is better than request layer.

The documentation shows an implementation with promises and synchronous syntax.

So right now, it seems like I could use:

  • synchronous function dataloading at the application/request level using promises => dataloader
  • asynchronous function dataloading at the request level with aiodataloader

Describe the solution you'd like
I would like synchronous function dataloading at the application layer. How are we supposed to hook into the event loop for that to happen? I could not find any example of this

Describe alternatives you've considered
I am proceeding at the request level for now, knowing it's not ideal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant