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

graphene_django_query_optimizer-0.10.12.tar.gz (27.1 kB view details)

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for graphene_django_query_optimizer-0.10.12.tar.gz
Algorithm Hash digest
SHA256 4c34216de5e672ccc6b4d1fd3a2cf3659dbca29a6cf94084799fec91734f905c
MD5 f30747024b502bdde64bf7d16785f07c
BLAKE2b-256 fd0d9dd734cb97383715548819d079b6e6ac508802f12413d5caf6f68c3d55f3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for graphene_django_query_optimizer-0.10.12-py3-none-any.whl
Algorithm Hash digest
SHA256 0de04e21c3034d6b3e29a2a007d6f21b46ac9a34e3299d9bab6b115ab063fefd
MD5 73e9dc360e7bc134fc067a5f34108da4
BLAKE2b-256 974210f43744aea98f9c47801218629f6c5d6b829f4696d9d4d1034f6f8b1dfe

See more details on using hashes here.

Supported by

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