Identity and GraphQL: More Than You Want to Think About IDs
summary
Meta finds many types using incompatible ID schemes, some types even have three different IDs, which causes client cache collisions and overwrites. Using raw DB row IDs creates clashes, huge serialized IDs (up to 100 kilobyte IDs) blow up key value stores, and a single node ID mixes comparison and lookup. Solution: use type-prepended IDs, prefer UUIDs, and classify types as weak/strong/fetchable with a separate cacheKey for cheap comparisons. This reduces collisions and improves lookup performance while keeping older clients compatible.
AI-written summary · about
chapters (5)
- 0:00Introduction to identity
- 5:45Global Object Identification
- 12:10Weak strong and fetchable types
- 17:51Lessons from News Feed
- 20:04Designing identity systems
related talks
06mEnlist the Help of Your Schema for Caching!
25mGraphQL and caching - Why is it so hard, or is it?
24mGraphQL Clients
25mOptimizing GraphQL Applications
30mWhy GraphQL vs. Why not GraphQL
24mA GraphQL Survival Kit
32mFrom learning to thinking in GraphQL
37mScaling Schema Cardinality Constructing Types at Runtime
