← ClaudeAtlas

graphqllisted

GraphQL API design. Covers schema, queries, mutations, and resolvers. Use when building or consuming GraphQL APIs. USE WHEN: user mentions "GraphQL", "schema definition", "resolvers", "mutations", "queries", "DataLoader", "N+1 problem", asks about "how to design GraphQL API", "GraphQL schema", "GraphQL authentication", "GraphQL pagination", "Apollo Server" DO NOT USE FOR: REST APIs - use `rest-api` instead; tRPC - use `trpc` instead; GraphQL code generation - use `graphql-codegen` instead
claude-dev-suite/claude-dev-suite · ★ 33 · API & Backend · score 80
Install: claude install-skill claude-dev-suite/claude-dev-suite
# GraphQL Core Knowledge > **Deep Knowledge**: Use `mcp__documentation__fetch_docs` with technology: `graphql` for comprehensive documentation. ## Schema Definition ```graphql type User { id: ID! name: String! email: String! posts: [Post!]! createdAt: DateTime! } type Post { id: ID! title: String! content: String author: User! published: Boolean! } type Query { user(id: ID!): User users(limit: Int, offset: Int): [User!]! post(id: ID!): Post } type Mutation { createUser(input: CreateUserInput!): User! updateUser(id: ID!, input: UpdateUserInput!): User! deleteUser(id: ID!): Boolean! } input CreateUserInput { name: String! email: String! } ``` ## Resolvers ```typescript const resolvers = { Query: { user: (_, { id }, context) => { return context.db.users.findUnique({ where: { id } }); }, users: (_, { limit, offset }, context) => { return context.db.users.findMany({ take: limit, skip: offset }); }, }, Mutation: { createUser: (_, { input }, context) => { return context.db.users.create({ data: input }); }, }, User: { posts: (parent, _, context) => { return context.db.posts.findMany({ where: { authorId: parent.id } }); }, }, }; ``` ## Queries ```graphql query GetUser($id: ID!) { user(id: $id) { id name email posts { title published } } } mutation CreateUser($input: CreateUserInput!) { createUser(input: $input) { id name }