GraphQL to TypeScript

Input
Output

GraphQL Schema to TypeScript

Paste a GraphQL schema to get a type for each object type, input and interface. Non-null fields (String!) stay required, the rest are nullable, and lists keep their item types.

How do I use the GraphQL to TypeScript?

  1. Paste the schema (SDL): type, input, interface and enum definitions.
  2. Pick the language.
  3. Copy or save the code.

What does the GraphQL to TypeScript do?

  • type, input and interface; extend type adds fields
  • Nullability from ! on fields and list items
  • ID, String, Int, Float and Boolean, enums as strings
  • Custom scalars as strings, JSON as any
  • Query, Mutation and Subscription left out
  • Descriptions, directives and arguments skipped

Frequently asked questions

Does it read queries too?
No: for queries and their variables use the GraphQL request tool. This reads the schema.
Is my data uploaded?
No. Bracely runs entirely in your browser, so nothing you paste or open leaves your device.

More JSON tools

Bracely has more than 65 JSON tools in one page. Related ones:

Runs entirely in your browser. Nothing you paste is uploaded. Made by Saurabh Pagrut. About · Privacy policy
Last updated · Version 4.9 · Changelog
Saurabh Pagrut on GitHub · LinkedIn · X · YouTube · Instagram