Description
- What is the current behavior?
A simple query fails with a cryptic, seemingly asyncIO-related error:
{
"errors": [
{
"message": "There is no current event loop in thread 'Thread-2 (process_request_thread)'.",
"locations": [
{
"line": 34,
"column": 3
}
],
"path": [
"tests"
]
}
],
"data": {
"tests": null
}
}
- If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via
Link to reproduction repository: https://github.com/ewen-lbh/bug-report-django-graphene
Steps to reproduce:
-
git clone https://github.com/ewen-lbh/bug-report-django-graphene
-
cd bug-report-django-graphene
-
poetry install
(orpip install -r requirements.txt
) -
cd repro
-
poetry run python manage.py migrate && poetry run python manage.py runserver
-
Navigate to
127.0.0.1:8000/graphql
-
Try executing the following query:
{ tests { testing } }
- What is the expected behavior?
The query executes and returns its result
-
What is the motivation / use case for changing the behavior?
-
Please tell us about your environment:
- Version: graphene-django 3.0.0, django 4.1.5, python 3.10.9
- Platform: Manjaro Linux 5.19.17-2-MANJARO
-
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow)