Caching your GraphQL data graph
summary
Explains how Apollo Kotlin implements a normalized cache that flattens nested GraphQL responses into record maps keyed by IDs, with both an in-memory layer and a SQL normalized cache that can be chained for fast reads then persistence and network fallback. Shows codegen rebuilding typed models from records, live watchers using coroutines to update UI on cache mutations, and recommends adding unique IDs in schema and queries. Mentions one-line offline support, work on pagination and data-age, and an incubating library for trying the features.
AI-written summary · about
chapters (12)
- 0:00Introduction and speakers
- 0:27What is GraphQL
- 4:19Challenges with GraphQL caching
- 8:12Normalized cache solution
- 11:22Type safety with Apollo Kotlin
- 12:29Apollo Kotlin overview
- 13:34Using normalized cache in code
- 14:58Benefits of normalized cache
- 15:40Mutations and UI updates
- 17:46Unidirectional data flow
- 18:29Key conclusions and IDs
- 19:10Cache improvements and resources
related talks
20mCaching your data graph with Apollo Kotlin
16mLightning Talk: Next-Generation GraphQL Cache Management in Your Android and iOS Apps
07mCache me if you can: Wayfair's secret to snappier apps
24mGraphQL Clients
08mFine-tuning Apollo Client's normalized cache
21mOffline and reactive apps with GraphQL
37mCaching Deep Dive: The Ultimate Way To Speed up Your GraphQL API
25mGraphQL and caching - Why is it so hard, or is it?
