Skip to content
TypeWire

@tahanabavi/typefetch-grpc

documents v0.0.0

gRPC transport for TypeFetch contracts — Connect unary JSON out of the box, binary grpc-web behind a codec seam, zero dependencies.

Setup

ts
import { ApiClient } from "@tahanabavi/typefetch";
import { grpcTransport } from "@tahanabavi/typefetch-grpc";

const client = new ApiClient(
{
baseUrl: "https://api.example.com",
transports: [grpcTransport({ baseUrl: "https://grpc.example.com" })],
},
contracts,
);
client.init();

Registration is explicit, so an app that never registers this transport never ships a byte of it.