Caching Shopify GraphQL: A Practical Guide for Developers (opens in new tab)
TL;DR: GraphQL can't be cached by URL like REST. Cache by query + variables, layer your caches (client → edge → app → persisted queries), match TTLs to data volatility, and invalidate via webhooks. Never cache carts or customer-specific pricing. The Core Problem REST caching is URL-based. One endpoint = one cache entry. Easy. GraphQL uses a single endpoint for everything. The query body defines the response, so two requests to the same URL can return totally different data. URL-based caching ...
Read the original article