graphene-django icon indicating copy to clipboard operation
graphene-django copied to clipboard

Async Support

Open wireva opened this issue 4 years ago • 2 comments

I have types that may be queried by a subscription as well as a query. For the type to work with the subscription it needs to be async, but if I make a query for a type with an async function in it, I get the following error:

graphql.error.located_error.GraphQLLocatedError: There is no current event loop in thread 'ThreadPoolExecutor-0_0'.

How do I execute all queries async?

EDIT: Or is there another way to solve such a problem?

wireva avatar Aug 27 '21 15:08 wireva

Hello, did you find a solution for this problem?

I need async resolver for using dataloaders my types.

nikitaKaner avatar Feb 02 '23 03:02 nikitaKaner

@niwla23 probably https://github.com/graphql-python/graphene-django/pull/1394 answers your question!

firaskafri avatar May 25 '23 22:05 firaskafri