Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

graphene-django-extensions

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphene-django-extensions

Extensions for graphene-django

  • 0.4.8
  • PyPI
  • Socket score

Maintainers
1

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.

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc