Superjson

Configure SuperJSON transformer on both server initTRPC.create({ transformer: superjson }) and every client terminating link (httpBatchLink, httpLink, wsLink, httpSubscriptionLink) to support Date, Map, Set, BigInt over the wire. Transformer must match on both sides. In v11, transformer goes on individual links, not the client constructor.

trpc b420a9d 5.8 KB Updated

File contents

trpc/trpc/tree/main/packages/client/skills/superjson commit b420a9d52b

Frequently asked questions

npx skillmds add trpc/superjson