-
Notifications
You must be signed in to change notification settings - Fork 769
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dataloaders not working #1425
Comments
Could you provide links to the doc and examples you followed? I found this https://docs.graphene-python.org/en/latest/execution/dataloader/.
Apparently, you define an async resolver in a query. Looks like in order to properly run async resolvers in queries, one have to use It also looks like graphene-django only use The last example at https://docs.graphene-python.org/en/latest/execution/dataloader/ has async resolvers in |
So in other words, until |
Any updates? |
Data loaders that exist are not fully compatible with new versions of graphene and graphene-django. DjangoConnectionField doesn't seem to handle loaders correctly and instead return errors like: "Cannot return null for non-nullable field EmailNodeConnection.edges." So for now, data loaders will be disabled for this field type. Use graphql-sync-dataloaders to make other types of fields work with data loaders. Some GitHub issues for reference: - graphql-python/graphene-django#1394 - graphql-python/graphene-django#1263 - graphql-python/graphene-django#1425 Refs: HP-2082
Hi,
I have read the documentation around data loaders from your site, but I can't make them to work.
I followed exactly your examples but when I run the Query I get:
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
/Users/alexandrubese/Documents/work/banking_api/venv/lib/python3.10/site-packages/graphql/execution/execute.py:431: RuntimeWarning: coroutine 'Query.resolve_account' was never awaited
result = self.execute_field(
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
account_dataloader.py
schema.py
What am I doing wrong?
The text was updated successfully, but these errors were encountered: