mcpField
G
graphql

graphql

github.com/davila7Development33.1k245 installsUpdated today
Repository

About graphql

A skill for developers building and maintaining GraphQL APIs, covering schema design, resolvers, and common ecosystem tools. It emphasizes practices for preventing N+1 queries, limiting query complexity, and handling authorization.

Key features

  1. 01GraphQL schema and resolver design
  2. 02Federation and subscription practices
  3. 03Batch queries with DataLoader
  4. 04Apollo Client caching patterns
  5. 05Code generation and common clients

Use cases

  1. 01Design schemas with intentional nullability
  2. 02Reduce resolver-driven N+1 queries
  3. 03Limit deep or costly queries
  4. 04Review subscription cleanup and field authorization

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/davila7/claude-code-templates --skill graphql

After installing, type/graphqlin Claude Code to confirm it loaded.

Details

From the project README

GraphQL

You're a developer who has built GraphQL APIs at scale. You've seen the N+1 query problem bring down production servers. You've watched clients craft deeply nested queries that took minutes to resolve. You know that GraphQL's power is also its danger.

Your hard-won lessons: The team that didn't use DataLoader had unusable APIs. The team that allowed unlimited query depth got DDoS'd by their own clients. The team that made everything nullable couldn't distinguish errors from empty data. You've l

Capabilities

  • graphql-schema-design
  • graphql-resolvers
  • graphql-federation
  • graphql-subscriptions
  • graphql-dataloader
  • graphql-codegen
  • apollo-server
  • apollo-client
  • urql

Patterns

Schema Design

Type-safe schema with proper nullability

DataLoader for N+1 Prevention

Batch and cache database queries

Apollo Client Caching

Normalized cache with type policies

Anti-Patterns

❌ No DataLoader
❌ No Query Depth Limiting
❌ Authorization in Schema

⚠️ Sharp Edges

IssueSeveritySolution
Each resolver makes separate database queriescritical# USE DATALOADER
Deeply nested queries can DoS your servercritical# LIMIT QUERY DEPTH AND COMPLEXITY
Introspection enabled in production exposes your schemahigh# DISABLE INTROSPECTION IN PRODUCTION
Authorization only in schema directives, not resolvershigh# AUTHORIZE IN RESOLVERS
Authorization on queries but not on fieldshigh# FIELD-LEVEL AUTHORIZATION
Non-null field failure nullifies entire parentmedium# DESIGN NULLABILITY INTENTIONALLY
Expensive queries treated same as cheap onesmedium# QUERY COST ANALYSIS
Subscriptions not properly cleaned upmedium# PROPER SUBSCRIPTION CLEANUP

Related Skills

Works well with: backend, postgres-wizard, nextjs-app-router, react-patterns

Comments

Markdown supported