Paste your broken GraphQL on the left and click "Fix GraphQL!!" to repair itPaste broken GraphQL

What is the GraphQL Fixer?

If you have ever pasted a GraphQL schema into a tool and got back Syntax Error: Expected ":", found Name, or watched a Schema Registry diff fail because someone forgot a colon after a field name, you know the pain. SDL is unforgiving — one missing punctuation mark and the whole document refuses to parse. This tool repairs the common breakages: missing colons after field names, duplicate fields inside a type, unbalanced braces, stray commas, mistyped scalar references. Paste the broken schema in the left editor, click the green Fix GraphQL!! button, and a clean SDL comes back on the right.

The fix follows the GraphQL October 2021 specification for type, field, and argument grammar. The grammar is small but strict — see the official Schemas and Types primer for the full set of rules. The fixer normalises the structure without touching your field names, types, or directives, so the diff against your registry stays clean. If you want a sanity check on the output, drop it into the Apollo Server schema docs validator or run it through the reference parser shipped with graphql-js.

The schema is sent to a small AI service that has been told to fix syntax only — never to invent, rename, or remove your fields. The repaired SDL comes back as plain text, ready to paste into your project. Nothing is logged on our side.

How to Use the GraphQL Fixer

Three steps. Each one uses the actual buttons on this page.

1

Paste Broken SDL or Load the Sample

Drop your broken GraphQL SDL into the left editor. Click Sample GraphQL to load a deliberately broken Order/Customer schema with the kinds of breakages this tool handles — missing colons, a duplicate field, a missing closing brace.

type Order {
  id: ID!
  placedAt DateTime!
  total Money!
}

The fixer does not invent fields you did not write. It only repairs syntax the GraphQL grammar rejects. For naming and design conventions on top of valid syntax, the GraphQL best-practices guide is worth a read.

2

Click Fix GraphQL!!

Hit the green button. The fixer reads the broken SDL, identifies the structural and punctuation errors, and rewrites the document. A loading indicator appears while it works. Both editors use SDL syntax highlighting so you can scan before-and-after side by side.

3

Copy the Cleaned Schema

The right panel shows the repaired SDL. Field names, types, descriptions, and directives are unchanged — only the syntax errors are fixed. Copy the output and paste it into your schema.graphql file or your registry.

When You'd Actually Use This

Cleaning Up Hand-Edited Schemas

Edited a large schema.graphql by hand and missed a colon between placedAt and DateTime!? The error message just says "Expected :" with a line number. The fixer puts the colon back without you hunting field-by-field.

Fixing AI-Generated SDL

Asked an LLM to draft a schema for a new feature and it came back with a duplicate field, a comma where a brace should be, and an unmatched {. Common failure mode. Paste it in, click Fix, get a parseable schema back without rewriting.

Recovering Schemas from Logs

Pulled an SDL fragment out of a log line where it was wrapped in escaping or had its newlines stripped? The fixer normalises the structure so the recovered schema actually parses again.

Pre-Flight for Schema Registry

Before pushing a change to a federated registry, run the SDL through the fixer to catch the punctuation mistakes that would block the diff. Saves a round trip with the registry rejecting the upload.

Common Questions

What kinds of errors does it fix?

Missing colons between a field name and its type (the most common breakage), duplicate fields inside a single type, missing or extra closing braces, stray commas in input objects, and unmatched square brackets around list types. It does not invent fields, types, or arguments — it only repairs syntax that the parser rejects.

Does it change my field names or types?

No. Field names, scalar names, type names, descriptions, and directives are passed through unchanged. The fixer only touches structural syntax — the names you wrote stay exactly as you wrote them.

Does it support custom scalars and directives?

Yes. scalar Money, scalar DateTime, custom @auth or @deprecated directives — all preserved. The fixer does not validate that a custom scalar is registered with your server, only that the SDL parses.

What about federated subgraphs (Apollo Federation)?

Federation directives (@key, @external, @requires) are passed through. The fixer is purely a syntax repair layer — it does not run federation composition. Run the cleaned output through your registry's composition step afterwards.

Is my schema sent to a server?

Yes — the fix runs on a small backend service because the language model is hosted there. We do not log the input, and the response is returned directly to your browser. There is a 64 KB size limit per request.

Will it always produce a parseable schema?

For the common breakages described above, yes. If the input is missing so much structure that the original intent is ambiguous (for example, an entire type body deleted), the output may flag an error rather than guess. In that case, fix the obvious gap manually and run the result through again.

Other GraphQL Tools

Fixing is one part of a GraphQL workflow. These tools cover the rest: