フォーマッター&コード
GraphQL SDL ⇄ TypeScript 型
Walk a schema, emit typed interfaces — and back again.
Runs in your browser
GraphQL SDL · source
lines: 18chars: 202size: 202 B
TypeScript interfaces · result
lines: 18chars: 241size: 241 B
live
編集者注
Understanding · The schema is the contract, TypeScript is the safety net.
この詳細な解説章は現在、英語版のみで提供されています。上の変換ツールはあなたの言語で動作しますが、長文の解説記事はまだ翻訳されていません。
よくある質問
Quick answers.
›Does this tool support custom scalars?
Yes. When converting SDL to TypeScript, custom scalars are mapped to `any` or `unknown` by default, which you can then refine in your code.
›Are nullable fields handled correctly?
Yes. GraphQL fields without an exclamation mark are converted to optional properties (using the `?` operator) or union types with `null` in TypeScript.
›Can it convert TypeScript back to SDL?
Yes. The tool parses TypeScript interfaces and type aliases to generate a matching GraphQL SDL schema, including support for basic nested objects.
›Is my schema data sent to a backend?
No. The conversion logic runs entirely within your browser session using local parsing libraries, so your schema definitions never leave your device.
他の人はこちらも検索しています
関連ツール
More in this room.
- OpenAPI / Swagger ValidatorOpenAPI 3の仕様をルールに照らして検証します。
- OpenAPI 3.1 YAML ⇄ JSONOpenAPI 仕様を YAML と JSON の間で変換します。
- OpenAPI → TypeScript Axios クライアント任意の OpenAPI 仕様から型付き Axios クライアントを生成します。
- OpenAPI → React Query フックエンドポイントごとに useQuery + useMutation フックを自動生成します。
- OpenAPI → Postman コレクション任意の OpenAPI 仕様から Postman v2.1 コレクションを生成します。
- JSON Schema → Zod / Valibot / ArkType1つの JSON Schema から3つのランタイムバリデーターフレーバー。