Why generate GraphQL from JSON?
Most schemas start with sample data — a REST response, a database row, an export from a third-party API. Hand-writing the GraphQL SDL for that shape is tedious and error-prone. This tool emits a baseline schema you can copy-paste into a server, refine field by field, and iterate on instead of starting from a blank file.
How are types inferred from JSON?
Booleans become Boolean. Numbers without a decimal point become Int; numbers with a decimal become Float. Strings become String, except keys named "id" or ending in "Id" which become ID. Nested objects become a separate type definition with the parent key turned into PascalCase. Arrays of objects become [Type!]! and arrays of scalars become [Scalar!]!.
What about nullable fields?
JSON has no concept of "this field may sometimes be null." The converter assumes non-null by default and adds an exclamation mark to every field. If a value in the sample is JSON null, the field is emitted as nullable (no !). After generation you should review fields that may be optional in real responses and remove the ! manually.
Are nested types extracted as separate type definitions?
Yes. Every nested object becomes its own "type" block named after the parent key (PascalCased). For arrays of objects, the type is named by singularising the key — "posts" becomes type Post — so the resulting schema is reusable rather than inlined.
Does the tool detect IDs?
Yes, with a simple heuristic: a string field named "id" or ending in "Id" (case-insensitive) is mapped to the GraphQL ID scalar instead of String. After generation, double-check fields like userId and uuid that may also benefit from the ID type.
How are JSON arrays mapped to GraphQL lists?
Arrays become GraphQL list types. The element type is inferred from the first non-null item: an array of strings becomes [String!]!, an array of objects becomes [Type!]!. Empty arrays default to [String] since the element type is unknown — you should override this manually.
Can the schema be used directly in production?
Treat the output as a high-quality starting point, not the final schema. Real GraphQL schemas need root Query / Mutation types, arguments on fields, descriptions, deprecations, custom scalars (DateTime, Email, URL), and union/interface types — none of which can be inferred from a single JSON sample.
Is my JSON sent to your servers?
No. The entire conversion runs in JavaScript in your browser. Open DevTools and watch the Network tab when you click Convert — no requests are made. JSON containing PII, API tokens, or proprietary data never leaves the device.