graphql-python / graphql-python/graphene-django

Async Support

Open
#1,257 2 comments 0 reactions 0 assignees View on GitHub
🐛bug
Dominant language
Python
Stars
4.4k
Forks
760
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.