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.5.tar.gz (27.6 kB view details)

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for graphene_django_query_optimizer-0.10.5.tar.gz
Algorithm Hash digest
SHA256 1bd40c9147c6b9be4b77762faa12a8ebaff2ed4bfad8289d3bf6e5be9ebea937
MD5 e3c04b2b5a6cdd5a04d60808a7ee9e7d
BLAKE2b-256 a5015b8c1412fea5af0db73d26d47491a13c49cf12e757a6ca465a75e9e2dfc7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for graphene_django_query_optimizer-0.10.5-py3-none-any.whl
Algorithm Hash digest
SHA256 3439697d4306a2461a5eadea37d7595c4bf5672cfe25838a03968a27acfc50f1
MD5 a00970b914775bfd97a724839b38e6c1
BLAKE2b-256 31b003da804b93d6ede3adbc88daaa204e3e8b15384a39c9cc95f3aba22900a4

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