Skip to main content

Automatically optimize SQL queries in Graphene-Django schemas.

Project description

Graphene Django Query Optimizer

Coverage Status GitHub Workflow Status PyPI GitHub GitHub Last Commit GitHub Issues Downloads Python Version

pip install graphene-django-query-optimizer

Documentation: https://mrthearman.github.io/graphene-django-query-optimizer/

Source Code: https://github.com/MrThearMan/graphene-django-query-optimizer/

Contributing: https://github.com/MrThearMan/graphene-django-query-optimizer/blob/main/CONTRIBUTING.md


Solve the GraphQL N+1 problem in graphene-django applications just by changing a few imports, automatically adding the appropriate only, select_related, and prefetch_related method calls to your QuerySets to fetch only what you need.

import graphene
from example_project.app.models import Example

from query_optimizer import DjangoObjectType, DjangoListField

class ExampleType(DjangoObjectType):
    class Meta:
        model = Example

class Query(graphene.ObjectType):
    all_examples = DjangoListField(ExampleType)

schema = graphene.Schema(query=Query)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

File details

Details for the file graphene_django_query_optimizer-0.10.1.tar.gz.

File metadata

File hashes

Hashes for graphene_django_query_optimizer-0.10.1.tar.gz
Algorithm Hash digest
SHA256 4a3414981cc795d2de024fbdd605367200c77f5b1a5d00e3cac90acf564c4904
MD5 7cd1fa6f3082ac148d3759eb7b3c1277
BLAKE2b-256 7b170c6bfacf29a6f213d7f2e090598923e372a233a6372396ff87ef6eecfd66

See more details on using hashes here.

File details

Details for the file graphene_django_query_optimizer-0.10.1-py3-none-any.whl.

File metadata

File hashes

Hashes for graphene_django_query_optimizer-0.10.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c8db457f51115d1c1e7e1a755363bee0f5301ba82521f2e45933de54534e185e
MD5 884568eb7a64aef4199ba72e20962ef8
BLAKE2b-256 c7c90bb057320f355fe648419310afe8f87a93fb9b53b3aade12930a5f1a5a18

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page