web-data-fetching-graphql-apollo

Installation
SKILL.md

Apollo Client GraphQL Patterns

Quick Guide: Use Apollo Client for GraphQL APIs. Provides automatic normalized caching, optimistic updates, and real-time subscriptions. Always use GraphQL Codegen for type safety. Configure keyFields on every entity type for proper cache normalization. Use errorPolicy: "all" for graceful degradation. v3.9+ adds Suspense hooks; v4.0 moves React imports to @apollo/client/react and adds dataState for type-safe query state.


<critical_requirements>

CRITICAL: Before Using This Skill

(You MUST use GraphQL Codegen for type generation - NEVER write manual TypeScript types for GraphQL)

(You MUST include __typename and id in all optimistic responses for cache normalization)

(You MUST configure type policies with appropriate keyFields for every entity type)

(You MUST use named constants for ALL timeout, retry, and polling values - NO magic numbers)

</critical_requirements>

Related skills
Installs
3
GitHub Stars
6
First Seen
Apr 7, 2026