skillfed

strawberry-graphql-django

Strawberry GraphQL Django extension

strawberry-graphql-django v0.87.0 1.4M downloads/30d#3,999 on PyPI501
Permissive license MIT Active released

What it is and what it does

Strawberry GraphQL Django bridges Django models and GraphQL APIs by automatically generating GraphQL types, fields, and resolvers from your model definitions, eliminating boilerplate type definitions. The package includes built-in support for filtering, pagination (both offset and cursor-based), ordering, and Django's authentication and permission system. It also includes a query optimizer that automatically applies select_related and prefetch_related to prevent N+1 database queries.

You define your Django models normally, apply decorators, and the package generates a working GraphQL schema. It integrates with Django views (both sync and async), forms, and validation. The result is a GraphiQL interface at a URL you specify, ready to query your data with full type safety and optimized database access.

Use it for:

  • Build a GraphQL API from an existing Django application without rewriting model definitions.
  • Generate CRUD mutations automatically for Django models with built-in validation.
  • Implement filtering and pagination on GraphQL queries backed by Django ORM queries.
  • Prevent N+1 database queries in GraphQL resolvers using automatic query optimization.
  • Expose Django authentication and permission checks in a GraphQL schema.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Generates GraphQL types, queries, mutations, and resolvers automatically from Django models with full type safety, including filtering, pagination, ordering, and N+1 query prevention.

Yes. The package is actively maintained, has low install friction, carries a permissive license, and solves a real problem—bridging Django models to GraphQL without manual type duplication. It supports current Python versions and includes practical features (query optimization, pagination, permissions) that would otherwise require custom code. No known vulnerabilities. Suitable for both new GraphQL projects and retrofitting GraphQL onto existing Django applications.

Install

strawberry-graphql-django on PyPI

pip

pip install strawberry-graphql-django

uv

uv add strawberry-graphql-django

poetry

poetry add strawberry-graphql-django

Installing strawberry-graphql-django

Before you install

Low friction install with a pure-Python wheel. Actively maintained with a release 8 days old and recent commits; the project has 501 GitHub stars and supports current Python versions.

License in practice

MIT license (permissive) means you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.

Quickstart

pip install strawberry-graphql-django

from django.db import models

class Fruit(models.Model):
    name = models.CharField(max_length=20)

# In types.py, decorate your model with the integration
# Then import and use in your schema with strawberry-graphql

Requires Django 5.2 or 6.0 and Python 3.10 or later; asgiref and strawberry-graphql are runtime dependencies.

Verify before relying

  • Whether the automatic query optimizer works for all relationship types without manual tuning.
  • Performance characteristics when handling large datasets or deeply nested queries.
  • Compatibility with custom Django model managers or non-standard ORM patterns.
  • Exact syntax and import patterns for the decorator-based type generation workflow.

Package facts

License MIT (permissive)
Python support supports the current Python release (<4.0,>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 3 — asgiref, django, strawberry-graphql
Maintenance actively maintained — 8 days since the last release
Last repo commit
First released
Downloads 1,365,443/month — #3,999 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: strawberry_graphql_django-0.87.0-py3-none-any.whl

Keywords: api, django, graphql, strawberry-graphql

Environment :: Web EnvironmentFramework :: DjangoFramework :: Django :: 5.2Framework :: Django :: 6.0Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Tags

django graphql integrationautomatic graphql types from modelsdjango orm to graphqlgraphql api builder djangographql mutations django modelsdjango query optimization graphqlgraphql schema from django models
graphql-apidjango-integrationorm-bridge

More Dynamic Content packages