graphql-schema-generator_skill

This skill generates GraphQL schemas with types, resolvers, and subscriptions for robust API design.
  • TypeScript

6

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill dexploarer/hyper-forge --skill graphql-schema-generator

  • SKILL.md5.8 KB

Overview

This skill generates complete GraphQL schemas with type definitions, resolvers, queries, mutations, subscriptions, and DataLoader integration. It produces TypeScript-ready code that follows pagination, authentication, and error-handling best practices. Use it to scaffold production-grade GraphQL APIs quickly and consistently.

How this skill works

I inspect the requested domain entities and produce typeDefs (types, inputs, enums, connection patterns) and resolver stubs for Query, Mutation, Subscription, and field-level resolvers. I include DataLoader factories and a context bootstrap for per-request loaders, plus example pub/sub wiring for realtime subscriptions. I also add auth checks, input validation hints, and common error patterns in resolvers.

When to use it

  • Scaffold a new GraphQL API for an entity or service
  • Add types, pagination, and subscriptions to an existing project
  • Prevent N+1 database issues with DataLoader integration
  • Enforce consistent authentication and authorization patterns
  • Generate TypeScript-compatible schema and resolver templates

Best practices

  • Use descriptive type and input names to make the schema self-documenting
  • Implement the Connection pattern for pagination with edges and pageInfo
  • Add input validation and explicit error handling (UserInputError, AuthenticationError)
  • Integrate DataLoaders in the request context to avoid N+1 queries
  • Use enums for fixed sets and document fields with descriptions
  • Publish subscription events via a centralized pubsub and filter with withFilter

Example use cases

  • Create a full User schema with create/update/delete mutations, queries, and real-time events
  • Generate schema and resolvers for Post and Comment with author field resolvers using DataLoader
  • Add an admin-only mutation set that enforces role checks in resolvers
  • Bootstrap paging-enabled list queries for resources with cursor-based pagination
  • Add subscriptions to notify clients when entities are created or updated

FAQ

Yes. Resolver templates include authentication checks and role-based authorization examples (AuthenticationError). You can extend them to match your auth system.

How does DataLoader integration work in the generated code?

A per-request context factory creates DataLoaders (e.g., createUserLoader) and attaches them to context.loaders so field resolvers can batch and cache related queries to prevent N+1 problems.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
graphql-schema-generator skill by dexploarer/hyper-forge | VeilStrat