constructive-graphql-codegen

Generate type-safe GraphQL SDKs with React Query hooks and an ORM client from schema files.

1|Updated Jan 20, 2026
One-click install
npx skills add https://github.com/constructive-io/constructive-skills --skill constructive-graphql-codegen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: constructive-graphql-codegen
Source: https://github.com/constructive-io/constructive-skills/tree/main/skills/constructive-graphql-codegen
Command: npx skills add https://github.com/constructive-io/constructive-skills --skill constructive-graphql-codegen

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates the generation of type-safe GraphQL clients (React Query hooks and ORM) and documentation from your GraphQL schema, eliminating boilerplate code and ensuring consistency.

Core Features & Use Cases

  • Type-Safe Clients: Generates React Query hooks for frontend data fetching and a Prisma-like ORM for backend data access.
  • Schema Introspection: Supports generating from schema files, endpoints, databases, or PGPM modules.
  • Documentation Generation: Creates READMEs, AGENTS.md files, and per-command skill files for better discoverability and integration.
  • Use Case: When setting up a new feature that requires fetching data from your GraphQL API, use this Skill to generate all the necessary hooks, types, and even CLI commands, saving hours of manual setup and reducing the risk of type errors.

Quick Start

Use the constructive-graphql-codegen skill to generate React Query hooks and an ORM client from the schema file './schemas/public.graphql'.

Frequently Asked Questions about constructive-graphql-codegen

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

FAQPage Schema
How do I generate type-safe React Query hooks from a GraphQL schema?

You can generate type-safe React Query hooks from a GraphQL schema by using an automated codegen process that reads your schema files or endpoints and outputs fully typed client SDKs, eliminating manual boilerplate and preventing type errors during frontend data fetching.

Can I generate a Prisma-like ORM client from an existing database schema?

Yes, generating a Prisma-like ORM client from an existing database is supported. The codegen process introspects your database or schema files to produce a type-safe ORM client, ensuring consistent backend data access without writing manual query builders.

What's the best way to document a GraphQL SDK for project discoverability?

The best way to document a GraphQL SDK is to automate the generation of READMEs, AGENTS.md files, and per-command skill files directly from your schema during the codegen process, ensuring your documentation stays synchronized with your types and hooks.

Does GraphQL codegen support introspecting remote endpoints and PGPM modules?

GraphQL codegen does support introspecting remote endpoints and PGPM modules. It can also read directly from local schema files or databases, providing flexible schema sources to generate your type-safe clients and required documentation.

Why should I automate GraphQL client generation instead of writing TypeScript types manually?

Automating GraphQL client generation eliminates hours of manual setup and boilerplate code. It ensures your TypeScript types, React Query hooks, and ORM clients remain strictly consistent with your schema, significantly reducing the risk of runtime type errors.