apollo-client

Integrate Apollo Client for GraphQL data fetching across React, Next.js, React Router, and TanStack Start.

2|Updated Oct 28, 2022
One-click install
npx skills add https://github.com/jmanuelrosa/dotfiles --skill apollo-client-jmanuelrosa
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: apollo-client
Source: https://github.com/jmanuelrosa/dotfiles/tree/main/roles/ai/files/claude/skill-groups/graphql/apollo-client
Command: npx skills add https://github.com/jmanuelrosa/dotfiles --skill apollo-client-jmanuelrosa

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Helps developers implement and standardize Apollo Client integration across frameworks, enabling reliable GraphQL data fetching, caching, and state management in client-side and server-rendered apps.

Core Features & Use Cases

  • Framework-agnostic integration patterns for React, Next.js, React Router, and TanStack Start.
  • Caching strategies with InMemoryCache, type policies, fragment reading, and data masking.
  • Support for Suspense and non-Suspense data fetching, error handling, and GraphQL code generation for type safety.
  • End-to-end workflows for server-side and client components, with debugging tips and framework-specific patterns.

Quick Start

Install Apollo Client and follow the basic setup steps to run your first query.

Frequently Asked Questions about apollo-client

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up Apollo Client for GraphQL data fetching in React with TypeScript?

Apollo Client setup for React requires configuring the client instance, integrating the provider, and executing GraphQL operations using TypeScript-based queries. This skill provides framework-agnostic patterns for reliable data fetching and state management.

What is the best way to configure Apollo Client caching with InMemoryCache and type policies?

Configuring Apollo Client caching involves defining InMemoryCache type policies and reading fragments. This skill covers advanced cache patterns, fragment reading, and data masking strategies to ensure normalized state management across your application.

Does Apollo Client support Next.js SSR and server/client data sharing?

Apollo Client supports Next.js SSR workflows, including server-side rendering and server/client data sharing. This skill details end-to-end integration patterns for server and client components to enable seamless server-rendered GraphQL data fetching.

Can I use Apollo Client with React Router and TanStack Start?

Apollo Client integration spans React Router and TanStack Start frameworks. This skill provides specific workflows for these environments, ensuring consistent GraphQL data fetching, Suspense-compatible hooks, and state synchronization across different routing setups.

How do I handle Apollo Client code generation and Suspense hooks for type-safe queries?

Handling Apollo Client code generation involves generating TypeScript types for GraphQL operations to ensure type safety. This skill supports both Suspense and non-Suspense data fetching hooks, along with error handling workflows for robust query execution.