Skip to content

tRPC

tRPC is an end-to-end typed RPC layer, very widespread on the TypeScript side. Restorm exposes it as a request type in its own right, which saves you assembling the envelope the server expects by hand.

Right-click in the tree ▸ Add ▸ tRPC request.

A tRPC tab: the base URL, the "pets.search" procedure path, the Query call type and the JSON input

FieldRole
URLThe tRPC router’s base URL; the procedure path is appended to it
ProcedureThe procedure’s dotted path, for example user.get
Typequery or mutation
InputThe procedure’s input, in JSON — {{variables}} work in it
HeadersAdditional HTTP headers
  • a query goes out as a GET with the input serialised into the ?input= parameter;
  • a mutation goes out as a POST with the body envelope tRPC v10 expects.

You therefore only write the procedure and its input.

If your server exposes its schema (typically at <base>/.trpc/_schema), File ▸ Import creates one request per procedure, with its type and a sample input. See Importing tRPC.

Five targets: cURL, JavaScript (Fetch), TypeScript (@trpc/client), Python (requests) and Go.