graphene-django
Graphene Django integration
Decision gist · record as of 2026-08-14
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.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Django to be installed and configured; GraphQL queries execute against your Django ORM, so database setup is a prerequisite.
- 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 · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions, making it suitable for most projects without licensing concerns.
last release 2025-03-13 (519 days) · last repo commit 2026-06-24 · 4,392 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,188,603 downloads/mo, #4,244 on PyPI
Alternatives
Verify before relying
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)- 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
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 on this page. Verify before relying on it.
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
graphene-django on PyPI
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.
Requires Django to be installed and configured; GraphQL queries execute against your Django ORM, so database setup is a prerequisite.
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)
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 | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 6 packagesgraphenegraphql-coregraphql-relayDjangopromisetext-unidecode |
| Maintenance | Actively maintained 519 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,188,603 / month, #4,244 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableFramework :: DjangoFramework :: Django :: 3.2Framework :: Django :: 4.1Framework :: Django :: 4.2Intended Audience :: DevelopersProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Libraries |
Evidence: graphene_django-3.2.3-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “graphql api django”
- graphene-djangoGraphene-Django bridges Django models and GraphQL APIs, automatically…
- strawberry-graphql-djangoGenerates GraphQL types, queries, mutations, and resolvers…
- django-graphql-jwtAdds JSON Web Token (JWT) authentication to Django GraphQL APIs,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Libraries packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Provides parsing, arithmetic, and recurrence rule computation for dates and times, with timezone support and iCalendar RFC compliance.
Install it if you need to parse flexible date strings, compute relative dates, handle timezones, or work with recurrence rules—it's the de facto choice for these tasks.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
See also graphene · graphene-django-optimizer · graphene-file-upload · django-graphql-jwt · graphene-sqlalchemy · graphene-federation · strawberry-graphql-django · starlette-graphene3 · graphene-pydantic · Flask-GraphQL