GraphQL Schema to TypeScript
Generate readable TypeScript interfaces, enums, unions, and scalar types from GraphQL SDL.
Batch workspace
Format multiple files locally in one run.
How to use the GraphQL to TypeScript
Paste code or file
Paste your raw GRAPHQL text or upload directly.
Configure options
Choose indentation, dialect, or formatting preferences.
Format & export
Click format, then copy, download, or inspect in tree view.
What is a GraphQL to TypeScript?
Generate readable TypeScript interfaces, enums, unions, and scalar types from GraphQL SDL. This tool re-indents and organizes code according to standard style conventions while checking for syntax validity. Everything executes 100% inside your browser, guaranteeing zero latency and complete privacy for API keys, user tokens, and confidential database schemas.
Frequently Asked Questions
What does this GraphQL generator support?
It generates interfaces, enums, unions, input types, and scalar aliases from GraphQL SDL.
Are nullable fields optional in TypeScript?
Yes. Fields without GraphQL's non-null marker are emitted as optional properties.
Are GraphQL built-in scalars mapped?
ID and String map to string, Int and Float map to number, and Boolean maps to boolean.
Does the schema leave my browser?
No. Parsing and generation run entirely in your browser.
Can I generate types from queries?
This tool generates types from SDL schema definitions; use the schema as the source of truth for reusable API types.