2

    graphql-schema-architect

    by Markus Isaksson

    Design and audit production-grade GraphQL schemas with N+1 detection, DataLoaders, and query depth limiting.

    Updated May 2026
    Security scanned
    One-time purchase

    $9

    One-time purchase

    ⚡ Also available via Agensi MCP — your AI agent can load this skill on demand via MCP. Learn more →

    Included in download

    • Eliminate N+1 database queries using automated DataLoader generation.
    • Prevent DoS attacks by implementing query depth and complexity limits.
    • file_read, file_write automation included
    • Includes example output and usage patterns
    • Instant install

    See it in action

    ### Finding #1 — N+1 in User.posts
    Category: N+1 Performance
    Issue: resolver calls db.post.findMany() for every user in a list.
    Impact: 101 queries for 100 users.
    Fix: Generated PostByUserLoader in src/loaders.ts.
    
    Updated Resolver:
    posts: (parent, _, ctx) => ctx.loaders.postByUser.load(parent.id)

    About This Skill

    Architecting Scalable GraphQL APIs

    Stop your GraphQL server from falling over under production load. This skill acts as a senior GraphQL architect, auditing your schema and resolvers to eliminate performance bottlenecks and security vulnerabilities before they hit production. It specializes in solving the two biggest scaling hurdles: the N+1 query problem and unbounded query depth.

    What it does

    • N+1 Detection & Remediation: Automatically identifies resolvers that trigger redundant database hits and generates type-safe DataLoader batch functions to collapse them into single queries.
    • Security Hardening: Configures query depth limiting and cost-based complexity analysis to prevent "billion laughs" style denial-of-service attacks.
    • Enterprise Patterns: Implements Relay-compliant pagination (edges/nodes) and configures Apollo Federation boundaries for microservice architectures.
    • Framework Support: Supports Apollo Server, GraphQL Yoga, Mercurius, and Helix, including code-first libraries like Pothos and Nexus.

    Why use this skill?

    Manual performance tuning is error-prone. This skill doesn't just "guess"—it walks your type graph to find hidden leaks. It ensures DataLoaders are correctly scoped to the request lifecycle to prevent data leaking between users, and it provides ready-to-paste patches for your specific framework, saving hours of boilerplate configuration.

    Use Cases

    • Eliminate N+1 database queries using automated DataLoader generation.
    • Prevent DoS attacks by implementing query depth and complexity limits.
    • Refactor existing schemas to support Relay-compliant pagination.
    • Audit Apollo Federation subgraphs for proper entity resolution and keys.

    Reviews

    No reviews yet - be the first to share your experience.

    Only users who have downloaded or purchased this skill can leave a review.

    Security Scanned

    Passed automated security review

    Permissions

    Read Files
    Write Files

    Reads schema and resolver files; generates DataLoaders and validation plugins; modifies resolvers and server context factory. Does not execute queries against a running server — verification steps in the report tell the user how to confirm the fix worked.

    Frequently Asked Questions

    Similar Skills

    $9

    One-time