~/talk

Building high-performance, type-safe GraphQL APIs with Strawberry and Django

Talkat PyCon Italia 2024 · 2024-05-22..05-25· [python, graphql]
slides:none on file

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

  1. 0:00Introduction and speaker background
  2. 2:33What is GraphQL and its benefits
  3. 5:45How Strawberry simplifies GraphQL
  4. 11:55Defining types and queries in Strawberry
  5. 14:04Integrating Strawberry with Django
  6. 21:39Automatic type generation in Django
  7. 23:31Filtering and ordering data
  8. 27:25Pagination and slicing results
  9. 29:55Security and field protection
  10. 34:40Solving N+1 query issues
  11. 37:37Q&A session
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.