graphql-implementation

Design and implement GraphQL APIs with schema design, resolvers, queries, mutations, subscriptions, and best practices. Use when building GraphQL servers, designing schemas, or migrating from REST to GraphQL.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "graphql-implementation" with this command: npx skills add aj-geddes/useful-ai-prompts/aj-geddes-useful-ai-prompts-graphql-implementation

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

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

nodejs-express-server

No summary provided by upstream source.

Repository SourceNeeds Review
General

markdown-documentation

No summary provided by upstream source.

Repository SourceNeeds Review
General

rest-api-design

No summary provided by upstream source.

Repository SourceNeeds Review
General

architecture-diagrams

No summary provided by upstream source.

Repository SourceNeeds Review