LaunchKit · 2026

Setup & Installation

npx skills add https://github.com/apollographql/skills --skill apollo-client
or paste the link and ask your coding assistant to install it
https://github.com/apollographql/skills/tree/main/skills/apollo-client
View on GitHub

What This Skill Does

A guide for building React applications with Apollo Client 4.x. Covers setting up the client, writing GraphQL queries and mutations with hooks, configuring cache policies, managing local state with reactive variables, and debugging performance issues.

Apollo Client's caching layer and hook-based API cut out most of the boilerplate you'd write to fetch, cache, and sync GraphQL data by hand in React.

When to use it

  • Adding a GraphQL query with loading and error states to a React component
  • Setting up cache policies for paginated lists or types without an id field
  • Writing an optimistic UI update for a mutation so the interface feels instant
  • Migrating from useQuery to useSuspenseQuery in a React 18+ app
  • Debugging why a query returns stale data from the normalized cache