graphql-expert · travisjneuman — Claude Code skill: what it does, how to install
graphql-expert — a skill for Claude Code guides GraphQL schema design, resolver implementation, and query optimization. Runs when drafting schemas or resolving N+1 bottlenecks.
MIT 132 installs ★ 114 updated 2026-11-10
npx skills add travisjneuman/.claude --skill graphql-expert -a claude-codeWhat graphql-expert does
This skill guides the agent through architecting GraphQL APIs. It enforces naming conventions, default nullability patterns, dedicated input types for mutations, and root type definitions across queries and subscriptions.
Modular reference files cover pagination, sorting, batch mutations, resolver context, and error formatting. Performance practices rely on DataLoader for N+1 query elimination, alongside depth limits and persisted queries. Client setup files also cover Apollo Client and React hooks.
All schemas are verified against an included checklist. It checks PascalCase naming, mutation payloads, and pagination across all list fields.
What it helps with
- design GraphQL schemas with consistent nullability and input types
- resolve N+1 query bottlenecks in resolvers using DataLoader
- set up context-based or directive-based authorization
- enforce query depth and complexity limits on incoming operations
Example prompts for the agent
- Design a GraphQL schema for a blog with paginated user posts
- Write resolvers using DataLoader to fix N+1 queries when fetching authors
- Review this GraphQL schema against the schema checklist
How to install graphql-expert
1Skills CLI (Vercel)
npx skills add travisjneuman/.claude --skill graphql-expert -a claude-code2Manually: put the files in place
~/.claude/skills/graphql-expert/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/graphql-expert/
1Skills CLI (Vercel)
npx skills add travisjneuman/.claude --skill graphql-expert -a codex2Manually: put the files in place
.agents/skills/graphql-expert/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add travisjneuman/.claude --skill graphql-expert -a cursor2Manually: put the files in place
.cursor/skills/graphql-expert/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install travisjneuman/.claude skills/graphql-expert2Manually: put the files in place
.github/skills/graphql-expert/SKILL.md1Skills CLI (Vercel)
npx skills add travisjneuman/.claude --skill graphql-expert -a gemini-cli2Platform CLI
gemini skills install https://github.com/travisjneuman/.claude --path skills/graphql-expertManually: put the files in place
.devin/skills/graphql-expert/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add travisjneuman/.claude --skill graphql-expert -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about graphql-expert
How to install graphql-expert in Claude Code?
Run npx skills add travisjneuman/.claude --skill graphql-expert -a claude-code.
What does graphql-expert do?
It guides coding agents on designing GraphQL schemas, building resolvers, handling errors, and configuring subscriptions.
What performance optimizations are covered?
The skill includes DataLoader implementations for N+1 queries, persisted queries, and controls for query depth and complexity.
Source text
SKILL.md · MIT
---
name: graphql-expert
description: GraphQL API design and implementation. Use when building GraphQL APIs, designing schemas, implementing resolvers, or optimizing GraphQL performance.
---
# GraphQL Expert
Comprehensive guide for designing and implementing GraphQL APIs.
## GraphQL Fundamentals
### What is GraphQL?
```
GraphQL is a query language for APIs that:
✓ Lets clients request exactly what they need
✓ Gets multiple resources in one request
✓ Uses a type system to describe data
✓ Provides introspection (self-documenting)
GraphQL vs REST:
┌─────────────────────────────────────────┐
│ REST: Multiple endpoints, fixed shapes │
│ GET /users/1 │
│ GET /users/1/posts │
│ GET /users/1/followers │
├─────────────────────────────────────────┤
│ GraphQL: Single endpoint, flexible │
│ POST /graphql │
│ query { user(id: 1) { │
│ name │
│ posts { title } │
│ followers { name } │
│ }} │
└─────────────────────────────────────────┘
```
---
## Schema Design
### Type System
```graphql
# Scalar Types (built-in)
String, Int, Float, Boolean, ID
# Custom Scalar
scalar DateTime
scalar JSON
# Object Type
type User {
id: ID!
email: String!
name: String
createdAt: DateTime!
posts: [Post!]!
}
# Enum
enum Role {
ADMIN
USER
GUEST
}
# Interface
interface Node {
id: ID!
}
type User implements Node {
id: ID!
# ... other fields
}
# Union
union SearchResult = User | Post | Comment
# Input Type (for mutations)
input CreateUserInput {
email: String!
name: String!
role: Role = USER
}
```
### Nullability
```graphql
# Field modifiers:
String # Nullable string
String! # Non-null string
[String] # Nullable list of nullable strings
[String!] # Nullable list of non-null strings
[String]! # Non-null list of nullable strings
[String!]! # Non-null list of non-null strings
# Best practice:
# - Make fields nullable by default
# - Use ! only when guaranteed non-null
# - Lists should usually be non-null: [Item!]!
```
### Schema Structure
```graphql
# Root Types
type Query {
# Read operations
user(id: ID!): User
users(limit: Int, offset: Int): [User!]!
me: User
}
type Mutation {
# Write operations
createUser(input: CreateUserInput!): User!
updateUser(id: ID!, input: UpdateUserInput!): User!
deleteUser(id: ID!): Boolean!
}
type Subscription {
# Real-time updates
userCreated: User!
messageReceived(roomId: ID!): Message!
}
```
---
## Reference files
Detailed material is in separate files so this overview stays short. Read only the file whose topic matches the task; each one is self-contained. Paths are relative to the folder that holds this `SKILL.md` (in the full toolkit install, `~/.claude/skills/graphql-expert/`).
| Topic | File | Covers |
| --- | --- | --- |
| Query Design | [`references/query-design.md`](references/query-design.md) | Basic Queries; Pagination; Filtering & Sorting |
| Mutations | [`references/mutations.md`](references/mutations.md) | Mutation Design; Batch Mutations |
| Resolvers | [`references/resolvers.md`](references/resolvers.md) | Basic Resolvers; Resolver Context |
| Performance Optimization | [`references/performance-optimization.md`](references/performance-optimization.md) | DataLoader (N+1 Solution); Query Complexity; Query Depth Limiting; Persisted Queries |
| Authentication & Authorization | [`references/authentication-and-authorization.md`](references/authentication-and-authorization.md) | Context-Based Auth; Directive-Based Auth |
| Error Handling | [`references/error-handling.md`](references/error-handling.md) | Error Types; Error Formatting |
| Subscriptions | [`references/subscriptions.md`](references/subscriptions.md) | Setup; With Filtering |
| Client Integration | [`references/client-integration.md`](references/client-integration.md) | Apollo Client Setup; React Hooks |
| Best Practices | [`references/best-practices.md`](references/best-practices.md) | DO:; DON'T: |
## Schema Checklist
- [ ] Types named descriptively (singular, PascalCase)
- [ ] Consistent nullability patterns
- [ ] Input types for all mutations
- [ ] Payload types with error handling
- [ ] Pagination for all lists
- [ ] Authentication/authorization considered
- [ ] Performance optimizations in place
© travisjneuman · MIT · travisjneuman/.claude
Similar skills
All skills for Backend and APIs →graphql-expert by other authors comes first.