mcpField
G
graphql-implementation

graphql-implementation

github.com/aj-geddesDevelopment373421 installsUpdated 34w ago
Repository

About graphql-implementation

A GraphQL implementation skill for developers designing and building APIs. It covers schema design, resolvers, error handling, and performance, with reference guides for Apollo Server and Graphene.

Key features

  1. 01Schema and type design
  2. 02Resolver and mutation patterns
  3. 03Error handling and validation
  4. 04Subscriptions and real-time data
  5. 05Performance and federation guidance

Use cases

  1. 01Designing a new GraphQL API
  2. 02Implementing resolvers and mutations
  3. 03Adding real-time subscriptions
  4. 04Optimizing API performance

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill graphql-implementation

After installing, type/graphql-implementationin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
error-handling.md
graphql-schema-design.md
nodejs-apollo-server-implementation.md
python-graphql-implementation-graphene.md
query-examples.md
scripts/
validate-api.sh
templates/
api-scaffold.yaml

Details

From the project README

GraphQL Implementation

Table of Contents

Overview

Implement GraphQL APIs with proper schema design, resolver patterns, error handling, and performance optimization for flexible client-server communication.

When to Use

  • Designing new GraphQL APIs
  • Creating GraphQL schemas and types
  • Implementing resolvers and mutations
  • Adding subscriptions for real-time data
  • Migrating from REST to GraphQL
  • Optimizing GraphQL performance

Quick Start

Minimal working example:

type User {
  id: ID!
  email: String!
  firstName: String!
  lastName: String!
  role: UserRole!
  posts: [Post!]!
  createdAt: DateTime!
  updatedAt: DateTime!
}

enum UserRole {
  ADMIN
  USER
  MODERATOR
}

type Post {
  id: ID!
  title: String!
  content: String!
  author: User!
  comments: [Comment!]!
  publishedAt: DateTime
  createdAt: DateTime!
// ... (see reference guides for full implementation)

Reference Guides

Detailed implementations in the references/ directory:

GuideContents
GraphQL Schema DesignGraphQL Schema Design
Node.js Apollo Server ImplementationNode.js Apollo Server Implementation
Python GraphQL Implementation (Graphene)Python GraphQL Implementation (Graphene)
Query ExamplesQuery Examples
Error HandlingError Handling

Best Practices

✅ DO
  • Use clear, descriptive field names
  • Design schemas around client needs
  • Implement proper error handling
  • Use input types for mutations
  • Add subscriptions for real-time data
  • Cache resolvers efficiently
  • Validate input data
  • Use federation for scalability
❌ DON'T
  • Over-nest queries deeply
  • Expose internal database IDs
  • Return sensitive data without authorization
  • Create overly complex schemas
  • Forget to handle null values
  • Ignore N+1 query problems
  • Skip error messages

Comments

Markdown supported