We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, I was trying out the query optimizer for my POC but even a simple query returned an error.
class ProductType(DjangoObjectType): class Meta: model = Product fields = ALL_FIELDS class Query(graphene.ObjectType): products = graphene.List(ProductType) def resolve_products(root, info): return gql_optimizer.query(Product.objects.all(), info)
{ "errors": [ { "message": "There is no current event loop in thread 'Thread-1 (process_request_thread)'.", "locations": [ { "line": 2, "column": 3 } ], "path": [ "products" ] } ], "data": { "products": null } }
And can you also please add an example of how to use it with the relay interface? When I tried it, it returned an error.
class ProductNode(DjangoObjectType): class Meta: model = Product filter_fields = "__all__" interfaces = (relay.Node,) class Query(graphene.ObjectType): products = DjangoFilterConnectionField(ProductNode) def resolve_products(root, info): return gql_optimizer.query(Product.objects.all(), info)
{ "errors": [ { "message": "Cannot return null for non-nullable field BrandNodeConnection.edges.", "locations": [ { "line": 3, "column": 5 } ], "path": [ "brands", "edges" ] } ], "data": { "brands": null } }
python==3.10.8
Django==4.1.5 graphene==3.2.1 graphene-django==3.0.0 graphene-django-optimizer==0.9.1
The text was updated successfully, but these errors were encountered:
Going from Django 3.2 to 4.2 this dependency breaks
Sorry, something went wrong.
No branches or pull requests
Hi, I was trying out the query optimizer for my POC but even a simple query returned an error.
And can you also please add an example of how to use it with the relay interface? When I tried it, it returned an error.
python==3.10.8
Django==4.1.5
graphene==3.2.1
graphene-django==3.0.0
graphene-django-optimizer==0.9.1
The text was updated successfully, but these errors were encountered: