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 tests.example.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

graphene_django_query_optimizer-0.5.2.tar.gz (24.6 kB view hashes)

Uploaded Source

Built Distribution

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