Caching GraphQL APIs
summary
Shows a production full query cache used on Shopify Storefront API that stores entire JSON responses in memcache, generating keys from shop/app, a normalized query hash, variables/operation hash and a version token for invalidation. Cacheability is opt in per GraphQL object type; about 85% cacheable requests are possible. Observed latencies fall from 500ms vs 70ms (miss vs hit). Notes tradeoffs: response size, cache storage, cardinality/evictions and tooling to opt types in.
AI-written summary · about
chapters (5)
related talks
25mGraphQL and caching - Why is it so hard, or is it?
37mCaching Deep Dive: The Ultimate Way To Speed up Your GraphQL API
24mHow to cache GraphQL queries at the edge
24mGraphQL Clients
23mHow to Edge Cache GraphQL APIs
24mCache for Commerce Performance and Optimization for High Volume Sales
49mUnlocking Performance with Response Caching
08mGetting started with GraphQL and caching on Next.js + Apollo + Layer0
