You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Starlette docs indicate that I should import an "async executor" a la:
from graphql.execution.executors.asyncio import AsyncioExecutor
However this module graphql.execution.executors no longer seems to exist in graphql-core versions > 3.
How should one go about using graphql-core now (i.e. version 3+) with async executors? Or should I just use the core-legacy library? My async resolve_* queries are otherwise erroring as follows:
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/uvicorn/protocols/http/h11_impl.py", line 396, in run_asgi
result = await app(self.scope, self.receive, self.send)
File "/usr/local/lib/python3.9/site-packages/uvicorn/middleware/proxy_headers.py", line 45, in __call__
return await self.app(scope, receive, send)
File "/usr/local/lib/python3.9/site-packages/fastapi/applications.py", line 199, in __call__
await super().__call__(scope, receive, send)
File "/usr/local/lib/python3.9/site-packages/starlette/applications.py", line 111, in __call__
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.9/site-packages/starlette/middleware/errors.py", line 181, in __call__
raise exc from None
File "/usr/local/lib/python3.9/site-packages/starlette/middleware/errors.py", line 159, in __call__
await self.app(scope, receive, _send)
File "/usr/local/lib/python3.9/site-packages/starlette/exceptions.py", line 82, in __call__
raise exc from None
File "/usr/local/lib/python3.9/site-packages/starlette/exceptions.py", line 71, in __call__
await self.app(scope, receive, sender)
File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 566, in __call__
await route.handle(scope, receive, send)
File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 227, in handle
await self.app(scope, receive, send)
File "/usr/local/lib/python3.9/site-packages/starlette/graphql.py", line 52, in __call__
response = await self.handle_graphql(request)
File "/usr/local/lib/python3.9/site-packages/starlette/graphql.py", line 105, in handle_graphql
[format_graphql_error(err) for err in result.errors]
File "/usr/local/lib/python3.9/site-packages/starlette/graphql.py", line 105, in <listcomp>
[format_graphql_error(err) for err in result.errors]
TypeError: 'NoneType' object is not callable
The text was updated successfully, but these errors were encountered:
You should ask about this in the Starlette project. It seems Starlette supports only Graphene 2 which means GraphQL-Core 2 (legacy, not supported any more). The GraphQLApp class seems to be deprecated inside Starlette also.
The current GraphQL-core does not have have executors and uses async execution by default.
The Starlette docs indicate that I should import an "async executor" a la:
However this module
graphql.execution.executors
no longer seems to exist ingraphql-core
versions > 3.How should one go about using
graphql-core
now (i.e. version 3+) with async executors? Or should I just use thecore-legacy
library? My asyncresolve_*
queries are otherwise erroring as follows:The text was updated successfully, but these errors were encountered: