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

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for graphene_django_query_optimizer-0.10.0.tar.gz
Algorithm Hash digest
SHA256 a64386ea2f295572b6e39ed2072a65b5b686e7879b69833aaaf9398cafc17477
MD5 77f75108bd5354d491241424a68438f3
BLAKE2b-256 9ab1fcef68d0a535aa715c8c618181d03f5a9f8343b93bc8dbec823aa17ad8cc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for graphene_django_query_optimizer-0.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 877e121ebfa5b33b81ccf3699a9f77dff629ab10277375e23f5891a7004ea12c
MD5 e01cef1ae76616261375e8e49ddfc85a
BLAKE2b-256 d6b7fb46571613d62c7e023a390f9cfcd3a1c80023b69bd2e28082dcdda294b0

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