跳转到主要内容
此内容尚未提供您的语言版本,正在以英文显示。

Apollo Client

技能 已验证 活跃

Guide for building React applications with Apollo Client 4.x. Use this skill when: (1) setting up Apollo Client in a React project, (2) writing GraphQL queries or mutations with hooks, (3) configuring caching or cache policies, (4) managing local state with reactive variables, (5) troubleshooting Apollo Client errors or performance issues.

目的

To guide developers in building robust React applications efficiently using Apollo Client 4.x for GraphQL data management.

功能

  • Setting up Apollo Client in React projects
  • Writing GraphQL queries and mutations with hooks
  • Configuring caching and cache policies
  • Managing local state with reactive variables
  • Troubleshooting Apollo Client errors and performance

使用场景

  • When setting up Apollo Client in a new or existing React application.
  • When writing or optimizing GraphQL queries and mutations.
  • When configuring advanced caching strategies or local state.
  • When debugging Apollo Client related issues.

非目标

  • Using Apollo Client versions other than 4.x.
  • Setting up Apollo Server or other backend GraphQL technologies.
  • General React or JavaScript best practices outside of Apollo Client integration.

工作流

  1. Review skill documentation for Apollo Client 4.x.
  2. Identify specific use case (setup, query, mutation, caching, state, troubleshooting).
  3. Consult reference files for detailed integration guides and patterns.
  4. Implement recommended patterns and best practices in React application.
  5. Troubleshoot issues using provided guidance and Apollo DevTools.

实践

  • GraphQL Query Best Practices
  • GraphQL Mutation Best Practices
  • GraphQL Caching Best Practices
  • GraphQL Performance Optimization
  • React State Management

先决条件

  • React 18+ or React 19 (Suspense/RSC)
  • Node.js environment (for installation and development)
  • Existing Apollo Client 4.x setup or willingness to integrate

安装

请先添加 Marketplace

/plugin marketplace add apollographql/skills
/plugin install skills@apollo-marketplace

质量评分

已验证
99 /100
1 day ago 分析

信任信号

最近提交2 days ago
星标62
许可证MIT
状态
查看源代码

类似扩展

Setup Tailwind Typescript

100

Configure Tailwind CSS with TypeScript in a Next.js or React project. Covers installation, configuration, custom theme extensions, component patterns, and type-safe styling utilities. Use when adding Tailwind CSS to an existing TypeScript project, customizing the Tailwind theme for a project's design system, setting up type-safe component styling patterns, or configuring Tailwind plugins and extensions.

技能
pjt222

Sentry React Router Framework Sdk

100

Full Sentry SDK setup for React Router Framework mode. Use when asked to "add Sentry to React Router Framework", "install @sentry/react-router", or configure error monitoring, tracing, profiling, session replay, logs, or user feedback for a React Router v7 framework app.

技能
getsentry

React State Management

99

Master modern React state management with Redux Toolkit, Zustand, Jotai, and React Query. Use when setting up global state, managing server state, or choosing between state management solutions.

技能
wshobson

TanStack Query Skill

99

TanStack Query (React Query) for asynchronous server-state management with automatic caching, background refetching, optimistic updates, and pagination in React applications.

技能
bobmatnyc

API Design Patterns

100

Comprehensive API design patterns covering REST, GraphQL, gRPC, versioning, authentication, and modern API best practices

技能
bobmatnyc

Apollo Router

100

Version-aware guide for configuring and running Apollo Router for federated GraphQL supergraphs. Generates correct YAML for both Router v1.x and v2.x. Use this skill when: (1) setting up Apollo Router to run a supergraph, (2) configuring routing, headers, or CORS, (3) implementing custom plugins (Rhai scripts or coprocessors), (4) configuring telemetry (tracing, metrics, logging), (5) troubleshooting Router performance or connectivity issues.

技能
apollographql