Subscriptions / WebSockets info Using Subscriptions tip Adding a subscription procedure Creating a WebSocket-server Setting TRPCClient to use WebSockets tip Using React W...
Static Site Generation tip Fetch data in getStaticProps Static Site Generation tip Reference project: https://github.com/trpc/examples-next-prisma-todomvc Static site gene...
Starter Projects Starter Projects Get started quickly with one of the sample projects! Copy the snippet from Quick start with create-next-app in the below list to clone the pro...
Static Site Generation tip Fetch data in getStaticProps Static Site Generation tip Reference project: https://github.com/trpc/trpc/tree/main/examples/next-prisma-todomvc ...
Response Caching ⚠️ A word of caution ⚠️ App Caching Example code API Response caching Using responseMeta to cache responses Response Caching The below examples uses Verce...
Request Context Example code Request Context The createContext() function is called for each request and the result is propagated to all resolvers. You can use this to pass co...
invalidateQueries Example code invalidateQueries A typesafe wrapper around calling queryClient.invalidateQueries() , all it does is to call queryClient.invalidateQueries() wit...
SSG Helpers Next.js Example SSG Helpers createSSGHelpers providers you a set of helper functions that you can use to prefetch queries on the server. import { createSSGHelp...
HTTP RPC Specification Methods <-> Type mapping Batching Batching Example Request Given a router like this exposed at /api/trpc : .. And two queries defined like this in a React ...
Inferring Types Inference Helpers Example Code Inferring Types It is often useful to wrap functionality of your @trpc/client or @trpc/react api within other functions. For t...