Extensions for graphene-django
Project description
Graphene Django Extensions
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,updateoperation with serializers anddeleteoperations 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_messagefrom the constraint. - adds
get_or_defaultmethod for finding default values for field validation.
-
A new FilterSet
ModelFilterSet, which:- changes the default filters for related fields to the custom
IntChoiceFilterandIntMultipleChoiceFilterfilters, 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
pkfilter. - allows adding new ordering filters with the
Meta.order_byattribute. order_byfields are converted to enums for better autocompletion in GraphiQL.- allows combining multiple method filters with the
Meta.combination_methodsattribute.
- changes the default filters for related fields to the custom
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file graphene_django_extensions-0.4.9.tar.gz.
File metadata
- Download URL: graphene_django_extensions-0.4.9.tar.gz
- Upload date:
- Size: 42.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.7 Linux/6.5.0-1025-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d39284f150c40682128f6187e60a81a9debfb434c9472e49dcac78deaabc6b0f
|
|
| MD5 |
6ab352b50d534a3fdb59537d0a914ba4
|
|
| BLAKE2b-256 |
0dae4054e7eb40ca6873af54409e2a8ad7e96135572a59fc700abe219f4337b9
|
File details
Details for the file graphene_django_extensions-0.4.9-py3-none-any.whl.
File metadata
- Download URL: graphene_django_extensions-0.4.9-py3-none-any.whl
- Upload date:
- Size: 53.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.7 Linux/6.5.0-1025-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
859dbcc8c6e24c6b7c928df70f2a7af61f36d2291169338979b7dd36f07ae10c
|
|
| MD5 |
3da73a11fc30f3c4ae8ce12063778c66
|
|
| BLAKE2b-256 |
607e4432525259cdfb4860689e8b2e40d053f706b5726db7534ad6130923895b
|