Implementing Offset‑Based Pagination in Apollo Client with InMemoryCache
Learn how to store each page of a list under a unique cache key and use fetchMore to append new results without reloading the whole dataset.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Learn how to store each page of a list under a unique cache key and use fetchMore to append new results without reloading the whole dataset.
fetchMore can return the correct page while the normalized cache renders duplicates or snaps back to page one. Here is how to tell which cache setting is responsible.
Stop mixing Redux with Apollo. Learn how to use InMemoryCache normalization for server data and Reactive Variables for local UI state to create a single source of truth.
Learn how to use Apollo Client's InMemoryCache to eliminate stale data through normalization, custom typePolicies, and direct cache manipulation.
Local State Management Apollo Client's Reactive Variables provide a mechanism to manage global client-side state outside of the normalized cache. Using makeVar , developers can create variables that trigger component re-renders via the useReactiveVar hook without requiring a remote GraphQL server or network requests. Persistence Constraints By design, Reacti
Apollo Client's InMemoryCache uses a cache-first fetch policy by default: when a query already has cached results, reads are served from the normalized store without contacting the server. The cache has no built-in time-to-live, so entries persist indefinitely until a mutation writes new data, refetchQueries runs, or entries are evicted. The goal is to keep
Preventing accidental public access Apollo Server exposes the GraphQL Playground UI and the introspection endpoint unless explicitly disabled. When a deployment is reachable over the internet, this default behavior can allow unauthenticated users to query the schema, discover sensitive fields, or execute costly operations. Developers typically rely on middle
When writing integration tests for an Apollo Server schema, the goal is to verify that resolver logic works alongside any custom Express middleware (such as request‑level logging, CORS handling, or rate‑limiting) without relying on production credentials or making real network calls. The createTestClient utility from @apollo/server/testing provides an in‑pro
I am configuring Apollo Client v3 InMemoryCache and need to know how cache identity is assigned when a normalized object has neither an id nor an _id field. The documented fallback chain suggests id first, then _id, then storage under the parent path only, but it is unclear whether a custom keyFields policy returning an empty array changes that fallback or p