graphene icon indicating copy to clipboard operation
graphene copied to clipboard

Application-level asynchronous dataloading

Open tinducvo opened this issue 4 years ago • 0 comments

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

tinducvo avatar Oct 12 '21 14:10 tinducvo