0
I’ve been looking into using a DataLoader in Django to optimise Graphene resolvers. I have been having trouble finding a working example of this as it requires multi threading. Based on what I can tell, there is no longer a way to specify executors in the latest versions of GraphQL in python. Does anyone have a working setup as an example?
I was following the example below, and everytime I use async
for my resolvers, I get:
RuntimeError: There is no current event loop in thread 'ThreadPoolExecutor-1_0'.
Which I think makes sense because GraphQL is using a sync
executor by default (I stand corrected). I got this example from: https://docs.graphene-python.org/en/latest/execution/dataloader/
|