graphene icon indicating copy to clipboard operation
graphene copied to clipboard

Graphene 3 dataloader

Open wakemaster39 opened this issue 5 years ago • 2 comments

Current documentation for graphene on both the released site and the master branch have the promise based dataloader as the recommended method of using dataloaders.

Since promise is no longer included in the graphene and there is no thenable resolution in the chain anymore, how can dataloaders be executed in a synchronous application like flask? I found https://github.com/syrusakbary/aiodataloader which provided an async/await dataloader interface but flask doesn't support it out of the box.

I have hacked in a loop.run_until_complete() when executing a graphql request to try and enable dataloaders again but this seems suspect and that I am missing something.

wakemaster39 avatar Oct 07 '20 22:10 wakemaster39

Related to https://github.com/graphql-python/graphql-server/pull/66 as well 🚀

KingDarBoja avatar Oct 26 '20 23:10 KingDarBoja

@wakemaster39 docs have been updated here: https://github.com/graphql-python/graphene/pull/1190

jkimbo avatar Oct 27 '20 14:10 jkimbo