mcpField
G
graphql-architect

graphql-architect

github.com/shipshitdevDevelopment3978 installsUpdated today
Repository

About graphql-architect

graphql-architect is a skill for designing and reviewing GraphQL schemas and resolvers. It guides developers through contract design, authorization, performance, and client-impact checks.

Key features

  1. 01Inspect existing schema and resolver conventions
  2. 02Design explicit query and mutation contracts
  3. 03Separate resolver and service responsibilities
  4. 04Address batching and pagination performance
  5. 05Review authorization and client-impact risks

Use cases

  1. 01Plan a new GraphQL schema or module
  2. 02Design resolvers, mutations, and validation
  3. 03Reduce N+1 risk in nested list results

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/shipshitdev/skills --skill graphql-architect

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

Bundled filesplugin.json

Details

From the project README

GraphQL Architect

Design GraphQL APIs that are explicit, stable, and performant.

Use This Skill For

  • New GraphQL schemas or modules
  • Resolver and mutation design
  • Pagination, filtering, and search
  • N+1 reduction and batching
  • Authorization, validation, and error-shaping for GraphQL

Workflow

1. Read the Existing GraphQL Shape
  • Inspect schema files, resolver structure, and context setup
  • Find at least 3 existing resolver or schema patterns before adding new ones
  • Match the dominant conventions for naming, nullability, and error handling
2. Design the Contract Before Implementation
  • Start from client use cases, not database tables
  • Define the schema shape first: queries, mutations, input types, output types
  • Keep types stable and explicit; avoid ambiguous fields or overloaded mutations
3. Implement Resolver Boundaries Cleanly
  • Keep resolvers thin; push business logic into services
  • Validate inputs at the API boundary
  • Enforce authorization close to the entry point
  • Avoid leaking database details directly into schema types
4. Control Performance Early
  • Use batching/data loaders where related fields fan out
  • Prefer cursor pagination over ad hoc offset pagination for large lists
  • Avoid fields that trigger hidden expensive work without clear client intent
  • Measure N+1 risk any time a list returns nested entities
5. Verify Client Ergonomics
  • Field names should describe domain concepts, not storage details
  • Nullability must reflect real guarantees
  • Mutation results should return enough data for immediate UI updates
  • Errors should be consistent and actionable

Core Rules

  • Queries read; mutations change state
  • Input types and output types should be distinct
  • Keep mutation names verb-first and specific
  • Prefer explicit enums over magic strings
  • Add deprecation before removal when evolving schemas

Common Pitfalls

  • Catch-all mutations like updateThing
  • Returning giant nested objects by default
  • Resolver logic that talks directly to the database and the network in one layer
  • Hiding authorization failures behind nulls without a deliberate contract
  • Adding fields without thinking through cache keys or client churn

Output

When using this skill, produce:

  • Proposed schema/resolver changes
  • Notes on performance and authorization implications
  • Any migration or client-impact risks

Comments

Markdown supported