Graphql To Typescript API
https://api.findutils.com/api/tools/graphql-to-typescript/execute Convert a GraphQL SDL schema into TypeScript type definitions and return the generated code with counts of emitted types, enums, and inputs. Object and interface types become interfaces (or type aliases), enums become TypeScript enums, input types are included by default. Non-null fields (!) are required; nullable fields become optional and accept null. Built-in scalars map to string, number, and boolean.
Request body
application/json-
schema
string required
GraphQL schema in SDL (type, input, enum definitions).
-
use_interfaces
boolean optional
Emit "interface X {}" instead of "type X = {}". Default: true. Default
true. -
add_exports
boolean optional
Prefix every declaration with "export". Default: true. Default
true. -
use_readonly
boolean optional
Mark every field readonly. Default: false. Default
false. -
generate_input_types
boolean optional
Also emit GraphQL input types. Default: true. Default
true.
Example arguments
Verified{
"schema": "type User {\n id: ID!\n name: String\n}\n\nenum Role {\n ADMIN\n USER\n}"
} More Data tools
- Api Docs Generator Return API documentation generated from a list of endpoints, as Markdown (with table of contents, request/response examples)…
- Bookmarks Html To Csv Convert a browser bookmarks.html export from Chrome, Firefox, Edge, Safari or any other browser that writes the Netscape bookmark format…
- Bookmarks Json To Html Convert a bookmarks JSON file into a Netscape bookmarks.html that Chrome, Firefox, Edge and Safari import.
- Csv Dedupe Remove duplicate rows from a CSV or TSV table.
- Csv Diff Compare two CSV or TSV tables by key column and list the rows that were added, removed or changed - a table diff, not a line diff, so rows…
- Csv To Bookmarks Html Convert a CSV of links into a Netscape bookmarks.html file that Chrome, Firefox, Edge and Safari import.