~/talk

The Joy and Agony of GraphQL

Talkat Balkan Ruby 2025 · 2025-04-25..04-26· [graphql, ruby]
links:none on file
slides:none on file

Describes running GraphQL as a Rails server against Postgres, shows N+1 queries appearing across nested fields and how lazy resolvers with fibers and Shopify’s graphql-batch lead to promise-y code and odd stack traces, then highlights GraphQL Ruby’s new data_load_record and data_load_association methods (added week-before) that batch loads cleanly. Presents an alternate solution that annotates types to let Rails preload associations instead of fibers, and a working Postgres trick using a Postgres LATERAL join to page 10 comments per pull request.

AI-written summary · about

  1. 0:00Introduction
  2. 1:03GraphQL basics
  3. 6:00Server-side GraphQL
  4. 9:51Rails implementation
  5. 13:42N+1 problem explained
  6. 17:12Solving N+1 with batching
  7. 24:23Fibers in Ruby
  8. 27:52Better solutions needed
  9. 32:28Rails preload workaround
  10. 33:09Has-many associations
  11. 36:19Pagination challenges
  12. 38:24Should you use GraphQL?
~/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.