web-graphql
Installation
SKILL.md
Web GraphQL Skill
Version: 1.0 Stack: GraphQL + Apollo Server + Express + Prisma
GraphQL is deceptively easy to start and deceptively hard to maintain. Fat resolvers become untestable. Database-shaped schemas lock you into implementation details. No DataLoader means N+1 queries that silently degrade as data grows. The API works in development and collapses under real traffic — not because of scale, but because of patterns that don't survive it.
Schema-first design, thin resolvers, and structured errors prevent these problems before they compound.
Core Principles
- Schema-First Thinking — Design the schema for client needs, not database shape.
- Thin Resolvers — Resolvers orchestrate; business logic lives in services.
- Type Safety End-to-End — Prisma types flow through to GraphQL.
- N+1 Prevention — Use DataLoader for batching.
- Explicit Errors — Structured error responses, not vague messages.