Graphene-Django connects Django models and auth to Graphene so teams can expose GraphQL schemas inside Django projects.
Overview
Graphene-Django is a Python package that bridges the Graphene GraphQL stack with Django. It is built on top of Graphene and adds Django-specific helpers so developers can declare types and queries that map to ORM models.
Reported capabilities include generating GraphQL schema from models, hooking into Django authentication and permissions, filtering and pagination aligned with Django patterns, and compatibility with Django forms and validation. You add the app to installed applications, define schema objects in your apps, and mount the GraphQL endpoint in URL configuration.
Testing can use Django’s test client against GraphQL endpoints. Docs cover installation, schema design, queries, mutations, subscriptions, filtering, authorization middleware, and Relay-style tutorials for more advanced graphs.
Key features
- Django model GraphQL mapping
- Automatic schema generation helpers
- Auth and permission integration
- Query filtering support
- Django pagination hooks
- Form and validation alignment
- Relay tutorial path
- Django test client support
Use cases
- GraphQL APIs on Django backends
- Mobile or SPA clients over GraphQL
- Unified reads across Django models
- Gradual REST to GraphQL migration
- Filtered list endpoints in GraphQL