Code Beautifier

GraphQL to TypeScript

Generate readable TypeScript interfaces, enums, unions, and scalar types from GraphQL SDL. · Updated

graphql
Formatted Outputtypescript
Draft saved locally.

FAQ

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.