Agent skill · software engineering · aiskillstore
graphql-schema
GraphQL queries, mutations, and code generation patterns. Use when creating GraphQL operations, working with Apollo Client, or generating types.
Why this skill is useful
Provides specific GraphQL operation patterns and code generation practices that the AI wouldn't reliably generate on its own.
What it needs
Requires npm installed locally. About 3k tokens when loaded. Last updated 2026-08-07. 405 stars on the source repository.
What this skill does
GraphQL Schema Patterns Core Rules 1. NEVER inline gql literals - Create .gql files 2. ALWAYS run codegen after creating/modifying .gql files 3. ALWAYS add onError handler to mutations 4. Use generated hooks - Never write raw Apollo hooks File Structure Creating a Query Step 1: Create .gql file Step 2: Run codegen Step 3: Import and use generated hook Creating a Mutation Step 1: Create .gql file Step 2: Run codegen Step 3: Use with REQUIRED error handling Mutation UI Requirements CRITICAL: Every mutation trigger must: 1. Be disabled during mutation - Prevent double-clicks 2. Show loading state - Visual feedback 3. Have onError handler - User knows it failed 4. Show success feedback - User knows it worked Query Options Fetch Policies Policy Use When -------- ---------- cache-first Data rarely changes cache-and-network Want fast + fresh (default) network-only Always need latest no-cache Never cache (rare) Common Options Optimistic Updates For instant UI feedback: When NOT to Use Optimistic Updates Operations that can fail validation Operations with server-generated values Destructive operations (delete) Operations affecting other users Fragments For reusable field selections: Use in queries: Anti-Patterns Codegen Commands Integration with Other Skills react-ui-patterns: Loading/error/empty states for queries testing-patterns: Mock generated hooks in tests formik-patterns: Mutation submission patterns
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills aiskillstore/graphql-schema