Building high-performance, type-safe GraphQL APIs with Strawberry and Django
summary
Strawberry + Django maps models to GraphQL types and auto-generates resolvers and input filters so code becomes plain dataclasses instead of manual serializers, while the integration introspects models to annotate fields and automatically applies .only/.select_related/.prefetch_related to querysets. It uses data loaders and async batching to avoid N+1 (e.g., 1 + 1000 user queries collapsing to a few SQL queries), adds generated ordering/pagination and permission hooks, and exposes SQL logging and cursor pagination.
AI-written summary · about
chapters (11)
- 0:00Introduction and speaker background
- 2:33What is GraphQL and its benefits
- 5:45How Strawberry simplifies GraphQL
- 11:55Defining types and queries in Strawberry
- 14:04Integrating Strawberry with Django
- 21:39Automatic type generation in Django
- 23:31Filtering and ordering data
- 27:25Pagination and slicing results
- 29:55Security and field protection
- 34:40Solving N+1 query issues
- 37:37Q&A session
related talks
46mBuilding high-performance, type-safe GraphQL APIs with Strawberry and Django
02h 23mBuild a production ready GraphQL API using Python
26mDynamically Serving a GraphQL API with Custom Types at Runtime
31mA few myths about GraphQL
23mIntroduction to Django and GraphQL
27mGraphQL in Python and Django
22mA GraphQL Framework in Non-JS Servers
29mSwiss Army Django: Small Footprint ETL
