Declarative Fetching Libraries
summary
Compares three libraries by behavior not buzzwords: Apollo is GraphQL-only and does normalized caching so a mutation updates that record everywhere; SWR is tiny (SWR ~11KB) and agnostic—simple fetcher, stale-while-revalidate and focus-based revalidation built in; TanStack/React Query is the heaviest, most full-featured, supports REST/GraphQL, persistent cache, polling, infinite queries, devtools and render-batching/selectors that skip re-renders when unused fields change. Practical takeaway: pick Apollo for GraphQL normalization, TanStack for power, SWR for minimalism.
AI-written summary · about
chapters (11)
- 0:00Introduction and disclaimer
- 2:06Problem with boilerplate fetching
- 5:36Library overview and code basics
- 15:03Normalized caching explained
- 17:09Cache persistence options
- 18:11Polling and infinite queries
- 19:40Stale-while-revalidate strategy
- 20:42Fetch on focus behavior
- 21:45Render batching and selectors
- 23:31Dev tools comparison
- 24:34Audience experiences and Q&A
related talks
29mWrite Queries, Not Code
24mBuilding Reactive GraphQL Apps With Apollo
25mDemystifying GraphQL Clients
32mGraphQL-Anywhere - How GraphQL can improve your work across all of your stack
27mConsume GraphQL API with Apollo Client and React
22mReact State Management in a GraphQL Era
30mReact state management in a GraphQL era
23mA glimpse of GraphQL" Frontend developers’ life is easy now!"
