Lewati ke konten
TakoAPI
Kembali ke skill

neo-graphql-ts-generator

oleh martinforsulu

Web & Frontend Development
—Belum ada penilaian
Penilaian Anda

Ringkasan

Automatically generates TypeScript types from GraphQL schema files with CLI integration for developers and AI agents.

Deskripsi

Apa yang Dilakukan Skill Ini

Converts GraphQL schema files (.graphql, .gql) to TypeScript interfaces, types, unions, and enums via a CLI tool. Handles complex schema features including discriminated unions, interfaces, and nullability. Can process single files or batches.

Eliminates hand-writing TypeScript types that must stay in sync with a GraphQL schema, removing a common source of type drift.

Kapan Menggunakannya

  • Generate TypeScript types from a REST-to-GraphQL migration
  • Sync client-side types after backend schema updates
  • Batch-convert all schemas in a monorepo at once
  • Automate type generation in a CI pipeline
  • Get typed interfaces from a third-party GraphQL API schema

Contoh Alur Kerja

INPUT

User asks: Generate TypeScript types from /docs/api.graphql

AGENT
  1. 1

    Receives the schema file path from the user

  2. 2

    Runs graphql-ts-generator /docs/api.graphql via CLI

  3. 3

    Parser validates and converts the schema to an AST

  4. 4

    Generator transforms AST nodes to TypeScript interfaces, unions, and enums

  5. 5

    Writes output .ts files to the dist/ directory

OUTPUT

TypeScript type files ready to import into the project

Instalasi

clawhub install martinforsulu/neo-graphql-ts-generator

Jalankan perintah CLI-nya, atau tempel prompt ke Claude Code, Cursor, Codex, atau coding agent apa pun yang Anda pakai.

Tautan