[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-trpc-trpc-router":3,"mdc--tcwhm5-key":37,"related-org-trpc-trpc-router":1666,"related-repo-trpc-trpc-router":1819},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":20,"repoUrl":21,"updatedAt":22,"license":23,"forks":24,"topics":25,"repo":32,"sourceUrl":35,"mdContent":36},"trpc-router","route and manage tRPC application logic","Entry point for all tRPC skills. Decision tree routing by task: initTRPC.create(), t.router(), t.procedure, createTRPCClient, adapters, subscriptions, React Query, Next.js, links, middleware, validators, error handling, caching, FormData.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"trpc","tRPC","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Ftrpc.png",[12,16,17],{"name":13,"slug":14,"type":15},"Backend","backend","tag",{"name":9,"slug":8,"type":15},{"name":18,"slug":19,"type":15},"API Development","api-development",40424,"https:\u002F\u002Fgithub.com\u002Ftrpc\u002Ftrpc","2026-07-18T05:46:46.332532",null,1636,[26,27,28,29,30,31],"api","next","nextjs","prisma","react","typescript",{"repoUrl":21,"stars":20,"forks":24,"topics":33,"description":34},[26,27,28,29,30,31],"🧙‍♀️  Move Fast and Break Nothing. End-to-end typesafe APIs made easy. ","https:\u002F\u002Fgithub.com\u002Ftrpc\u002Ftrpc\u002Ftree\u002FHEAD\u002Fpackages\u002Fserver\u002Fskills\u002Ftrpc-router","---\nname: trpc-router\ndescription: >\n  Entry point for all tRPC skills. Decision tree routing by task: initTRPC.create(),\n  t.router(), t.procedure, createTRPCClient, adapters, subscriptions, React Query,\n  Next.js, links, middleware, validators, error handling, caching, FormData.\ntype: core\nlibrary: trpc\nlibrary_version: '11.16.0'\nrequires: []\nsources:\n  - 'trpc\u002Ftrpc:www\u002Fdocs\u002Fmain\u002Fintroduction.mdx'\n  - 'trpc\u002Ftrpc:www\u002Fdocs\u002Fmain\u002Fquickstart.mdx'\n---\n\n# tRPC -- Skill Router\n\n## Decision Tree\n\n### What are you trying to do?\n\n#### Define a tRPC backend (server)\n\n- **Initialize tRPC, define routers, procedures, context, export AppRouter**\n  -> Load skill: `server-setup`\n\n- **Add middleware (.use), auth guards, logging, base procedures**\n  -> Load skill: `middlewares`\n\n- **Add input\u002Foutput validation with Zod or other libraries**\n  -> Load skill: `validators`\n\n- **Throw typed errors, format errors for clients, global error handling**\n  -> Load skill: `error-handling`\n\n- **Call procedures from server code, write integration tests**\n  -> Load skill: `server-side-calls`\n\n- **Set Cache-Control headers on query responses (CDN, browser caching)**\n  -> Load skill: `caching`\n\n- **Accept FormData, File, Blob, or binary uploads in mutations**\n  -> Load skill: `non-json-content-types`\n\n- **Set up real-time subscriptions (SSE or WebSocket)**\n  -> Load skill: `subscriptions`\n\n#### Host the tRPC API (adapters)\n\n- **Node.js built-in HTTP server (simplest, local dev)**\n  -> Load skill: `adapter-standalone`\n\n- **Express middleware**\n  -> Load skill: `adapter-express`\n\n- **Fastify plugin**\n  -> Load skill: `adapter-fastify`\n\n- **AWS Lambda (API Gateway v1\u002Fv2, Function URLs)**\n  -> Load skill: `adapter-aws-lambda`\n\n- **Fetch API \u002F Edge (Cloudflare Workers, Deno, Vercel Edge, Astro, Remix)**\n  -> Load skill: `adapter-fetch`\n\n#### Consume the tRPC API (client)\n\n- **Create a vanilla TypeScript client, configure links, headers, types**\n  -> Load skill: `client-setup`\n\n- **Configure link chain (batching, streaming, splitting, WebSocket, SSE)**\n  -> Load skill: `links`\n\n- **Use SuperJSON transformer for Date, Map, Set, BigInt**\n  -> Load skill: `superjson`\n\n#### Use tRPC with a framework\n\n- **React with TanStack Query (useQuery, useMutation, queryOptions)**\n  -> Load skill: `react-query-setup`\n\n- **Next.js App Router (RSC, server components, HydrateClient)**\n  -> Load skill: `nextjs-app-router`\n\n- **Next.js Pages Router (withTRPC, SSR, SSG helpers)**\n  -> Load skill: `nextjs-pages-router`\n\n#### Advanced patterns\n\n- **Generate OpenAPI spec, REST client from tRPC router**\n  -> Load skill: `openapi`\n\n- **Multi-service gateway, custom routing links, SOA**\n  -> Load skill: `service-oriented-architecture`\n\n- **Auth middleware + client headers + subscription auth**\n  -> Load skill: `auth`\n\n## Quick Reference: Minimal Working App\n\n```ts\n\u002F\u002F server\u002Ftrpc.ts\nimport { initTRPC } from '@trpc\u002Fserver';\n\nconst t = initTRPC.create();\n\nexport const router = t.router;\nexport const publicProcedure = t.procedure;\n```\n\n```ts\n\u002F\u002F server\u002FappRouter.ts\nimport { z } from 'zod';\nimport { publicProcedure, router } from '.\u002Ftrpc';\n\nexport const appRouter = router({\n  hello: publicProcedure\n    .input(z.object({ name: z.string() }))\n    .query(({ input }) => ({ greeting: `Hello ${input.name}` })),\n});\n\nexport type AppRouter = typeof appRouter;\n```\n\n```ts\n\u002F\u002F server\u002Findex.ts\nimport { createHTTPServer } from '@trpc\u002Fserver\u002Fadapters\u002Fstandalone';\nimport { appRouter } from '.\u002FappRouter';\n\nconst server = createHTTPServer({ router: appRouter });\nserver.listen(3000);\n```\n\n```ts\n\u002F\u002F client\u002Findex.ts\nimport { createTRPCClient, httpBatchLink } from '@trpc\u002Fclient';\nimport type { AppRouter } from '..\u002Fserver\u002FappRouter';\n\nconst trpc = createTRPCClient\u003CAppRouter>({\n  links: [httpBatchLink({ url: 'http:\u002F\u002Flocalhost:3000' })],\n});\n\nconst result = await trpc.hello.query({ name: 'World' });\n```\n\n## See Also\n\n- `server-setup` -- full server initialization details\n- `client-setup` -- full client configuration\n- `adapter-standalone` -- simplest adapter for getting started\n- `react-query-setup` -- React integration\n- `nextjs-app-router` -- Next.js App Router integration\n",{"data":38,"body":45},{"name":4,"description":6,"type":39,"library":8,"library_version":40,"requires":41,"sources":42},"core","11.16.0",[],[43,44],"trpc\u002Ftrpc:www\u002Fdocs\u002Fmain\u002Fintroduction.mdx","trpc\u002Ftrpc:www\u002Fdocs\u002Fmain\u002Fquickstart.mdx",{"type":46,"children":47},"root",[48,57,64,71,78,206,212,290,296,344,350,398,404,452,458,675,1081,1271,1601,1607,1660],{"type":49,"tag":50,"props":51,"children":53},"element","h1",{"id":52},"trpc-skill-router",[54],{"type":55,"value":56},"text","tRPC -- Skill Router",{"type":49,"tag":58,"props":59,"children":61},"h2",{"id":60},"decision-tree",[62],{"type":55,"value":63},"Decision Tree",{"type":49,"tag":65,"props":66,"children":68},"h3",{"id":67},"what-are-you-trying-to-do",[69],{"type":55,"value":70},"What are you trying to do?",{"type":49,"tag":72,"props":73,"children":75},"h4",{"id":74},"define-a-trpc-backend-server",[76],{"type":55,"value":77},"Define a tRPC backend (server)",{"type":49,"tag":79,"props":80,"children":81},"ul",{},[82,101,116,131,146,161,176,191],{"type":49,"tag":83,"props":84,"children":85},"li",{},[86,92,94],{"type":49,"tag":87,"props":88,"children":89},"strong",{},[90],{"type":55,"value":91},"Initialize tRPC, define routers, procedures, context, export AppRouter",{"type":55,"value":93},"\n-> Load skill: ",{"type":49,"tag":95,"props":96,"children":98},"code",{"className":97},[],[99],{"type":55,"value":100},"server-setup",{"type":49,"tag":83,"props":102,"children":103},{},[104,109,110],{"type":49,"tag":87,"props":105,"children":106},{},[107],{"type":55,"value":108},"Add middleware (.use), auth guards, logging, base procedures",{"type":55,"value":93},{"type":49,"tag":95,"props":111,"children":113},{"className":112},[],[114],{"type":55,"value":115},"middlewares",{"type":49,"tag":83,"props":117,"children":118},{},[119,124,125],{"type":49,"tag":87,"props":120,"children":121},{},[122],{"type":55,"value":123},"Add input\u002Foutput validation with Zod or other libraries",{"type":55,"value":93},{"type":49,"tag":95,"props":126,"children":128},{"className":127},[],[129],{"type":55,"value":130},"validators",{"type":49,"tag":83,"props":132,"children":133},{},[134,139,140],{"type":49,"tag":87,"props":135,"children":136},{},[137],{"type":55,"value":138},"Throw typed errors, format errors for clients, global error handling",{"type":55,"value":93},{"type":49,"tag":95,"props":141,"children":143},{"className":142},[],[144],{"type":55,"value":145},"error-handling",{"type":49,"tag":83,"props":147,"children":148},{},[149,154,155],{"type":49,"tag":87,"props":150,"children":151},{},[152],{"type":55,"value":153},"Call procedures from server code, write integration tests",{"type":55,"value":93},{"type":49,"tag":95,"props":156,"children":158},{"className":157},[],[159],{"type":55,"value":160},"server-side-calls",{"type":49,"tag":83,"props":162,"children":163},{},[164,169,170],{"type":49,"tag":87,"props":165,"children":166},{},[167],{"type":55,"value":168},"Set Cache-Control headers on query responses (CDN, browser caching)",{"type":55,"value":93},{"type":49,"tag":95,"props":171,"children":173},{"className":172},[],[174],{"type":55,"value":175},"caching",{"type":49,"tag":83,"props":177,"children":178},{},[179,184,185],{"type":49,"tag":87,"props":180,"children":181},{},[182],{"type":55,"value":183},"Accept FormData, File, Blob, or binary uploads in mutations",{"type":55,"value":93},{"type":49,"tag":95,"props":186,"children":188},{"className":187},[],[189],{"type":55,"value":190},"non-json-content-types",{"type":49,"tag":83,"props":192,"children":193},{},[194,199,200],{"type":49,"tag":87,"props":195,"children":196},{},[197],{"type":55,"value":198},"Set up real-time subscriptions (SSE or WebSocket)",{"type":55,"value":93},{"type":49,"tag":95,"props":201,"children":203},{"className":202},[],[204],{"type":55,"value":205},"subscriptions",{"type":49,"tag":72,"props":207,"children":209},{"id":208},"host-the-trpc-api-adapters",[210],{"type":55,"value":211},"Host the tRPC API (adapters)",{"type":49,"tag":79,"props":213,"children":214},{},[215,230,245,260,275],{"type":49,"tag":83,"props":216,"children":217},{},[218,223,224],{"type":49,"tag":87,"props":219,"children":220},{},[221],{"type":55,"value":222},"Node.js built-in HTTP server (simplest, local dev)",{"type":55,"value":93},{"type":49,"tag":95,"props":225,"children":227},{"className":226},[],[228],{"type":55,"value":229},"adapter-standalone",{"type":49,"tag":83,"props":231,"children":232},{},[233,238,239],{"type":49,"tag":87,"props":234,"children":235},{},[236],{"type":55,"value":237},"Express middleware",{"type":55,"value":93},{"type":49,"tag":95,"props":240,"children":242},{"className":241},[],[243],{"type":55,"value":244},"adapter-express",{"type":49,"tag":83,"props":246,"children":247},{},[248,253,254],{"type":49,"tag":87,"props":249,"children":250},{},[251],{"type":55,"value":252},"Fastify plugin",{"type":55,"value":93},{"type":49,"tag":95,"props":255,"children":257},{"className":256},[],[258],{"type":55,"value":259},"adapter-fastify",{"type":49,"tag":83,"props":261,"children":262},{},[263,268,269],{"type":49,"tag":87,"props":264,"children":265},{},[266],{"type":55,"value":267},"AWS Lambda (API Gateway v1\u002Fv2, Function URLs)",{"type":55,"value":93},{"type":49,"tag":95,"props":270,"children":272},{"className":271},[],[273],{"type":55,"value":274},"adapter-aws-lambda",{"type":49,"tag":83,"props":276,"children":277},{},[278,283,284],{"type":49,"tag":87,"props":279,"children":280},{},[281],{"type":55,"value":282},"Fetch API \u002F Edge (Cloudflare Workers, Deno, Vercel Edge, Astro, Remix)",{"type":55,"value":93},{"type":49,"tag":95,"props":285,"children":287},{"className":286},[],[288],{"type":55,"value":289},"adapter-fetch",{"type":49,"tag":72,"props":291,"children":293},{"id":292},"consume-the-trpc-api-client",[294],{"type":55,"value":295},"Consume the tRPC API (client)",{"type":49,"tag":79,"props":297,"children":298},{},[299,314,329],{"type":49,"tag":83,"props":300,"children":301},{},[302,307,308],{"type":49,"tag":87,"props":303,"children":304},{},[305],{"type":55,"value":306},"Create a vanilla TypeScript client, configure links, headers, types",{"type":55,"value":93},{"type":49,"tag":95,"props":309,"children":311},{"className":310},[],[312],{"type":55,"value":313},"client-setup",{"type":49,"tag":83,"props":315,"children":316},{},[317,322,323],{"type":49,"tag":87,"props":318,"children":319},{},[320],{"type":55,"value":321},"Configure link chain (batching, streaming, splitting, WebSocket, SSE)",{"type":55,"value":93},{"type":49,"tag":95,"props":324,"children":326},{"className":325},[],[327],{"type":55,"value":328},"links",{"type":49,"tag":83,"props":330,"children":331},{},[332,337,338],{"type":49,"tag":87,"props":333,"children":334},{},[335],{"type":55,"value":336},"Use SuperJSON transformer for Date, Map, Set, BigInt",{"type":55,"value":93},{"type":49,"tag":95,"props":339,"children":341},{"className":340},[],[342],{"type":55,"value":343},"superjson",{"type":49,"tag":72,"props":345,"children":347},{"id":346},"use-trpc-with-a-framework",[348],{"type":55,"value":349},"Use tRPC with a framework",{"type":49,"tag":79,"props":351,"children":352},{},[353,368,383],{"type":49,"tag":83,"props":354,"children":355},{},[356,361,362],{"type":49,"tag":87,"props":357,"children":358},{},[359],{"type":55,"value":360},"React with TanStack Query (useQuery, useMutation, queryOptions)",{"type":55,"value":93},{"type":49,"tag":95,"props":363,"children":365},{"className":364},[],[366],{"type":55,"value":367},"react-query-setup",{"type":49,"tag":83,"props":369,"children":370},{},[371,376,377],{"type":49,"tag":87,"props":372,"children":373},{},[374],{"type":55,"value":375},"Next.js App Router (RSC, server components, HydrateClient)",{"type":55,"value":93},{"type":49,"tag":95,"props":378,"children":380},{"className":379},[],[381],{"type":55,"value":382},"nextjs-app-router",{"type":49,"tag":83,"props":384,"children":385},{},[386,391,392],{"type":49,"tag":87,"props":387,"children":388},{},[389],{"type":55,"value":390},"Next.js Pages Router (withTRPC, SSR, SSG helpers)",{"type":55,"value":93},{"type":49,"tag":95,"props":393,"children":395},{"className":394},[],[396],{"type":55,"value":397},"nextjs-pages-router",{"type":49,"tag":72,"props":399,"children":401},{"id":400},"advanced-patterns",[402],{"type":55,"value":403},"Advanced patterns",{"type":49,"tag":79,"props":405,"children":406},{},[407,422,437],{"type":49,"tag":83,"props":408,"children":409},{},[410,415,416],{"type":49,"tag":87,"props":411,"children":412},{},[413],{"type":55,"value":414},"Generate OpenAPI spec, REST client from tRPC router",{"type":55,"value":93},{"type":49,"tag":95,"props":417,"children":419},{"className":418},[],[420],{"type":55,"value":421},"openapi",{"type":49,"tag":83,"props":423,"children":424},{},[425,430,431],{"type":49,"tag":87,"props":426,"children":427},{},[428],{"type":55,"value":429},"Multi-service gateway, custom routing links, SOA",{"type":55,"value":93},{"type":49,"tag":95,"props":432,"children":434},{"className":433},[],[435],{"type":55,"value":436},"service-oriented-architecture",{"type":49,"tag":83,"props":438,"children":439},{},[440,445,446],{"type":49,"tag":87,"props":441,"children":442},{},[443],{"type":55,"value":444},"Auth middleware + client headers + subscription auth",{"type":55,"value":93},{"type":49,"tag":95,"props":447,"children":449},{"className":448},[],[450],{"type":55,"value":451},"auth",{"type":49,"tag":58,"props":453,"children":455},{"id":454},"quick-reference-minimal-working-app",[456],{"type":55,"value":457},"Quick Reference: Minimal Working App",{"type":49,"tag":459,"props":460,"children":465},"pre",{"className":461,"code":462,"language":463,"meta":464,"style":464},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F server\u002Ftrpc.ts\nimport { initTRPC } from '@trpc\u002Fserver';\n\nconst t = initTRPC.create();\n\nexport const router = t.router;\nexport const publicProcedure = t.procedure;\n","ts","",[466],{"type":49,"tag":95,"props":467,"children":468},{"__ignoreMap":464},[469,481,534,544,588,596,637],{"type":49,"tag":470,"props":471,"children":474},"span",{"class":472,"line":473},"line",1,[475],{"type":49,"tag":470,"props":476,"children":478},{"style":477},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[479],{"type":55,"value":480},"\u002F\u002F server\u002Ftrpc.ts\n",{"type":49,"tag":470,"props":482,"children":484},{"class":472,"line":483},2,[485,491,497,503,508,513,518,524,529],{"type":49,"tag":470,"props":486,"children":488},{"style":487},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[489],{"type":55,"value":490},"import",{"type":49,"tag":470,"props":492,"children":494},{"style":493},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[495],{"type":55,"value":496}," {",{"type":49,"tag":470,"props":498,"children":500},{"style":499},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[501],{"type":55,"value":502}," initTRPC",{"type":49,"tag":470,"props":504,"children":505},{"style":493},[506],{"type":55,"value":507}," }",{"type":49,"tag":470,"props":509,"children":510},{"style":487},[511],{"type":55,"value":512}," from",{"type":49,"tag":470,"props":514,"children":515},{"style":493},[516],{"type":55,"value":517}," '",{"type":49,"tag":470,"props":519,"children":521},{"style":520},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[522],{"type":55,"value":523},"@trpc\u002Fserver",{"type":49,"tag":470,"props":525,"children":526},{"style":493},[527],{"type":55,"value":528},"'",{"type":49,"tag":470,"props":530,"children":531},{"style":493},[532],{"type":55,"value":533},";\n",{"type":49,"tag":470,"props":535,"children":537},{"class":472,"line":536},3,[538],{"type":49,"tag":470,"props":539,"children":541},{"emptyLinePlaceholder":540},true,[542],{"type":55,"value":543},"\n",{"type":49,"tag":470,"props":545,"children":547},{"class":472,"line":546},4,[548,554,559,564,568,573,579,584],{"type":49,"tag":470,"props":549,"children":551},{"style":550},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[552],{"type":55,"value":553},"const",{"type":49,"tag":470,"props":555,"children":556},{"style":499},[557],{"type":55,"value":558}," t ",{"type":49,"tag":470,"props":560,"children":561},{"style":493},[562],{"type":55,"value":563},"=",{"type":49,"tag":470,"props":565,"children":566},{"style":499},[567],{"type":55,"value":502},{"type":49,"tag":470,"props":569,"children":570},{"style":493},[571],{"type":55,"value":572},".",{"type":49,"tag":470,"props":574,"children":576},{"style":575},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[577],{"type":55,"value":578},"create",{"type":49,"tag":470,"props":580,"children":581},{"style":499},[582],{"type":55,"value":583},"()",{"type":49,"tag":470,"props":585,"children":586},{"style":493},[587],{"type":55,"value":533},{"type":49,"tag":470,"props":589,"children":591},{"class":472,"line":590},5,[592],{"type":49,"tag":470,"props":593,"children":594},{"emptyLinePlaceholder":540},[595],{"type":55,"value":543},{"type":49,"tag":470,"props":597,"children":599},{"class":472,"line":598},6,[600,605,610,615,619,624,628,633],{"type":49,"tag":470,"props":601,"children":602},{"style":487},[603],{"type":55,"value":604},"export",{"type":49,"tag":470,"props":606,"children":607},{"style":550},[608],{"type":55,"value":609}," const",{"type":49,"tag":470,"props":611,"children":612},{"style":499},[613],{"type":55,"value":614}," router ",{"type":49,"tag":470,"props":616,"children":617},{"style":493},[618],{"type":55,"value":563},{"type":49,"tag":470,"props":620,"children":621},{"style":499},[622],{"type":55,"value":623}," t",{"type":49,"tag":470,"props":625,"children":626},{"style":493},[627],{"type":55,"value":572},{"type":49,"tag":470,"props":629,"children":630},{"style":499},[631],{"type":55,"value":632},"router",{"type":49,"tag":470,"props":634,"children":635},{"style":493},[636],{"type":55,"value":533},{"type":49,"tag":470,"props":638,"children":640},{"class":472,"line":639},7,[641,645,649,654,658,662,666,671],{"type":49,"tag":470,"props":642,"children":643},{"style":487},[644],{"type":55,"value":604},{"type":49,"tag":470,"props":646,"children":647},{"style":550},[648],{"type":55,"value":609},{"type":49,"tag":470,"props":650,"children":651},{"style":499},[652],{"type":55,"value":653}," publicProcedure ",{"type":49,"tag":470,"props":655,"children":656},{"style":493},[657],{"type":55,"value":563},{"type":49,"tag":470,"props":659,"children":660},{"style":499},[661],{"type":55,"value":623},{"type":49,"tag":470,"props":663,"children":664},{"style":493},[665],{"type":55,"value":572},{"type":49,"tag":470,"props":667,"children":668},{"style":499},[669],{"type":55,"value":670},"procedure",{"type":49,"tag":470,"props":672,"children":673},{"style":493},[674],{"type":55,"value":533},{"type":49,"tag":459,"props":676,"children":678},{"className":461,"code":677,"language":463,"meta":464,"style":464},"\u002F\u002F server\u002FappRouter.ts\nimport { z } from 'zod';\nimport { publicProcedure, router } from '.\u002Ftrpc';\n\nexport const appRouter = router({\n  hello: publicProcedure\n    .input(z.object({ name: z.string() }))\n    .query(({ input }) => ({ greeting: `Hello ${input.name}` })),\n});\n\nexport type AppRouter = typeof appRouter;\n",[679],{"type":49,"tag":95,"props":680,"children":681},{"__ignoreMap":464},[682,690,731,782,789,823,842,915,1018,1035,1043],{"type":49,"tag":470,"props":683,"children":684},{"class":472,"line":473},[685],{"type":49,"tag":470,"props":686,"children":687},{"style":477},[688],{"type":55,"value":689},"\u002F\u002F server\u002FappRouter.ts\n",{"type":49,"tag":470,"props":691,"children":692},{"class":472,"line":483},[693,697,701,706,710,714,718,723,727],{"type":49,"tag":470,"props":694,"children":695},{"style":487},[696],{"type":55,"value":490},{"type":49,"tag":470,"props":698,"children":699},{"style":493},[700],{"type":55,"value":496},{"type":49,"tag":470,"props":702,"children":703},{"style":499},[704],{"type":55,"value":705}," z",{"type":49,"tag":470,"props":707,"children":708},{"style":493},[709],{"type":55,"value":507},{"type":49,"tag":470,"props":711,"children":712},{"style":487},[713],{"type":55,"value":512},{"type":49,"tag":470,"props":715,"children":716},{"style":493},[717],{"type":55,"value":517},{"type":49,"tag":470,"props":719,"children":720},{"style":520},[721],{"type":55,"value":722},"zod",{"type":49,"tag":470,"props":724,"children":725},{"style":493},[726],{"type":55,"value":528},{"type":49,"tag":470,"props":728,"children":729},{"style":493},[730],{"type":55,"value":533},{"type":49,"tag":470,"props":732,"children":733},{"class":472,"line":536},[734,738,742,747,752,757,761,765,769,774,778],{"type":49,"tag":470,"props":735,"children":736},{"style":487},[737],{"type":55,"value":490},{"type":49,"tag":470,"props":739,"children":740},{"style":493},[741],{"type":55,"value":496},{"type":49,"tag":470,"props":743,"children":744},{"style":499},[745],{"type":55,"value":746}," publicProcedure",{"type":49,"tag":470,"props":748,"children":749},{"style":493},[750],{"type":55,"value":751},",",{"type":49,"tag":470,"props":753,"children":754},{"style":499},[755],{"type":55,"value":756}," router",{"type":49,"tag":470,"props":758,"children":759},{"style":493},[760],{"type":55,"value":507},{"type":49,"tag":470,"props":762,"children":763},{"style":487},[764],{"type":55,"value":512},{"type":49,"tag":470,"props":766,"children":767},{"style":493},[768],{"type":55,"value":517},{"type":49,"tag":470,"props":770,"children":771},{"style":520},[772],{"type":55,"value":773},".\u002Ftrpc",{"type":49,"tag":470,"props":775,"children":776},{"style":493},[777],{"type":55,"value":528},{"type":49,"tag":470,"props":779,"children":780},{"style":493},[781],{"type":55,"value":533},{"type":49,"tag":470,"props":783,"children":784},{"class":472,"line":546},[785],{"type":49,"tag":470,"props":786,"children":787},{"emptyLinePlaceholder":540},[788],{"type":55,"value":543},{"type":49,"tag":470,"props":790,"children":791},{"class":472,"line":590},[792,796,800,805,809,813,818],{"type":49,"tag":470,"props":793,"children":794},{"style":487},[795],{"type":55,"value":604},{"type":49,"tag":470,"props":797,"children":798},{"style":550},[799],{"type":55,"value":609},{"type":49,"tag":470,"props":801,"children":802},{"style":499},[803],{"type":55,"value":804}," appRouter ",{"type":49,"tag":470,"props":806,"children":807},{"style":493},[808],{"type":55,"value":563},{"type":49,"tag":470,"props":810,"children":811},{"style":575},[812],{"type":55,"value":756},{"type":49,"tag":470,"props":814,"children":815},{"style":499},[816],{"type":55,"value":817},"(",{"type":49,"tag":470,"props":819,"children":820},{"style":493},[821],{"type":55,"value":822},"{\n",{"type":49,"tag":470,"props":824,"children":825},{"class":472,"line":598},[826,832,837],{"type":49,"tag":470,"props":827,"children":829},{"style":828},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[830],{"type":55,"value":831},"  hello",{"type":49,"tag":470,"props":833,"children":834},{"style":493},[835],{"type":55,"value":836},":",{"type":49,"tag":470,"props":838,"children":839},{"style":499},[840],{"type":55,"value":841}," publicProcedure\n",{"type":49,"tag":470,"props":843,"children":844},{"class":472,"line":639},[845,850,855,860,864,869,873,878,883,887,891,895,900,905,910],{"type":49,"tag":470,"props":846,"children":847},{"style":493},[848],{"type":55,"value":849},"    .",{"type":49,"tag":470,"props":851,"children":852},{"style":575},[853],{"type":55,"value":854},"input",{"type":49,"tag":470,"props":856,"children":857},{"style":499},[858],{"type":55,"value":859},"(z",{"type":49,"tag":470,"props":861,"children":862},{"style":493},[863],{"type":55,"value":572},{"type":49,"tag":470,"props":865,"children":866},{"style":575},[867],{"type":55,"value":868},"object",{"type":49,"tag":470,"props":870,"children":871},{"style":499},[872],{"type":55,"value":817},{"type":49,"tag":470,"props":874,"children":875},{"style":493},[876],{"type":55,"value":877},"{",{"type":49,"tag":470,"props":879,"children":880},{"style":828},[881],{"type":55,"value":882}," name",{"type":49,"tag":470,"props":884,"children":885},{"style":493},[886],{"type":55,"value":836},{"type":49,"tag":470,"props":888,"children":889},{"style":499},[890],{"type":55,"value":705},{"type":49,"tag":470,"props":892,"children":893},{"style":493},[894],{"type":55,"value":572},{"type":49,"tag":470,"props":896,"children":897},{"style":575},[898],{"type":55,"value":899},"string",{"type":49,"tag":470,"props":901,"children":902},{"style":499},[903],{"type":55,"value":904},"() ",{"type":49,"tag":470,"props":906,"children":907},{"style":493},[908],{"type":55,"value":909},"}",{"type":49,"tag":470,"props":911,"children":912},{"style":499},[913],{"type":55,"value":914},"))\n",{"type":49,"tag":470,"props":916,"children":918},{"class":472,"line":917},8,[919,923,928,932,937,943,948,953,958,962,967,971,976,981,986,990,994,999,1004,1008,1013],{"type":49,"tag":470,"props":920,"children":921},{"style":493},[922],{"type":55,"value":849},{"type":49,"tag":470,"props":924,"children":925},{"style":575},[926],{"type":55,"value":927},"query",{"type":49,"tag":470,"props":929,"children":930},{"style":499},[931],{"type":55,"value":817},{"type":49,"tag":470,"props":933,"children":934},{"style":493},[935],{"type":55,"value":936},"({",{"type":49,"tag":470,"props":938,"children":940},{"style":939},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[941],{"type":55,"value":942}," input",{"type":49,"tag":470,"props":944,"children":945},{"style":493},[946],{"type":55,"value":947}," })",{"type":49,"tag":470,"props":949,"children":950},{"style":550},[951],{"type":55,"value":952}," =>",{"type":49,"tag":470,"props":954,"children":955},{"style":499},[956],{"type":55,"value":957}," (",{"type":49,"tag":470,"props":959,"children":960},{"style":493},[961],{"type":55,"value":877},{"type":49,"tag":470,"props":963,"children":964},{"style":828},[965],{"type":55,"value":966}," greeting",{"type":49,"tag":470,"props":968,"children":969},{"style":493},[970],{"type":55,"value":836},{"type":49,"tag":470,"props":972,"children":973},{"style":493},[974],{"type":55,"value":975}," `",{"type":49,"tag":470,"props":977,"children":978},{"style":520},[979],{"type":55,"value":980},"Hello ",{"type":49,"tag":470,"props":982,"children":983},{"style":493},[984],{"type":55,"value":985},"${",{"type":49,"tag":470,"props":987,"children":988},{"style":499},[989],{"type":55,"value":854},{"type":49,"tag":470,"props":991,"children":992},{"style":493},[993],{"type":55,"value":572},{"type":49,"tag":470,"props":995,"children":996},{"style":499},[997],{"type":55,"value":998},"name",{"type":49,"tag":470,"props":1000,"children":1001},{"style":493},[1002],{"type":55,"value":1003},"}`",{"type":49,"tag":470,"props":1005,"children":1006},{"style":493},[1007],{"type":55,"value":507},{"type":49,"tag":470,"props":1009,"children":1010},{"style":499},[1011],{"type":55,"value":1012},"))",{"type":49,"tag":470,"props":1014,"children":1015},{"style":493},[1016],{"type":55,"value":1017},",\n",{"type":49,"tag":470,"props":1019,"children":1021},{"class":472,"line":1020},9,[1022,1026,1031],{"type":49,"tag":470,"props":1023,"children":1024},{"style":493},[1025],{"type":55,"value":909},{"type":49,"tag":470,"props":1027,"children":1028},{"style":499},[1029],{"type":55,"value":1030},")",{"type":49,"tag":470,"props":1032,"children":1033},{"style":493},[1034],{"type":55,"value":533},{"type":49,"tag":470,"props":1036,"children":1038},{"class":472,"line":1037},10,[1039],{"type":49,"tag":470,"props":1040,"children":1041},{"emptyLinePlaceholder":540},[1042],{"type":55,"value":543},{"type":49,"tag":470,"props":1044,"children":1046},{"class":472,"line":1045},11,[1047,1051,1056,1062,1067,1072,1077],{"type":49,"tag":470,"props":1048,"children":1049},{"style":487},[1050],{"type":55,"value":604},{"type":49,"tag":470,"props":1052,"children":1053},{"style":550},[1054],{"type":55,"value":1055}," type",{"type":49,"tag":470,"props":1057,"children":1059},{"style":1058},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[1060],{"type":55,"value":1061}," AppRouter",{"type":49,"tag":470,"props":1063,"children":1064},{"style":493},[1065],{"type":55,"value":1066}," =",{"type":49,"tag":470,"props":1068,"children":1069},{"style":493},[1070],{"type":55,"value":1071}," typeof",{"type":49,"tag":470,"props":1073,"children":1074},{"style":499},[1075],{"type":55,"value":1076}," appRouter",{"type":49,"tag":470,"props":1078,"children":1079},{"style":493},[1080],{"type":55,"value":533},{"type":49,"tag":459,"props":1082,"children":1084},{"className":461,"code":1083,"language":463,"meta":464,"style":464},"\u002F\u002F server\u002Findex.ts\nimport { createHTTPServer } from '@trpc\u002Fserver\u002Fadapters\u002Fstandalone';\nimport { appRouter } from '.\u002FappRouter';\n\nconst server = createHTTPServer({ router: appRouter });\nserver.listen(3000);\n",[1085],{"type":49,"tag":95,"props":1086,"children":1087},{"__ignoreMap":464},[1088,1096,1137,1177,1184,1236],{"type":49,"tag":470,"props":1089,"children":1090},{"class":472,"line":473},[1091],{"type":49,"tag":470,"props":1092,"children":1093},{"style":477},[1094],{"type":55,"value":1095},"\u002F\u002F server\u002Findex.ts\n",{"type":49,"tag":470,"props":1097,"children":1098},{"class":472,"line":483},[1099,1103,1107,1112,1116,1120,1124,1129,1133],{"type":49,"tag":470,"props":1100,"children":1101},{"style":487},[1102],{"type":55,"value":490},{"type":49,"tag":470,"props":1104,"children":1105},{"style":493},[1106],{"type":55,"value":496},{"type":49,"tag":470,"props":1108,"children":1109},{"style":499},[1110],{"type":55,"value":1111}," createHTTPServer",{"type":49,"tag":470,"props":1113,"children":1114},{"style":493},[1115],{"type":55,"value":507},{"type":49,"tag":470,"props":1117,"children":1118},{"style":487},[1119],{"type":55,"value":512},{"type":49,"tag":470,"props":1121,"children":1122},{"style":493},[1123],{"type":55,"value":517},{"type":49,"tag":470,"props":1125,"children":1126},{"style":520},[1127],{"type":55,"value":1128},"@trpc\u002Fserver\u002Fadapters\u002Fstandalone",{"type":49,"tag":470,"props":1130,"children":1131},{"style":493},[1132],{"type":55,"value":528},{"type":49,"tag":470,"props":1134,"children":1135},{"style":493},[1136],{"type":55,"value":533},{"type":49,"tag":470,"props":1138,"children":1139},{"class":472,"line":536},[1140,1144,1148,1152,1156,1160,1164,1169,1173],{"type":49,"tag":470,"props":1141,"children":1142},{"style":487},[1143],{"type":55,"value":490},{"type":49,"tag":470,"props":1145,"children":1146},{"style":493},[1147],{"type":55,"value":496},{"type":49,"tag":470,"props":1149,"children":1150},{"style":499},[1151],{"type":55,"value":1076},{"type":49,"tag":470,"props":1153,"children":1154},{"style":493},[1155],{"type":55,"value":507},{"type":49,"tag":470,"props":1157,"children":1158},{"style":487},[1159],{"type":55,"value":512},{"type":49,"tag":470,"props":1161,"children":1162},{"style":493},[1163],{"type":55,"value":517},{"type":49,"tag":470,"props":1165,"children":1166},{"style":520},[1167],{"type":55,"value":1168},".\u002FappRouter",{"type":49,"tag":470,"props":1170,"children":1171},{"style":493},[1172],{"type":55,"value":528},{"type":49,"tag":470,"props":1174,"children":1175},{"style":493},[1176],{"type":55,"value":533},{"type":49,"tag":470,"props":1178,"children":1179},{"class":472,"line":546},[1180],{"type":49,"tag":470,"props":1181,"children":1182},{"emptyLinePlaceholder":540},[1183],{"type":55,"value":543},{"type":49,"tag":470,"props":1185,"children":1186},{"class":472,"line":590},[1187,1191,1196,1200,1204,1208,1212,1216,1220,1224,1228,1232],{"type":49,"tag":470,"props":1188,"children":1189},{"style":550},[1190],{"type":55,"value":553},{"type":49,"tag":470,"props":1192,"children":1193},{"style":499},[1194],{"type":55,"value":1195}," server ",{"type":49,"tag":470,"props":1197,"children":1198},{"style":493},[1199],{"type":55,"value":563},{"type":49,"tag":470,"props":1201,"children":1202},{"style":575},[1203],{"type":55,"value":1111},{"type":49,"tag":470,"props":1205,"children":1206},{"style":499},[1207],{"type":55,"value":817},{"type":49,"tag":470,"props":1209,"children":1210},{"style":493},[1211],{"type":55,"value":877},{"type":49,"tag":470,"props":1213,"children":1214},{"style":828},[1215],{"type":55,"value":756},{"type":49,"tag":470,"props":1217,"children":1218},{"style":493},[1219],{"type":55,"value":836},{"type":49,"tag":470,"props":1221,"children":1222},{"style":499},[1223],{"type":55,"value":804},{"type":49,"tag":470,"props":1225,"children":1226},{"style":493},[1227],{"type":55,"value":909},{"type":49,"tag":470,"props":1229,"children":1230},{"style":499},[1231],{"type":55,"value":1030},{"type":49,"tag":470,"props":1233,"children":1234},{"style":493},[1235],{"type":55,"value":533},{"type":49,"tag":470,"props":1237,"children":1238},{"class":472,"line":598},[1239,1244,1248,1253,1257,1263,1267],{"type":49,"tag":470,"props":1240,"children":1241},{"style":499},[1242],{"type":55,"value":1243},"server",{"type":49,"tag":470,"props":1245,"children":1246},{"style":493},[1247],{"type":55,"value":572},{"type":49,"tag":470,"props":1249,"children":1250},{"style":575},[1251],{"type":55,"value":1252},"listen",{"type":49,"tag":470,"props":1254,"children":1255},{"style":499},[1256],{"type":55,"value":817},{"type":49,"tag":470,"props":1258,"children":1260},{"style":1259},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[1261],{"type":55,"value":1262},"3000",{"type":49,"tag":470,"props":1264,"children":1265},{"style":499},[1266],{"type":55,"value":1030},{"type":49,"tag":470,"props":1268,"children":1269},{"style":493},[1270],{"type":55,"value":533},{"type":49,"tag":459,"props":1272,"children":1274},{"className":461,"code":1273,"language":463,"meta":464,"style":464},"\u002F\u002F client\u002Findex.ts\nimport { createTRPCClient, httpBatchLink } from '@trpc\u002Fclient';\nimport type { AppRouter } from '..\u002Fserver\u002FappRouter';\n\nconst trpc = createTRPCClient\u003CAppRouter>({\n  links: [httpBatchLink({ url: 'http:\u002F\u002Flocalhost:3000' })],\n});\n\nconst result = await trpc.hello.query({ name: 'World' });\n",[1275],{"type":49,"tag":95,"props":1276,"children":1277},{"__ignoreMap":464},[1278,1286,1336,1380,1387,1430,1495,1510,1517],{"type":49,"tag":470,"props":1279,"children":1280},{"class":472,"line":473},[1281],{"type":49,"tag":470,"props":1282,"children":1283},{"style":477},[1284],{"type":55,"value":1285},"\u002F\u002F client\u002Findex.ts\n",{"type":49,"tag":470,"props":1287,"children":1288},{"class":472,"line":483},[1289,1293,1297,1302,1306,1311,1315,1319,1323,1328,1332],{"type":49,"tag":470,"props":1290,"children":1291},{"style":487},[1292],{"type":55,"value":490},{"type":49,"tag":470,"props":1294,"children":1295},{"style":493},[1296],{"type":55,"value":496},{"type":49,"tag":470,"props":1298,"children":1299},{"style":499},[1300],{"type":55,"value":1301}," createTRPCClient",{"type":49,"tag":470,"props":1303,"children":1304},{"style":493},[1305],{"type":55,"value":751},{"type":49,"tag":470,"props":1307,"children":1308},{"style":499},[1309],{"type":55,"value":1310}," httpBatchLink",{"type":49,"tag":470,"props":1312,"children":1313},{"style":493},[1314],{"type":55,"value":507},{"type":49,"tag":470,"props":1316,"children":1317},{"style":487},[1318],{"type":55,"value":512},{"type":49,"tag":470,"props":1320,"children":1321},{"style":493},[1322],{"type":55,"value":517},{"type":49,"tag":470,"props":1324,"children":1325},{"style":520},[1326],{"type":55,"value":1327},"@trpc\u002Fclient",{"type":49,"tag":470,"props":1329,"children":1330},{"style":493},[1331],{"type":55,"value":528},{"type":49,"tag":470,"props":1333,"children":1334},{"style":493},[1335],{"type":55,"value":533},{"type":49,"tag":470,"props":1337,"children":1338},{"class":472,"line":536},[1339,1343,1347,1351,1355,1359,1363,1367,1372,1376],{"type":49,"tag":470,"props":1340,"children":1341},{"style":487},[1342],{"type":55,"value":490},{"type":49,"tag":470,"props":1344,"children":1345},{"style":487},[1346],{"type":55,"value":1055},{"type":49,"tag":470,"props":1348,"children":1349},{"style":493},[1350],{"type":55,"value":496},{"type":49,"tag":470,"props":1352,"children":1353},{"style":499},[1354],{"type":55,"value":1061},{"type":49,"tag":470,"props":1356,"children":1357},{"style":493},[1358],{"type":55,"value":507},{"type":49,"tag":470,"props":1360,"children":1361},{"style":487},[1362],{"type":55,"value":512},{"type":49,"tag":470,"props":1364,"children":1365},{"style":493},[1366],{"type":55,"value":517},{"type":49,"tag":470,"props":1368,"children":1369},{"style":520},[1370],{"type":55,"value":1371},"..\u002Fserver\u002FappRouter",{"type":49,"tag":470,"props":1373,"children":1374},{"style":493},[1375],{"type":55,"value":528},{"type":49,"tag":470,"props":1377,"children":1378},{"style":493},[1379],{"type":55,"value":533},{"type":49,"tag":470,"props":1381,"children":1382},{"class":472,"line":546},[1383],{"type":49,"tag":470,"props":1384,"children":1385},{"emptyLinePlaceholder":540},[1386],{"type":55,"value":543},{"type":49,"tag":470,"props":1388,"children":1389},{"class":472,"line":590},[1390,1394,1399,1403,1407,1412,1417,1422,1426],{"type":49,"tag":470,"props":1391,"children":1392},{"style":550},[1393],{"type":55,"value":553},{"type":49,"tag":470,"props":1395,"children":1396},{"style":499},[1397],{"type":55,"value":1398}," trpc ",{"type":49,"tag":470,"props":1400,"children":1401},{"style":493},[1402],{"type":55,"value":563},{"type":49,"tag":470,"props":1404,"children":1405},{"style":575},[1406],{"type":55,"value":1301},{"type":49,"tag":470,"props":1408,"children":1409},{"style":493},[1410],{"type":55,"value":1411},"\u003C",{"type":49,"tag":470,"props":1413,"children":1414},{"style":1058},[1415],{"type":55,"value":1416},"AppRouter",{"type":49,"tag":470,"props":1418,"children":1419},{"style":493},[1420],{"type":55,"value":1421},">",{"type":49,"tag":470,"props":1423,"children":1424},{"style":499},[1425],{"type":55,"value":817},{"type":49,"tag":470,"props":1427,"children":1428},{"style":493},[1429],{"type":55,"value":822},{"type":49,"tag":470,"props":1431,"children":1432},{"class":472,"line":598},[1433,1438,1442,1447,1452,1456,1460,1465,1469,1473,1478,1482,1486,1491],{"type":49,"tag":470,"props":1434,"children":1435},{"style":828},[1436],{"type":55,"value":1437},"  links",{"type":49,"tag":470,"props":1439,"children":1440},{"style":493},[1441],{"type":55,"value":836},{"type":49,"tag":470,"props":1443,"children":1444},{"style":499},[1445],{"type":55,"value":1446}," [",{"type":49,"tag":470,"props":1448,"children":1449},{"style":575},[1450],{"type":55,"value":1451},"httpBatchLink",{"type":49,"tag":470,"props":1453,"children":1454},{"style":499},[1455],{"type":55,"value":817},{"type":49,"tag":470,"props":1457,"children":1458},{"style":493},[1459],{"type":55,"value":877},{"type":49,"tag":470,"props":1461,"children":1462},{"style":828},[1463],{"type":55,"value":1464}," url",{"type":49,"tag":470,"props":1466,"children":1467},{"style":493},[1468],{"type":55,"value":836},{"type":49,"tag":470,"props":1470,"children":1471},{"style":493},[1472],{"type":55,"value":517},{"type":49,"tag":470,"props":1474,"children":1475},{"style":520},[1476],{"type":55,"value":1477},"http:\u002F\u002Flocalhost:3000",{"type":49,"tag":470,"props":1479,"children":1480},{"style":493},[1481],{"type":55,"value":528},{"type":49,"tag":470,"props":1483,"children":1484},{"style":493},[1485],{"type":55,"value":507},{"type":49,"tag":470,"props":1487,"children":1488},{"style":499},[1489],{"type":55,"value":1490},")]",{"type":49,"tag":470,"props":1492,"children":1493},{"style":493},[1494],{"type":55,"value":1017},{"type":49,"tag":470,"props":1496,"children":1497},{"class":472,"line":639},[1498,1502,1506],{"type":49,"tag":470,"props":1499,"children":1500},{"style":493},[1501],{"type":55,"value":909},{"type":49,"tag":470,"props":1503,"children":1504},{"style":499},[1505],{"type":55,"value":1030},{"type":49,"tag":470,"props":1507,"children":1508},{"style":493},[1509],{"type":55,"value":533},{"type":49,"tag":470,"props":1511,"children":1512},{"class":472,"line":917},[1513],{"type":49,"tag":470,"props":1514,"children":1515},{"emptyLinePlaceholder":540},[1516],{"type":55,"value":543},{"type":49,"tag":470,"props":1518,"children":1519},{"class":472,"line":1020},[1520,1524,1529,1533,1538,1543,1547,1552,1556,1560,1564,1568,1572,1576,1580,1585,1589,1593,1597],{"type":49,"tag":470,"props":1521,"children":1522},{"style":550},[1523],{"type":55,"value":553},{"type":49,"tag":470,"props":1525,"children":1526},{"style":499},[1527],{"type":55,"value":1528}," result ",{"type":49,"tag":470,"props":1530,"children":1531},{"style":493},[1532],{"type":55,"value":563},{"type":49,"tag":470,"props":1534,"children":1535},{"style":487},[1536],{"type":55,"value":1537}," await",{"type":49,"tag":470,"props":1539,"children":1540},{"style":499},[1541],{"type":55,"value":1542}," trpc",{"type":49,"tag":470,"props":1544,"children":1545},{"style":493},[1546],{"type":55,"value":572},{"type":49,"tag":470,"props":1548,"children":1549},{"style":499},[1550],{"type":55,"value":1551},"hello",{"type":49,"tag":470,"props":1553,"children":1554},{"style":493},[1555],{"type":55,"value":572},{"type":49,"tag":470,"props":1557,"children":1558},{"style":575},[1559],{"type":55,"value":927},{"type":49,"tag":470,"props":1561,"children":1562},{"style":499},[1563],{"type":55,"value":817},{"type":49,"tag":470,"props":1565,"children":1566},{"style":493},[1567],{"type":55,"value":877},{"type":49,"tag":470,"props":1569,"children":1570},{"style":828},[1571],{"type":55,"value":882},{"type":49,"tag":470,"props":1573,"children":1574},{"style":493},[1575],{"type":55,"value":836},{"type":49,"tag":470,"props":1577,"children":1578},{"style":493},[1579],{"type":55,"value":517},{"type":49,"tag":470,"props":1581,"children":1582},{"style":520},[1583],{"type":55,"value":1584},"World",{"type":49,"tag":470,"props":1586,"children":1587},{"style":493},[1588],{"type":55,"value":528},{"type":49,"tag":470,"props":1590,"children":1591},{"style":493},[1592],{"type":55,"value":507},{"type":49,"tag":470,"props":1594,"children":1595},{"style":499},[1596],{"type":55,"value":1030},{"type":49,"tag":470,"props":1598,"children":1599},{"style":493},[1600],{"type":55,"value":533},{"type":49,"tag":58,"props":1602,"children":1604},{"id":1603},"see-also",[1605],{"type":55,"value":1606},"See Also",{"type":49,"tag":79,"props":1608,"children":1609},{},[1610,1620,1630,1640,1650],{"type":49,"tag":83,"props":1611,"children":1612},{},[1613,1618],{"type":49,"tag":95,"props":1614,"children":1616},{"className":1615},[],[1617],{"type":55,"value":100},{"type":55,"value":1619}," -- full server initialization details",{"type":49,"tag":83,"props":1621,"children":1622},{},[1623,1628],{"type":49,"tag":95,"props":1624,"children":1626},{"className":1625},[],[1627],{"type":55,"value":313},{"type":55,"value":1629}," -- full client configuration",{"type":49,"tag":83,"props":1631,"children":1632},{},[1633,1638],{"type":49,"tag":95,"props":1634,"children":1636},{"className":1635},[],[1637],{"type":55,"value":229},{"type":55,"value":1639}," -- simplest adapter for getting started",{"type":49,"tag":83,"props":1641,"children":1642},{},[1643,1648],{"type":49,"tag":95,"props":1644,"children":1646},{"className":1645},[],[1647],{"type":55,"value":367},{"type":55,"value":1649}," -- React integration",{"type":49,"tag":83,"props":1651,"children":1652},{},[1653,1658],{"type":49,"tag":95,"props":1654,"children":1656},{"className":1655},[],[1657],{"type":55,"value":382},{"type":55,"value":1659}," -- Next.js App Router integration",{"type":49,"tag":1661,"props":1662,"children":1663},"style",{},[1664],{"type":55,"value":1665},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":1667,"total":1818},[1668,1680,1692,1704,1723,1735,1748,1761,1772,1785,1794,1805],{"slug":274,"name":274,"fn":1669,"description":1670,"org":1671,"tags":1672,"stars":20,"repoUrl":21,"updatedAt":1679},"deploy tRPC APIs on AWS Lambda","Deploy tRPC on AWS Lambda with awsLambdaRequestHandler() from @trpc\u002Fserver\u002Fadapters\u002Faws-lambda for API Gateway v1 (REST, APIGatewayProxyEvent) and v2 (HTTP, APIGatewayProxyEventV2), and Lambda Function URLs. Enable response streaming with awsLambdaStreamingRequestHandler() wrapped in awslambda.streamifyResponse(). CreateAWSLambdaContextOptions provides event and context for context creation.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1673,1674,1677,1678],{"name":18,"slug":19,"type":15},{"name":1675,"slug":1676,"type":15},"AWS","aws",{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},"2026-07-18T05:47:05.451869",{"slug":244,"name":244,"fn":1681,"description":1682,"org":1683,"tags":1684,"stars":20,"repoUrl":21,"updatedAt":1691},"mount tRPC as Express middleware","Mount tRPC as Express middleware with createExpressMiddleware() from @trpc\u002Fserver\u002Fadapters\u002Fexpress. Access Express req\u002Fres in createContext via CreateExpressContextOptions. Mount at a path prefix like app.use('\u002Ftrpc', ...). Avoid global express.json() conflicting with tRPC body parsing for FormData.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1685,1686,1687,1690],{"name":18,"slug":19,"type":15},{"name":13,"slug":14,"type":15},{"name":1688,"slug":1689,"type":15},"Express","express",{"name":9,"slug":8,"type":15},"2026-07-18T05:46:53.274248",{"slug":259,"name":259,"fn":1693,"description":1694,"org":1695,"tags":1696,"stars":20,"repoUrl":21,"updatedAt":1703},"mount tRPC as a Fastify plugin","Mount tRPC as a Fastify plugin with fastifyTRPCPlugin from @trpc\u002Fserver\u002Fadapters\u002Ffastify. Configure prefix, trpcOptions (router, createContext, onError). Enable WebSocket subscriptions with useWSS and @fastify\u002Fwebsocket. Set routerOptions.maxParamLength for batch requests. Requires Fastify v5+. FastifyTRPCPluginOptions for type-safe onError. CreateFastifyContextOptions provides req, res.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1697,1698,1699,1702],{"name":18,"slug":19,"type":15},{"name":13,"slug":14,"type":15},{"name":1700,"slug":1701,"type":15},"Fastify","fastify",{"name":9,"slug":8,"type":15},"2026-07-18T05:46:53.746621",{"slug":289,"name":289,"fn":1705,"description":1706,"org":1707,"tags":1708,"stars":20,"repoUrl":21,"updatedAt":1722},"deploy tRPC on edge runtimes","Deploy tRPC on WinterCG-compliant edge runtimes with fetchRequestHandler() from @trpc\u002Fserver\u002Fadapters\u002Ffetch. Supports Cloudflare Workers, Deno Deploy, Vercel Edge Runtime, Astro, Remix, SolidStart. FetchCreateContextFnOptions provides req (Request) and resHeaders (Headers) for context creation. The endpoint option must match the URL path prefix where the handler is mounted.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1709,1712,1715,1718,1719],{"name":1710,"slug":1711,"type":15},"Cloudflare","cloudflare",{"name":1713,"slug":1714,"type":15},"Deployment","deployment",{"name":1716,"slug":1717,"type":15},"Edge","edge",{"name":9,"slug":8,"type":15},{"name":1720,"slug":1721,"type":15},"Vercel","vercel","2026-07-18T05:46:50.548228",{"slug":229,"name":229,"fn":1724,"description":1725,"org":1726,"tags":1727,"stars":20,"repoUrl":21,"updatedAt":1734},"mount tRPC on Node.js servers","Mount tRPC on Node.js built-in HTTP server with createHTTPServer() from @trpc\u002Fserver\u002Fadapters\u002Fstandalone, createHTTPHandler() for custom http.createServer, createHTTP2Handler() for HTTP\u002F2 with TLS. Configure basePath to slice URL prefix, CORS via the cors npm package passed as middleware option. CreateHTTPContextOptions provides req and res for context creation.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1728,1729,1730,1733],{"name":18,"slug":19,"type":15},{"name":13,"slug":14,"type":15},{"name":1731,"slug":1732,"type":15},"Node.js","node-js",{"name":9,"slug":8,"type":15},"2026-07-18T05:46:58.093869",{"slug":451,"name":451,"fn":1736,"description":1737,"org":1738,"tags":1739,"stars":20,"repoUrl":21,"updatedAt":1747},"implement authentication in tRPC applications","Implement JWT\u002Fcookie authentication and authorization in tRPC using createContext for user extraction, t.middleware with opts.next({ ctx }) for context narrowing to non-null user, protectedProcedure base pattern, client-side Authorization headers via httpBatchLink headers(), WebSocket connectionParams, and SSE auth via cookies or EventSource polyfill custom headers.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1740,1742,1745,1746],{"name":1741,"slug":451,"type":15},"Auth",{"name":1743,"slug":1744,"type":15},"Authentication","authentication",{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},"2026-07-18T05:46:45.347628",{"slug":175,"name":175,"fn":1749,"description":1750,"org":1751,"tags":1752,"stars":20,"repoUrl":21,"updatedAt":1760},"configure HTTP caching for tRPC queries","Set HTTP cache headers on tRPC query responses via responseMeta callback for CDN and browser caching. Configure Cache-Control, s-maxage, stale-while-revalidate. Handle caching with batching and authenticated requests. Avoid caching mutations, errors, and authenticated responses.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1753,1754,1756,1759],{"name":13,"slug":14,"type":15},{"name":1755,"slug":175,"type":15},"Caching",{"name":1757,"slug":1758,"type":15},"Performance","performance",{"name":9,"slug":8,"type":15},"2026-07-18T05:46:45.86443",{"slug":313,"name":313,"fn":1762,"description":1763,"org":1764,"tags":1765,"stars":20,"repoUrl":21,"updatedAt":1771},"set up vanilla tRPC clients","Create a vanilla tRPC client with createTRPCClient\u003CAppRouter>(), configure link chain with httpBatchLink\u002FhttpLink, dynamic headers for auth, transformer on links (not client constructor). Infer types with inferRouterInputs and inferRouterOutputs. AbortController signal support. TRPCClientError typing.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1766,1767,1770],{"name":18,"slug":19,"type":15},{"name":1768,"slug":1769,"type":15},"Frontend","frontend",{"name":9,"slug":8,"type":15},"2026-07-18T05:48:11.437946",{"slug":145,"name":145,"fn":1773,"description":1774,"org":1775,"tags":1776,"stars":20,"repoUrl":21,"updatedAt":1784},"implement typed error handling in tRPC","Throw typed errors with TRPCError and error codes (NOT_FOUND, UNAUTHORIZED, BAD_REQUEST, INTERNAL_SERVER_ERROR), configure errorFormatter for client-side Zod error display, handle errors globally with onError callback, map tRPC errors to HTTP status codes with getHTTPStatusCodeFromError().\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1777,1778,1781,1782],{"name":13,"slug":14,"type":15},{"name":1779,"slug":1780,"type":15},"Debugging","debugging",{"name":9,"slug":8,"type":15},{"name":1783,"slug":31,"type":15},"TypeScript","2026-07-18T05:46:52.798151",{"slug":328,"name":328,"fn":1786,"description":1787,"org":1788,"tags":1789,"stars":20,"repoUrl":21,"updatedAt":1793},"configure tRPC client link chains","Configure the tRPC client link chain: httpLink, httpBatchLink, httpBatchStreamLink, splitLink, loggerLink, wsLink, createWSClient, httpSubscriptionLink, unstable_localLink, retryLink. Choose the right terminating link. Route subscriptions via splitLink. Build custom links for SOA routing. Link options: url, headers, transformer, maxURLLength, maxItems, connectionParams, EventSource ponyfill.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1790,1791,1792],{"name":18,"slug":19,"type":15},{"name":1768,"slug":1769,"type":15},{"name":9,"slug":8,"type":15},"2026-07-18T05:47:06.847309",{"slug":115,"name":115,"fn":1795,"description":1796,"org":1797,"tags":1798,"stars":20,"repoUrl":21,"updatedAt":1804},"compose middleware for tRPC procedures","Create and compose tRPC middleware with t.procedure.use(), extend context via opts.next({ ctx }), build reusable middleware with .concat() and .unstable_pipe(), define base procedures like publicProcedure and authedProcedure. Access raw input with getRawInput(). Logging, timing, OTEL tracing patterns.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1799,1800,1803],{"name":13,"slug":14,"type":15},{"name":1801,"slug":1802,"type":15},"Middleware","middleware",{"name":9,"slug":8,"type":15},"2026-07-18T05:46:49.132255",{"slug":382,"name":382,"fn":1806,"description":1807,"org":1808,"tags":1809,"stars":20,"repoUrl":21,"updatedAt":1817},"implement tRPC in Next.js App Router","Full end-to-end tRPC setup for Next.js App Router. Covers route handler with fetchRequestHandler (GET + POST exports), TRPCProvider with QueryClientProvider, createTRPCOptionsProxy for RSC prefetching, HydrateClient\u002FHydrationBoundary for hydration, useSuspenseQuery for Suspense, and server-side callers.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1810,1811,1812,1815,1816],{"name":13,"slug":14,"type":15},{"name":1768,"slug":1769,"type":15},{"name":1813,"slug":1814,"type":15},"Next.js","next-js",{"name":9,"slug":8,"type":15},{"name":1783,"slug":31,"type":15},"2026-07-18T05:47:10.468453",24,{"items":1820,"total":1818},[1821,1828,1835,1842,1850,1857,1864],{"slug":274,"name":274,"fn":1669,"description":1670,"org":1822,"tags":1823,"stars":20,"repoUrl":21,"updatedAt":1679},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1824,1825,1826,1827],{"name":18,"slug":19,"type":15},{"name":1675,"slug":1676,"type":15},{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},{"slug":244,"name":244,"fn":1681,"description":1682,"org":1829,"tags":1830,"stars":20,"repoUrl":21,"updatedAt":1691},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1831,1832,1833,1834],{"name":18,"slug":19,"type":15},{"name":13,"slug":14,"type":15},{"name":1688,"slug":1689,"type":15},{"name":9,"slug":8,"type":15},{"slug":259,"name":259,"fn":1693,"description":1694,"org":1836,"tags":1837,"stars":20,"repoUrl":21,"updatedAt":1703},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1838,1839,1840,1841],{"name":18,"slug":19,"type":15},{"name":13,"slug":14,"type":15},{"name":1700,"slug":1701,"type":15},{"name":9,"slug":8,"type":15},{"slug":289,"name":289,"fn":1705,"description":1706,"org":1843,"tags":1844,"stars":20,"repoUrl":21,"updatedAt":1722},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1845,1846,1847,1848,1849],{"name":1710,"slug":1711,"type":15},{"name":1713,"slug":1714,"type":15},{"name":1716,"slug":1717,"type":15},{"name":9,"slug":8,"type":15},{"name":1720,"slug":1721,"type":15},{"slug":229,"name":229,"fn":1724,"description":1725,"org":1851,"tags":1852,"stars":20,"repoUrl":21,"updatedAt":1734},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1853,1854,1855,1856],{"name":18,"slug":19,"type":15},{"name":13,"slug":14,"type":15},{"name":1731,"slug":1732,"type":15},{"name":9,"slug":8,"type":15},{"slug":451,"name":451,"fn":1736,"description":1737,"org":1858,"tags":1859,"stars":20,"repoUrl":21,"updatedAt":1747},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1860,1861,1862,1863],{"name":1741,"slug":451,"type":15},{"name":1743,"slug":1744,"type":15},{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},{"slug":175,"name":175,"fn":1749,"description":1750,"org":1865,"tags":1866,"stars":20,"repoUrl":21,"updatedAt":1760},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1867,1868,1869,1870],{"name":13,"slug":14,"type":15},{"name":1755,"slug":175,"type":15},{"name":1757,"slug":1758,"type":15},{"name":9,"slug":8,"type":15}]