Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
jeffallan avatar

Graphql Architect

  • 2.9k installs
  • 10.8k repo stars
  • Updated May 20, 2026
  • jeffallan/claude-skills

graphql-architect is a Jeffallan skill for GraphQL schema design, Apollo Federation, DataLoader resolvers, subscriptions, and query security optimization.

About

GraphQL Architect is a senior schema-design skill for distributed graph architectures covering Apollo Federation 2.5 plus, subscriptions, and performance optimization. The six-step workflow maps business domains to types, designs schema with federation directives, validates composition including key entity resolution, implements DataLoader-backed resolvers, secures with depth and complexity limits plus field-level auth, and tunes caching with persisted queries and monitoring. Constraints require schema-first design, nullable field patterns, DataLoader batching, documented types, camelCase naming, and example queries for every operation while forbidding N+1 queries, skipped depth limits, REST patterns in GraphQL, null on non-nullable fields, and hardcoded authorization. Federation examples show Product key fields across products and reviews subgraphs with external and shareable directives. Resolver examples instantiate per-request DataLoader maps in context to batch user lookups and preserve key order. Reference files load on demand for schema design, resolvers, federation, subscriptions, security, and REST migration topics. Related skills include api-designer, microservices-archit.

  • Six-step workflow from domain modeling through federation validation, resolvers, security, and optimization.
  • Apollo Federation 2.5+ with key, external, and shareable directive examples across subgraphs.
  • Per-request DataLoader context pattern prevents N+1 user lookup queries in resolvers.
  • MUST rules enforce query complexity analysis, depth limiting, and DTO-style field exposure.
  • Progressive reference files for schema design, subscriptions, security, and REST migration.

Graphql Architect by the numbers

  • 2,910 all-time installs (skills.sh)
  • +86 installs in the week ending Jul 28, 2026 (Skillselion tracking)
  • Ranked #191 of 4,386 Backend & APIs skills by installs in the Skillselion catalog
  • Security screen: MEDIUM risk (skills.sh audit)
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
At a glance

graphql-architect capabilities & compatibility

Capabilities
schema first graphql type system and federation · subgraph composition validation with key entity · dataloader resolver patterns for batching and n+ · query depth, complexity analysis, and field leve · progressive reference loading for subscriptions
Use cases
api development · database · security audit
From the docs

What graphql-architect says it does

Use DataLoader for batching and caching
SKILL.md
Create N+1 query problems
SKILL.md
npx skills add https://github.com/jeffallan/claude-skills --skill graphql-architect

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs2.9k
repo stars10.8k
Security audit3 / 3 scanners passed
Last updatedMay 20, 2026
Repositoryjeffallan/claude-skills

How do I design a federated GraphQL API with correct entity keys, N+1-safe resolvers, and production query complexity guardrails?

Design GraphQL schemas with Apollo Federation 2.5+, DataLoader resolvers, subscriptions, query complexity limits, and REST migration patterns.

Who is it for?

Developers implementing Apollo Federation subgraphs, GraphQL subscriptions, or migrating REST endpoints to a typed graph.

Skip if: Skip for REST-only APIs without GraphQL, pure frontend UI work, or simple CRUD with no federation requirements.

When should I use this skill?

User mentions GraphQL schema design, Apollo Federation, DataLoader, GraphQL subscriptions, or Apollo Server architecture.

What you get

Composed federated schema with validated key directives, DataLoader resolvers, depth and complexity limits, and documented example operations.

  • federated GraphQL SDL schemas
  • DataLoader resolver implementations
  • query complexity and depth limit configuration

By the numbers

  • Examples use Apollo Federation v2.5 @link directive imports

Files

SKILL.mdMarkdownGitHub ↗

GraphQL Architect

Senior GraphQL architect specializing in schema design and distributed graph architectures with deep expertise in Apollo Federation 2.5+, GraphQL subscriptions, and performance optimization.

Core Workflow

1. Domain Modeling - Map business domains to GraphQL type system 2. Design Schema - Create types, interfaces, unions with federation directives 3. Validate Schema - Run schema composition check; confirm all @key entities resolve correctly

  • _If composition fails:_ review entity @key directives, check for missing or mismatched type definitions across subgraphs, resolve any @external field inconsistencies, then re-run composition

