Skip to main content

Extensions for graphene-django

Project description

Graphene Django Extensions

Coverage Status GitHub Workflow Status PyPI GitHub GitHub Last Commit GitHub Issues Downloads Python Version

pip install graphene-django-extensions

Documentation: https://mrthearman.github.io/graphene-django-extensions/

Source Code: https://github.com/MrThearMan/graphene-django-extensions/

Contributing: https://github.com/MrThearMan/graphene-django-extensions/blob/main/CONTRIBUTING.md


Extensions for writing GraphQL schemas with the graphene-django library with less boilerplate.

The main features are:

  • A new ObjectType DjangoNode, which:

    • adds convenience methods for managing permissions for both the ObjectType and individual fields.
    • adds a hook for adding filtering to both single items and lists returned by the ObjectType.
    • adds convenience methods for creating Fields, ListFields, Nodes, and Connections for the ObjectType.
    • adds filterset filters automatically to ListFields created for the ObjectType.
    • automatically optimizes queries using graphene-django-query-optimizer.
  • A new MutationType DjangoMutation, which:

    • adds convenience methods for managing permissions.
    • adds create, update operation with serializers and delete operations with optional validation hook.
    • adds an option for custom model operations.
    • makes updates fully partial by default.
    • adds better error handling.
  • A new ModelSerializer NestingModelSerializer, which:

    • adds pre and post save handlers for creating or updating related entities from nested serializer fields, all within a single transaction to ensure atomicity.
    • adds better handling of constraint integrity errors by finding violation_error_message from the constraint.
    • adds get_or_default method for finding default values for field validation.
  • A new FilterSet ModelFilterSet, which:

    • changes the default filters for related fields to the custom IntChoiceFilter and IntMultipleChoiceFilter filters, which don't make database queries to check if the given primary keys for the filters actually correspond to existing rows for the database model.
    • adds a custom ordering filter automatically to all subclasses, with the default pk filter.
    • allows adding new ordering filters with the Meta.order_by attribute.
    • order_by fields are converted to enums for better autocompletion in GraphiQL.
    • allows combining multiple method filters with the Meta.combination_methods attribute.

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_extensions-0.2.15.tar.gz (37.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

graphene_django_extensions-0.2.15-py3-none-any.whl (46.9 kB view details)

Uploaded Python 3

File details

Details for the file graphene_django_extensions-0.2.15.tar.gz.

File metadata

  • Download URL: graphene_django_extensions-0.2.15.tar.gz
  • Upload date:
  • Size: 37.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.2 Linux/6.2.0-1019-azure

File hashes

Hashes for graphene_django_extensions-0.2.15.tar.gz
Algorithm Hash digest
SHA256 86eedb99d2e2f79e403a146ba39d367aee6afcb0d1928ad7035d6130057562b9
MD5 89aea639482199ed22b2ab5d224529cf
BLAKE2b-256 7d068c4e7dcd89037025a5a8c11a422e8b081db0a9c7ad870fe53b7d0fdac858

See more details on using hashes here.

File details

Details for the file graphene_django_extensions-0.2.15-py3-none-any.whl.

File metadata

File hashes

Hashes for graphene_django_extensions-0.2.15-py3-none-any.whl
Algorithm Hash digest
SHA256 b098ae53567c40c5a475e51b9796aa44f085eaff1d27cb1cf568aa2d57b48c31
MD5 81ae828a88dde6b5fce6aa37f9a4e9be
BLAKE2b-256 2cf69afa2a949c1c940747a806ae2972d3a551f72f94b355225520ad53222bf3

See more details on using hashes here.

Supported by

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