agentleFS
codebygarvcodebygarv/Ai-skills/skills/development/graphql-schema-designer/SKILL.md

graphql-schema-designer

Skill26 starsChanged 4 months agoMITView on GitHub

Designs ergonomic, performant GraphQL schemas with Relay pagination, input validation, and N+1 prevention.

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Files
SKILL.md

Purpose

Design clean, evolvable, and performant GraphQL schemas following best practices for naming, mutations, connection pagination, error modeling, and batch resolution (DataLoader).

When to Use

  • Designing new GraphQL types, queries, and mutations.
  • Refactoring sprawling, unprincipled GraphQL schemas.
  • Preventing N+1 database queries and performance bottlenecks in nested resolvers.

What to Analyze

  1. Schema Design & Naming: Verb-noun conventions for mutations, scalar types, and deprecation strategies.
  2. Pagination Pattern: Relay Cursor Connections (first, after, edges, node, pageInfo).
  3. Mutation Design: Single input object argument (input: DoSomethingInput!), and return payload with errors union.
  4. N+1 Resolver Prevention: DataLoader batching strategies for related entity fields.
  5. Security & Complexity: Query depth limits and field complexity calculations.

Output Format

  • Schema Definition Language (SDL): Complete .graphql types, inputs, and payloads.
  • DataLoader Specification: Batching pattern needed for nested resolvers.
  • Usage Example: Sample query/mutation with expected JSON response.
  • Evolution Guide: How to safely deprecate and extend fields without breaking existing mobile/web clients.

Avoid

  • Mirroring database tables 1:1 into GraphQL types without domain abstraction.
  • Using offset-based pagination in public or high-throughput GraphQL APIs.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.