Skip to content
TypeWire

@tahanabavi/typefetch-graphql

documents v0.0.0

GraphQL transport for TypeFetch contracts — one client, one middleware chain, and selection sets generated from your Zod response schema.

What the generator refuses

It fails at client.init() — not on a request in production — naming the endpoint and the path that caused it, and pointing at document. Guessing would produce a query the server rejects at runtime, which is strictly worse.

SchemaWhy
z.union([...]) of objectsneeds inline fragments (... on Type), and the schema does not say which types
z.record(...)GraphQL has no way to ask for "every field"
recursive schemasa query must be finite; the depth is a decision only you can make
variables with no rootthere is no single field to attach the arguments to

Give those endpoints an explicit document; everything else about them still works, including validation against response.

Not supported

Subscriptions (use @tahanabavi/typesocket), @defer / @stream, persisted queries, and file uploads via the multipart spec.