✓ Verified
💻 Development
✓ Enhanced Data
Neo Graphql Ts Generator
Automatically generates TypeScript types from GraphQL schema files with CLI integration for develope
- Rating
- 4.8 (456 reviews)
- Downloads
- 1,242 downloads
- Version
- 1.0.0
Overview
Automatically generates TypeScript types from GraphQL schema files with CLI integration for developers and AI agents.
Complete Documentation
View Source →
GraphQL TypeScript Generator Skill
Product Plan
One-Sentence Description
Automatically generates TypeScript types from GraphQL schema files with CLI integration for developers and AI agents.Core Capabilities
- Convert GraphQL schema (.graphql, .gql) files to TypeScript interfaces and types
- Generate client-side TypeScript types for GraphQL queries and mutations
- Provide command-line interface for direct file processing
- Handle complex GraphQL types including unions, interfaces, and enums
- Validate GraphQL schemas before TypeScript generation
- Integrate with OpenClaw agent workflows for automation
- Support batch processing of multiple schema files
Out of Scope
- GraphQL server implementation
- Database schema management
- Runtime GraphQL client code generation
- Documentation generation beyond type definitions
- Performance optimization for very large schemas
- Custom code formatting beyond TypeScript standards
- Integration with specific frameworks (React, Angular, etc.)
Trigger Scenarios
- "Generate TypeScript types from this GraphQL schema"
- "Create TypeScript interfaces from GraphQL schema file"
- "Convert .graphql file to TypeScript types"
- "Auto-generate types for my GraphQL API"
- "Generate client types from GraphQL schema"
- "Transform GraphQL schema to TypeScript"
Required Resources
- scripts/: Contains the main TypeScript generation logic and CLI entry point
- references/: GraphQL schema examples and test cases
- assets/: CLI help text, configuration templates, and documentation assets
Key Files
- scripts/index.ts: Main CLI entry point
- scripts/generator.ts: Core type generation logic
- scripts/cli.ts: Command-line interface implementation
- scripts/utils.ts: Utility functions for GraphQL parsing
- references/sample.graphql: Example GraphQL schema for testing
- references/test-schema.graphql: Complex test case with various GraphQL features
- assets/README.md: User documentation
- assets/package.json: Skill package configuration
- assets/tsconfig.json: TypeScript configuration for the skill
- assets/cli-help.txt: CLI help text and usage examples
Acceptance Criteria
- Skill correctly processes simple GraphQL schemas and generates valid TypeScript types
- Skill handles complex GraphQL features (unions, interfaces, enums)
- CLI interface accepts schema file paths and outputs TypeScript files
- Error handling for invalid GraphQL schemas
- Integration with OpenClaw agent workflows for automated processing
- Documentation includes usage examples and troubleshooting
- Test cases pass for all sample GraphQL schemas
- Generated TypeScript types are immediately usable in TypeScript projects
Architecture Overview
Directory Layout
text
├── scripts/
│ ├── index.ts # CLI entry point
│ ├── generator.ts # Type generation logic (Unions, Interfaces, Enums)
│ ├── cli.ts # Command-line argument parsing
│ └── utils.ts # GraphQL parsing utilities
├── references/
│ ├── sample.graphql # Basic schema example
│ └── test-schema.graphql # Complex test cases
├── assets/
│ ├── README.md # User documentation
│ ├── package.json # Skill package metadata
│ ├── tsconfig.json # TypeScript config
│ └── cli-help.txt # CLI usage examples
Scripts Design
#### scripts/index.ts
- Language: TypeScript
- Inputs:
argv(script arguments via CLI) - Outputs: Generates TypeScript files in output directory
- Core Logic: Parses CLI args → Loads schema → Calls
generator.ts→ Writes output
scripts/generator.ts
- Language: TypeScript
- Inputs: GraphQL schema AST (parsed from file)
- Outputs: TypeScript interfaces, types
- Core Logic: Type transformation rules for:
- Scalar types → TS primitives
- Object types → TS interfaces
- Union types → Discriminated unions
- Enum types → TS enum
scripts/cli.ts
- Language: TypeScript
- Inputs: Raw command-line arguments
- Outputs: Processed schema file paths
- Core Logic: Argument validation → Schema file reading → Result routing
scripts/utils.ts
- Language: TypeScript
- Inputs: Raw GraphQL text
- Outputs: Parsed AST
- Core Logic: GraphQL parser implementation with error handling
References Design
#### references/sample.graphql
- Content: Basic schema with Query/Mutation
- Usage: Demonstration for new users
references/test-schema.graphql
- Content: Features unions, interfaces, nested enums
- Usage: Testing boundary cases during development
Data Flow
- CLI receives schema path via arguments
cli.tsvalidates and loads schema fileutils.tsparses schema to ASTgenerator.tsprocesses AST using transformation rules- Outputs TypeScript files to
dist/directory
Integration Points
#### Agent Workflow Example:
- User requests: "Generate types from schema at /docs/api.graphql"
- Agent triggers CLI via
exec "graphql-ts-generator /docs/api.graphql" - CLI processes schema, calls generator logic
- Generated .ts files returned to agent as attachment
- Agent presents files to user in chat interface
- Agent can schedule batch processing
- "Generate types for all .graphql in /schemas/" →
exec "graphql-ts-generator /schemas/*.graphql"
Usage Instructions
Installation
bash
npm install -g graphql-ts-generator
Basic Usage
bash
# Generate types from a single schema file
graphql-ts-generator schema.graphql
# Generate types and specify output directory
graphql-ts-generator schema.graphql --output dist/
# Process multiple schema files
graphql-ts-generator "schemas/*.graphql"
Options
-o, --output: Output directory for generated TypeScript files (default:./generated)-f, --format: Code formatting style (default: standard)-v, --verbose: Enable verbose logging--no-validate: Skip schema validation (not recommended)-h, --help: Show help message
Output
The generator produces TypeScript files containing:- Interfaces for GraphQL object types
- Type aliases for GraphQL unions
- Enums for GraphQL enums
- Proper nullability handling (TypeScript
| null)
Integration with OpenClaw
This skill integrates seamlessly with OpenClaw agent workflows. Trigger via:- Direct CLI execution in agent sessions
- Scheduled batch generation jobs
- Automated pipeline processing
assets/README.md for complete documentation.
Installation
Terminal bash
openclaw install neo-graphql-ts-generator
Copied!
💻Code Examples
### Directory Layout
-directory-layout.txt
├── scripts/
│ ├── index.ts # CLI entry point
│ ├── generator.ts # Type generation logic (Unions, Interfaces, Enums)
│ ├── cli.ts # Command-line argument parsing
│ └── utils.ts # GraphQL parsing utilities
├── references/
│ ├── sample.graphql # Basic schema example
│ └── test-schema.graphql # Complex test cases
├── assets/
│ ├── README.md # User documentation
│ ├── package.json # Skill package metadata
│ ├── tsconfig.json # TypeScript config
│ └── cli-help.txt # CLI usage examples### Basic Usage
-basic-usage.sh
# Generate types from a single schema file
graphql-ts-generator schema.graphql
# Generate types and specify output directory
graphql-ts-generator schema.graphql --output dist/
# Process multiple schema files
graphql-ts-generator "schemas/*.graphql"Tags
#web_and-frontend-development
#cli
#integration
#script
Quick Info
Category Development
Model Claude 3.5
Complexity Multi-Agent
Author martinforsulu
Last Updated 3/10/2026
🚀
Optimized for
Claude 3.5
Ready to Install?
Get started with this skill in seconds
openclaw install neo-graphql-ts-generator
Related Skills
✓ Verified
💻 Development
4claw
4claw — a moderated imageboard for AI agents.
🧠 Claude-Ready
)}
★ 4.4 (118)
↓ 4,990
v1.0.0
✓ Verified
💻 Development
Aap Passport
Agent Attestation Protocol - The Reverse Turing Test.
🧠 Claude-Ready
)}
★ 4.3 (89)
↓ 4,621
v1.0.0
✓ Verified
💻 Development
Acestep Lyrics Transcription
Transcribe audio to timestamped lyrics using OpenAI Whisper or ElevenLabs Scribe API.
⚡ GPT-Optimized
)}
★ 3.8 (274)
↓ 17,648
v1.0.0
✓ Verified
💻 Development
Adaptive Suite
A continuously adaptive skill suite that empowers Clawdbot.
🧠 Claude-Ready
)}
★ 4.7 (88)
↓ 1,625
v1.0.0