web-graphql

Build scalable GraphQL APIs with Apollo Server, Express, and Prisma.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/AlexanderStephenThompson/claude-hub --skill web-graphql
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: web-graphql
Source: https://github.com/AlexanderStephenThompson/claude-hub/tree/main/web/skills/web-graphql
Command: npx skills add https://github.com/AlexanderStephenThompson/claude-hub --skill web-graphql

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps engineers design and implement robust GraphQL APIs using Apollo Server, Express, and Prisma, balancing schema-first design with thin resolvers and efficient data loading.

Core Features & Use Cases

  • Schema-first design and type-safe schemas
  • Thin resolvers and service-layer architecture
  • DataLoader-based batching to prevent N+1 queries
  • Cursor-based pagination and structured error handling
  • Real-world use: building scalable product backends

Quick Start

  • Initialize a Node.js project and install dependencies: npm install @apollo/server express prisma @prisma/client graphql dataloader
  • Scaffold a GraphQL schema and resolvers that delegate to a thin service layer
  • Enable DataLoader for batched relations and create a Prisma schema for your data model

Frequently Asked Questions about web-graphql

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent N+1 queries in a GraphQL API with Prisma?

To prevent N+1 queries in a GraphQL API with Prisma, implement DataLoader to batch relational data requests. This approach groups multiple individual database queries into a single batched request, solving the N+1 problem across your relational data efficiently.

What is the best way to structure a scalable Apollo Server and Express backend?

The best way to structure a scalable Apollo Server and Express backend is using a schema-first design with thin resolvers. Delegate business logic to a modular service layer to maintain a clear separation of concerns between the API surface and data access.

How do I set up cursor-based pagination in a GraphQL schema?

Set up cursor-based pagination in a GraphQL schema by defining connection types in your schema-first design. Your thin resolvers delegate the actual data slicing to your service layer and Prisma data access to return structured paginated results.

Does Apollo Server work with Prisma for type-safe schemas?

Yes, Apollo Server works seamlessly with Prisma to create type-safe schemas. By combining schema-first design with Prisma's generated client, you can establish a typed context that enforces type safety from your GraphQL resolvers down to your database access layer.

How do I handle structured error payloads in an Express and GraphQL API?

Handle structured error payloads in an Express and GraphQL API by formatting errors within Apollo Server. This ensures your API surface returns consistent structured error payloads to clients while keeping the error handling logic distinct from your resolvers and data access layer.

When should I use a service layer instead of direct database calls in GraphQL resolvers?

Use a service layer instead of direct database calls in GraphQL resolvers when building scalable product backends. Thin resolvers that delegate to a modular service layer provide a clear separation of concerns between your API surface and data access, preventing bloated resolver logic.