Blog
Language is the new GraphQL client
You spent years bringing your business into one graph. Yet only people with domain knowledge can find their way through it. Agents can't either: a raw graph was never built as their interface.
The LangQL team6 min read
The graph knows more than its clients ask
GraphQL made a simple promise: describe your business once, and let every client ask for exactly what it needs. If you run a supergraph today, you kept your side of it. Orders, customers, invoices, and incidents all live in one typed, connected schema.
Now picture a support lead who wants to know which enterprise accounts had a failed payment this week. The data is in the graph. The schema can express the question. And the answer is still days away, because somebody has to write the operation first.
That's true of almost everything your graph could tell you. Every question it answers today was written by an engineer, inside a client like Apollo or Relay, then reviewed, shipped, and maintained. The graph is rarely the limit. The limit is the queue of people who can write operations.
Then agents showed up
For as long as that queue existed, the insight you could get out of your graph was capped by human hours. AI removes the cap. An agent can ask a thousand questions in the time a person asks one, follow each answer with a better question, and act on what it finds.
But only if the graph is open to AI in the right way. An agent brings one thing, language, and has to turn it into operations your graph accepts. Most teams try one of three routes.
Hand-built tools. You wrap a few operations as MCP tools. They work well for exactly the questions you predicted. Each new question needs a new tool, and each schema change can quietly break one. Your platform team is the bottleneck again, with a new kind of ticket.
The schema in the prompt. You hand the model your SDL and let it write GraphQL. That holds up on a demo schema. A production supergraph can pass 125,000 lines and 4,600 types, and even when it fits in a context window, models lose their place. They pick a plausible field that doesn't exist, miss a nested relationship, or invent an ID.
Introspection loops. You let the agent explore the schema step by step. It gets there after ten or more turns and 30 to 90 seconds, then pays the same cost on the next task.
All three assume the model should produce GraphQL text. We think that's the wrong job for a model.
A schema is already a map of your business
Your schema is more than an API contract. It's the most precise description of your business that exists: every entity, every relationship, every allowed input, all typed.
Read a sentence against it and something nice happens. "Move ENG-412 to In Progress" sounds loose, yet almost every word resolves to something exact. "ENG-412" is an issue identifier. "In Progress" is a workflow state. "Move" is an update mutation with a state input.
That makes this a compilation problem. Language is the source, your schema is the type system, and a valid operation is the output. Language becomes a client like any other, with a compiler where other clients have a code generator.
What the compiler does
We built LangQL to be that compiler. It works in four steps.
- 01Index once. Your SDL becomes a typed graph of types, fields, and relationships. LangQL reads only the schema, and updates the index incrementally when the schema changes.
- 02Slice. For each request, graph search pulls out the small part that matters: around 12 types out of thousands. That's why a response takes about 2 seconds whether your schema has 500 lines or 125,000.
- 03Plan. A model reads that slice and produces a structured plan: which root field, which selections, which filters, which inputs. It never writes GraphQL text.
- 04Compile and validate. A deterministic compiler turns the plan into an AST, binds every value as a typed variable, validates it against your schema, and attaches the full inputSchema (required and optional fields with descriptions) plus any schema-verified hints.
The model does what models are good at: understanding intent. Everything that has to be exact is done by code.
One sentence, compiled
Here's that sentence in full, run against Linear's public schema, which is about 46,000 lines long:
Move ENG-412 to In Progress, assign it to Dana and mark it urgent.
About two seconds later, LangQL returns this:
mutation IssueUpdate($id: String!, $input: IssueUpdateInput!) { issueUpdate(id: $id, input: $input) { issue { id identifier priorityLabel assignee { id displayName } state { id name } } success }}{ "id": "ENG-412", "input": { "priority": 1 }}Two things are missing from the variables: stateId and assigneeId. People say "In Progress" and "Dana". Your API wants internal IDs, and LangQL has never seen your data, so it can't know them. On a write, a guess would be the worst possible answer.
So it asks. Next to the operation, it returns two schema-verified lookup hints alongside the full inputSchema:
- variables.input.stateIdQuery.workflowStatesUsing Query.workflowStates(filter: {"name":{"eq":"In Progress"}}), look up WorkflowState id
- variables.input.assigneeIdQuery.usersUsing Query.users(filter: {"displayName":{"eqIgnoreCase":"Dana"}}), look up User id
{ "type": "object", "required": [ "id", "input" ], "properties": { "id": { "type": "string", "description": "The identifier of the issue to update.", "default": "ENG-412" }, "input": { "type": "object", "required": [ "assigneeId", "stateId" ], "description": "A partial issue object to update the issue with.", "properties": { "stateId": { "type": "string", "description": "UUID of a status in the issue’s team. A status change updates lifecycle times and may change cycle membership. Moving to the reserved duplicate status requires an existing duplicate relation; use issueRelationCreate to… Requires ID lookup via Query.workflowStates for 'In Progress' before execution." }, "assigneeId": { "type": "string", "description": "UUID of the new assignee. Null unassigns the issue. Requires ID lookup via Query.users for 'Dana' before execution." }, "priority": { "type": "integer", "description": "The priority of the issue. 0 = No priority, 1 = Urgent, 2 = High, 3 = Medium, 4 = Low.", "default": 1 }, "dueDate": { "type": "string", "description": "Due date in YYYY-MM-DD format, without a time or time zone. Null clears it." } } } }}Because inputSchema includes optional fields too, the agent knows it can also set dueDate or ask a clarifying question without touching raw SDL or recompiling the operation. It runs both lookups, asks the user if two people named Dana match, patches the real IDs into variables, and performs the write. Nothing is invented along the way.
One stateless primitive, not a recursive black box
Real user requests rarely stop at a single operation. Someone asks: "Show open orders, cancel order #1042, and subscribe to order status updates." GraphQL forbids mixing queries, mutations, and subscriptions in one document.
It is tempting to build a recursive orchestrator inside the compiler to juggle lookups, retries, disambiguation, and multi-step execution automatically. We took the opposite path. Modern agents are already good at planning steps, reusing values from conversation memory, asking users to pick between two matches, and confirming writes. What agents struggle with is knowing how a 100,000-line schema connects.
So LangQL stays a single, stateless compiler primitive, ready out of the box via our platform MCP service and one short Agent Skill, with no custom MCP server to build or maintain. When a prompt spans multiple GraphQL operation types, LangQL inspects your graph relations and returns a schema-verified split blueprint: each operationType, its description, a ready-to-compile suggestedPrompt, and dependsOn ordering. LangQL does the heavy graph work once per call; your agent orchestrates the rest cleanly.
It fits the stack you already run
If you own the architecture, three things will matter to you.
It never touches your data. LangQL reads your schema and returns an operation. Your own router executes it, with your auth and your permissions. Nothing new sits in the request path.
The output is ordinary GraphQL. Each result is one named operation with typed variables, the same kind your engineers write and review today.
It follows your schema. When the schema changes, you push the new version. There are no tools to rewrite.
There's a side effect we like, too. Clear names and field descriptions used to help the next engineer. Now they're read on every request, and they shape how well your graph understands a question. Good schema design starts paying off for everyone in the company.
Figure it out once, share it everywhere
The part we find most exciting comes after the first answer. Once a sentence has been compiled into the right operation, the hard part is done for good. The result is static, so you can save it, review it, and version it as a persisted operation. You can also hand it to any agent as a typed tool.
Think back to the support lead. The failed-payments question asked on Monday is something the whole company can run on Tuesday, with different inputs, the same validated result, and no model call at all.
So the graph gets more useful the more it's used. Every good question leaves behind a reusable piece of business logic that nobody had to build by hand.
What opens up
Put together, this changes what your graph is worth. Its value stops scaling with the number of operations your engineers can write, and starts scaling with the number of questions worth asking.
None of it needs a new data layer. The schema was there the whole time, waiting for a client that speaks the way people do.