graphql-api
Installation
SKILL.md
GraphQL API Patterns with Apollo Client
Core Principles
Define queries in .graphql files and wrap them in custom hooks. Use code generation for TypeScript types, organize by domain, compose with fragments, and handle errors with errorPolicy.
Why: GraphQL with Apollo Client provides type-safe server state management with automatic caching, request deduplication, and optimistic updates. Code generation ensures TypeScript types stay in sync with the backend schema, preventing runtime errors.
When to Use This Skill
Use these patterns when: