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.3.tar.gz.

File metadata

File hashes

Hashes for graphene_django_query_optimizer-0.10.3.tar.gz
Algorithm Hash digest
SHA256 fab49166c77eba9738cfe613580bfe487389cb10e889f39701e67095fba08442
MD5 017ddfb3131211480245d52e57cea931
BLAKE2b-256 cc53535922846ee969b7d8a738ab1715ec2beea12a5d86252bd61bc121fbcb0e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for graphene_django_query_optimizer-0.10.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0ae6d0e28a265234d2c08a606d231ef0a4fb0fc057358c6d45b42ec58126f811
MD5 b74b6b42a7f40f00305fd650f4336228
BLAKE2b-256 95844c0432bdb71f1542a9b3caccc332681183fd05df96b7d1b837102cc760b8

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