--- id: graphene-django version: "3.2.3" license: MIT license_treatment: permissive maintenance: active --- # graphene-django — Graphene Django integration License: permissive · Maintenance: active · Downloads: 1.2M/mo ## What it is and what it does Graphene-Django is a bridge library that lets you build GraphQL APIs directly from your Django models without writing boilerplate schema definitions. It sits between Django and graphene, automatically converting your Django model structure into a queryable GraphQL schema and wiring in Django's built-in authentication, permissions, and form validation. You define your GraphQL types by wrapping Django models in DjangoObjectType classes, then expose them through a schema that graphene-django serves via a Django view. The library handles common tasks like filtering, pagination, and permission checks, so you spend less time on API plumbing and more on business logic. It's designed for developers already working in Django who want to add a GraphQL layer without learning a separate API framework. Use it for: - Expose existing Django models as a GraphQL API without rewriting model definitions or authentication logic - Build a modern frontend backed by a Django GraphQL endpoint with automatic schema introspection - Add filtering and pagination to Django querysets via GraphQL without custom resolver code - Migrate from REST to GraphQL incrementally by wrapping Django views and models in GraphQL types - Test GraphQL queries against Django models using the built-in GraphQLTestCase utility ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Graphene-Django bridges Django models and GraphQL APIs, automatically generating GraphQL schemas from Django models and integrating with Django's authentication, permissions, and validation systems. Yes. Graphene-Django is actively maintained, has no known vulnerabilities, and low install friction. It's the standard choice for adding GraphQL to Django projects. Install it if you're building a GraphQL API on top of Django models and want to avoid manual schema definition and boilerplate. ## Install pip install graphene-django uv add graphene-django poetry add graphene-django ## Installing graphene-django Before you install: Low install friction with a pure-Python wheel distribution. Actively maintained with recent commits and a large repository (4392 stars), indicating stable, community-backed development. License in practice: MIT license permits commercial and private use with minimal restrictions, making it suitable for most projects without licensing concerns. Quickstart: pip install graphene-django # In settings.py: INSTALLED_APPS = ['graphene_django'] GRAPHENE = {'SCHEMA': 'myapp.schema.schema'} # In schema.py: import graphene from graphene_django import DjangoObjectType class MyType(DjangoObjectType): class Meta: model = MyModel class Query(graphene.ObjectType): items = graphene.List(MyType) def resolve_items(self, info): return [] schema = graphene.Schema(query=Query) Requires Django to be installed and configured; GraphQL queries execute against your Django ORM, so database setup is a prerequisite. Verify before relying: - Performance characteristics under high query load or with large datasets - Compatibility with Django versions beyond 4.2 - Real-world scalability limits for complex nested queries ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 1.2M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags graphql api django, django graphql schema generation, graphene django integration, graphql django models, django graphql authentication, graphql relay django, django graphql filtering, graphql, django-integration, api-framework [View on SkillFed](https://skillfed.io/packages/graphene-django) · [View on PyPI](https://pypi.org/project/graphene-django/)