~/talk

How Prisma Solves the N+1 Problem in GraphQL Resolvers

Talkat Prisma Day 2020 · 2020-06-25..06-26· [graphql, databases]
slides:none on file

Explains that naive GraphQL resolvers issue N+1 SQL queries and shows concrete fixes using Prisma Client, the DataLoader pattern and hooking into process.nextTick batching so per-level queries become IN(...) lookups. Replacing raw SQL with Prisma cuts ~100 queries to ~5 and with a GraphQL→Prisma plugin down to 3 queries; local benchmarks move from ~2.5 req/s to ~12 req/s and up to ~50 req/s when fully optimized; example Rust query engine and an Ahmed community plugin are used and shown working.

AI-written summary · about

  1. 0:00Introduction
  2. 0:29What is the N+1 problem
  3. 4:50Naive resolver implementation
  4. 7:41Optimizing with Prisma
  5. 9:49Understanding DataLoader
  6. 14:32DataLoader in action
  7. 17:22Rust-based optimizations
  8. 20:54Benchmarking results
  9. 23:46Caching strategies
  10. 24:53Q&A session
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.