web-data-fetching-graphql-apollo
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
keyFieldson every entity type for proper cache normalization. UseerrorPolicy: "all"for graceful degradation. v3.9+ adds Suspense hooks; v4.0 moves React imports to@apollo/client/reactand addsdataStatefor 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>
More from agents-inc/skills
web-animation-css-animations
CSS Animation patterns - transitions, keyframes, scroll-driven animations, @property, GPU-accelerated properties, accessibility with prefers-reduced-motion
24web-animation-view-transitions
View Transitions API patterns - same-document transitions, cross-document MPA transitions, shared element animations, pseudo-element styling, accessibility
21web-testing-playwright-e2e
Playwright E2E testing patterns - test structure, Page Object Model, locator strategies, assertions, network mocking, visual regression, parallel execution, fixtures, and configuration
21web-styling-cva
Class Variance Authority - type-safe component variant styling with cva(), compound variants, and VariantProps
20web-animation-framer-motion
Motion (formerly Framer Motion) animation patterns - motion components, variants, gestures, layout animations, scroll-linked animations, accessibility
20web-i18n-next-intl
Type-safe i18n for Next.js App Router
19