Builds GraphQL APIs with schema design, resolvers, DataLoader for N+1 prevention, error handling, and optimizations using Apollo Server (JS) or Graphene (Python). Useful for flexible queries, REST migrations, or subscriptions.
How this skill is triggered — by the user, by Claude, or both
Slash command
/graphql-implementation:graphql-implementationThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Build GraphQL APIs with proper schema design, resolvers, and performance optimization.
Build GraphQL APIs with proper schema design, resolvers, and performance optimization.
type User {
id: ID!
name: String!
email: String!
posts(limit: Int = 10): [Post!]!
}
type Post {
id: ID!
title: String!
content: String!
author: User!
createdAt: DateTime!
}
type Query {
user(id: ID!): User
users(limit: Int, offset: Int): [User!]!
post(id: ID!): Post
}
type Mutation {
createUser(input: CreateUserInput!): User!
createPost(input: CreatePostInput!): Post!
}
input CreateUserInput {
name: String!
email: String!
}
const { ApolloServer } = require('@apollo/server');
const { startStandaloneServer } = require('@apollo/server/standalone');
const resolvers = {
Query: {
user: (_, { id }, { dataSources }) =>
dataSources.userAPI.getUser(id),
users: (_, { limit, offset }, { dataSources }) =>
dataSources.userAPI.getUsers({ limit, offset })
},
User: {
posts: (user, { limit }, { dataSources }) =>
dataSources.postAPI.getPostsByUser(user.id, limit)
},
Mutation: {
createUser: (_, { input }, { dataSources }) =>
dataSources.userAPI.createUser(input)
}
};
const server = new ApolloServer({ typeDefs, resolvers });
const DataLoader = require('dataloader');
const userLoader = new DataLoader(async (ids) => {
const users = await User.find({ _id: { $in: ids } });
return ids.map(id => users.find(u => u.id === id));
});
const { GraphQLError } = require('graphql');
throw new GraphQLError('User not found', {
extensions: { code: 'NOT_FOUND', argumentName: 'id' }
});
See references/python-graphene.md for complete Flask implementation with:
Do:
Don't:
npx claudepluginhub midego1/claude-skills --plugin graphql-implementationBuilds GraphQL APIs with schema design, resolvers, DataLoader for N+1 prevention, error handling, and optimizations using Apollo Server (JS) or Graphene (Python). Useful for flexible queries, REST migrations, or subscriptions.
Designs and implements GraphQL APIs with schema design, resolvers, mutations, subscriptions, and best practices. Covers Node.js Apollo Server and Python Graphene references.
Guides schema design, resolver patterns, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Activates on GraphQL, schema, resolver, Apollo, federation, DataLoader mentions.