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

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for graphene_django_query_optimizer-0.9.0.tar.gz
Algorithm Hash digest
SHA256 cdac33718d6af49eb2e847f02f0e93555def3adf66ba454b9e46d2492df48fbe
MD5 45263afa1826768103c177447310f433
BLAKE2b-256 a6ae055ca61286534ce04005777c6b17e67a8efce9dfbdebd5e2031ab1733a39

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for graphene_django_query_optimizer-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a47004392fc59f517147aebfb41e8fa91fde24abd2b1538d50fee84b7b271ab8
MD5 3da9330e77bfc790ce2aa648baf00b8e
BLAKE2b-256 1267b8df4cfb88c82109ea7f5891534f090a9dd3033fe1a10fb31eac60992de0

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