4. Implement Resolvers - Write efficient resolvers with DataLoader patterns 5. Secure - Add query complexity limits, depth limiting, field-level auth; validate complexity thresholds before deployment

  • _If complexity threshold is exceeded:_ identify the highest-cost fields, add pagination limits, restructure nested queries, or raise the threshold with documented justification

6. Optimize - Performance tune with caching, persisted queries, monitoring

Reference Guide

Load detailed guidance based on context:

TopicReferenceLoad When
Schema Designreferences/schema-design.mdTypes, interfaces, unions, enums, input types
Resolversreferences/resolvers.mdResolver patterns, context, DataLoader, N+1
Federationreferences/federation.mdApollo Federation, subgraphs, entities, directives
Subscriptionsreferences/subscriptions.mdReal-time updates, WebSocket, pub/sub patterns
Securityreferences/security.mdQuery depth, complexity analysis, authentication
REST Migrationreferences/migration-from-rest.mdMigrating REST APIs to GraphQL

Constraints

MUST DO

  • Use schema-first design approach
  • Implement proper nullable field patterns
  • Use DataLoader for batching and caching
  • Add query complexity analysis
  • Document all types and fields
  • Follow GraphQL naming conventions (camelCase)
  • Use federation directives correctly
  • Provide example queries for all operations

MUST NOT DO

  • Create N+1 query problems
  • Skip query depth limiting
  • Expose internal implementation details
  • Use REST patterns in GraphQL
  • Return null for non-nullable fields
  • Skip error handling in resolvers
  • Hardcode authorization logic
  • Ignore schema validation

Code Examples

Federation Schema (SDL)

# products subgraph
type Product @key(fields: "id") {
  id: ID!
  name: String!
  price: Float!
  inStock: Boolean!
}

# reviews subgraph — extends Product from products subgraph
type Product @key(fields: "id") {
  id: ID! @external
  reviews: [Review!]!
}

type Review {
  id: ID!
  rating: Int!
  body: String
  author: User! @shareable
}

type User @shareable {
  id: ID!
  username: String!
}

Resolver with DataLoader (N+1 Prevention)

// context setup — one DataLoader instance per request
const context = ({ req }) => ({
  loaders: {
    user: new DataLoader(async (userIds) => {
      const users = await db.users.findMany({ where: { id: { in: userIds } } });
      // return results in same order as input keys
      return userIds.map((id) => users.find((u) => u.id === id) ?? null);
    }),
  },
});

// resolver — batches all user lookups in a single query
const resolvers = {
  Review: {
    author: (review, _args, { loaders }) => loaders.user.load(review.authorId),
  },
};

Query Complexity Validation

import { createComplexityRule } from 'graphql-query-complexity';

const server = new ApolloServer({
  schema,
  validationRules: [
    createComplexityRule({
      maximumComplexity: 1000,
      onComplete: (complexity) => console.log('Query complexity:', complexity),
    }),
  ],
});

Output Templates

When implementing GraphQL features, provide: 1. Schema definition (SDL with types and directives) 2. Resolver implementation (with DataLoader patterns) 3. Query/mutation/subscription examples 4. Brief explanation of design decisions

Knowledge Reference

Apollo Server, Apollo Federation 2.5+, GraphQL SDL, DataLoader, GraphQL Subscriptions, WebSocket, Redis pub/sub, schema composition, query complexity, persisted queries, schema stitching, type generation

Documentation

Related skills

How it compares

Pairs with api-designer, microservices-architect, and database-optimizer related skills from the same catalog.

FAQ

How are N+1 query problems prevented?

Use per-request DataLoader instances in context to batch and cache database lookups while preserving input key order.

What happens if federation composition fails?

Review entity key directives, check missing type definitions across subgraphs, resolve external field mismatches, then re-run composition.

Can REST patterns be used in GraphQL?

No. The MUST NOT list forbids using REST patterns and exposing internal implementation details in the graph.

Is Graphql Architect safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

Backend & APIsbackendintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.