Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
secondsky avatar

Graphql Implementation

  • 288 installs
  • 202 repo stars
  • Updated August 4, 2026
  • secondsky/claude-skills

graphql-implementation is an agent skill that builds production GraphQL APIs with schema design, resolvers, DataLoader batching, and error handling using Apollo or Graphene so developers migrating from REST can ship flex

About

graphql-implementation is a secondsky/claude-skills agent skill for designing and shipping production GraphQL APIs with schema-first contracts, typed resolvers, centralized GraphQLError handling, and performance guardrails. It supports Apollo Server in TypeScript and Graphene in Python, with DataLoader instances attached per request context to eliminate N+1 database round trips during nested field resolution. Developers reach for graphql-implementation when replacing multiple REST endpoints with one graph, adding real-time subscriptions for comments or notifications, or enforcing query depth and complexity limits on public schemas. The skill covers input validation at the execution layer, DTO mapping instead of exposing raw database rows, and migration patterns that reduce client over-fetching and under-fetching. It fits backend engineers standardizing error extensions, batching ORM calls, and subscription wiring across microservices or monolith API layers.

  • graphql-implementation

Graphql Implementation by the numbers

  • 288 all-time installs (skills.sh)
  • +11 installs in the week ending Jul 27, 2026 (Skillselion tracking)
  • Ranked #1,371 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/secondsky/claude-skills --skill graphql-implementation

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs288
repo stars202
Last updatedAugust 4, 2026
Repositorysecondsky/claude-skills

How do you build a production GraphQL API with Apollo?

Use graphql-implementation for development tasks

Who is it for?

Backend developers migrating REST services to GraphQL who need schema-first design, N+1 prevention, and typed error handling in Apollo or Graphene.

Skip if: Teams needing only REST OpenAPI design, client-side GraphQL query authoring, or GraphQL federation gateway operations without resolver implementation.

When should I use this skill?

The user builds a GraphQL API, migrates REST endpoints, adds subscriptions, or asks about DataLoader N+1 performance in Apollo or Graphene.

What you get

GraphQL schema files, typed resolvers, DataLoader batching setup, error extensions, and optional subscription endpoints.

  • GraphQL schema definition
  • Resolver implementations
  • DataLoader batching configuration

By the numbers

  • Supports Apollo TypeScript and Graphene Python GraphQL stacks
  • Covers schema design, resolvers, DataLoader batching, and subscriptions

Files

SKILL.mdMarkdownGitHub ↗

GraphQL Implementation

Build GraphQL APIs with proper schema design, resolvers, and performance optimization.

Schema Definition

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!
}

Apollo Server Setup

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 });

DataLoader for N+1 Prevention

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));
});

Error Handling

const { GraphQLError } = require('graphql');

throw new GraphQLError('User not found', {
  extensions: { code: 'NOT_FOUND', argumentName: 'id' }
});

Best Practices

  • Use DataLoader to batch queries
  • Implement query complexity limits
  • Design schema around client needs
  • Validate all inputs
  • Use descriptive naming conventions

Python Graphene

See references/python-graphene.md for complete Flask implementation with:

  • ObjectType definitions
  • Query and Mutation classes
  • Input types
  • Flask integration

Best Practices

Do:

  • Use DataLoader to batch queries
  • Implement query complexity limits
  • Design schema around client needs
  • Validate all inputs
  • Use descriptive naming conventions
  • Add subscriptions for real-time data

Don't:

  • Allow deeply nested queries without limits
  • Expose database internals
  • Ignore N+1 query problems
  • Return unauthorized data
  • Skip input validation

Related skills

How it compares

Choose graphql-implementation over generic API design skills when you need resolver-level DataLoader batching, GraphQLError extensions, and subscription wiring—not just OpenAPI REST patterns.

FAQ

Which GraphQL stacks does graphql-implementation support?

graphql-implementation targets Apollo Server for TypeScript services and Graphene for Python backends, providing schema, resolver, DataLoader, and subscription patterns for each stack.

How does graphql-implementation handle N+1 query problems?

graphql-implementation attaches DataLoader batching functions to the per-request GraphQL context so nested field resolvers batch database or ORM calls instead of issuing one query per child record.

When should teams use graphql-implementation over REST skills?

graphql-implementation fits flexible client-driven queries, nested relationship fetching, and real-time subscriptions where multiple REST endpoints cause over-fetching or require parallel round trips.

Backend & APIsbackendintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.