Using Cursor-Based Pagination in GraphQL to Avoid Offset Pitfalls
Learn how cursor-based pagination works in GraphQL, why it outperforms offset‑limit queries, and see a concrete Apollo Client example you can adapt.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Learn how cursor-based pagination works in GraphQL, why it outperforms offset‑limit queries, and see a concrete Apollo Client example you can adapt.
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.
Goal Configure a repeatable local development stack where Apollo Server runs in persisted query mode and Apollo Client sends requests through the persistedQueries link. Constraints The GraphQL specification does not mandate query persistence, so each implementation defines its own hash store and request lifecycle. Assuming Apollo Server 4.x and Apollo Client
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
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
Apollo Client's InMemoryCache utilizes typePolicies to define how incoming data is merged into the normalized store. When dealing with paginated lists or filtered result sets, the default merge behavior may not align with specific UI requirements for data retention or deduplication. The goal is to implement a custom merge function that prevents the overwriti