graphql-schema
GraphQL queries, mutations, and code generation patterns. Use when creating GraphQL operations, working with Apollo Client, or generating types.
npx skills add sickn33/agentic-awesome-skills --skill graphql-schema --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# GraphQL Schema Patterns ## When to Use Use this skill when you need graphQL queries, mutations, and code generation patterns. Use when creating GraphQL operations, working with Apollo Client, or generating types. ## 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 ``` src/ ├── components/ │ └── ItemList/ │ ├── ItemList.tsx │ ├── GetItems.gql # Query definition │ └── GetItems.generated.ts # Auto-generated (don't edit) └── graphql/ └── mutations/ └── CreateItem.gql # Shared mutations ``` ## Creating a Query ### Step 1: Create .gql file ```graphql # src/components/ItemList/GetItems.gql query GetItems($limit: Int, $offset: Int) { items(limit: $limit, offset: $offset) { id name description createdAt } } ``` ### Step 2: Run codegen ```bash npm run gql:typegen ``` ### Step 3: Import and use generated hook ```typescript import { useGetItemsQuery } from './GetItems.generated'; const ItemList = () => { const { data, loading, error, refetch } = useGetItemsQuery({ variables: { limit: 20,
- When to Use
- Core Rules
- 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 3: Use with REQUIRED error handling
- Mutation UI Requirements
- Query Options
- Fetch Policies
- Common Options
- Optimistic Updates
npm run gql:typegen Generate types from .gql files Download schema + generate types npm run sync-types
What does the graphql-schema skill do?
GraphQL queries, mutations, and code generation patterns. Use when creating GraphQL operations, working with Apollo Client, or generating types.
How do I install it?
Run `npx skills add sickn33/agentic-awesome-skills --skill graphql-schema --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From sickn33/agentic-awesome-skills, a repository with 44,414 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.