Skip to content

Commit

Permalink
Use async def instead of the deprecated asyncio.coroutine
Browse files Browse the repository at this point in the history
  • Loading branch information
kiendang committed Feb 15, 2023
1 parent 929bbe6 commit 3617a1c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion graphql_server/flask/graphqlview.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
GraphiQLOptions,
render_graphiql_sync,
)
from graphql_server.utils import wrap_in_async


class GraphQLView(View):
Expand Down Expand Up @@ -126,7 +127,7 @@ async def get_async_execution_results():
*(
ex
if ex is not None and is_awaitable(ex)
else asyncio.coroutine(lambda: ex)()
else wrap_in_async(lambda: ex)()
for ex in execution_results
)
)
Expand Down

0 comments on commit 3617a1c

Please sign in to comment.