Formateurs & Code
GraphQL SDL ⇄ Types TypeScript
Walk a schema, emit typed interfaces — and back again.
Note de la rédaction
Understanding · The schema is the contract, TypeScript is the safety net.
Ce chapitre approfondi n'est actuellement disponible qu'en anglais. L'outil de conversion ci-dessus fonctionne dans votre langue ; le long article explicatif n'a pas encore été traduit.
Questions fréquentes
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.
Les internautes recherchent aussi
Outils similaires
More in this room.
- Validateur OpenAPI / SwaggerValidez les spécifications OpenAPI 3 par rapport aux règles de spécification.
- OpenAPI 3.1 YAML ⇄ JSONConvertissez les spécifications OpenAPI entre YAML et JSON.
- OpenAPI → Client Axios TypeScriptGénérez un client Axios typé à partir de n'importe quelle spécification OpenAPI.
- OpenAPI → Hooks React QueryHooks useQuery + useMutation auto-générés par endpoint.
- OpenAPI → Collection PostmanCollection Postman v2.1 à partir de n'importe quelle spécification OpenAPI.
- JSON Schema → Zod / Valibot / ArkTypeTrois variantes de validateurs d'exécution à partir d'un même JSON Schema.