[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-trpc-client-setup":3,"mdc-hca9cj-key":37,"related-repo-trpc-client-setup":4641,"related-org-trpc-client-setup":4746},{"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},"client-setup","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},"trpc","tRPC","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Ftrpc.png",[12,14,17],{"name":9,"slug":8,"type":13},"tag",{"name":15,"slug":16,"type":13},"API Development","api-development",{"name":18,"slug":19,"type":13},"Frontend","frontend",40424,"https:\u002F\u002Fgithub.com\u002Ftrpc\u002Ftrpc","2026-07-18T05:48:11.437946",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\u002Fclient\u002Fskills\u002Fclient-setup","---\nname: client-setup\ndescription: >\n  Create a vanilla tRPC client with createTRPCClient\u003CAppRouter>(), configure\n  link chain with httpBatchLink\u002FhttpLink, dynamic headers for auth, transformer\n  on links (not client constructor). Infer types with inferRouterInputs and\n  inferRouterOutputs. AbortController signal support. TRPCClientError typing.\ntype: core\nlibrary: trpc\nlibrary_version: '11.16.0'\nrequires:\n  - server-setup\nsources:\n  - www\u002Fdocs\u002Fclient\u002Foverview.md\n  - www\u002Fdocs\u002Fclient\u002Fvanilla\u002Foverview.md\n  - www\u002Fdocs\u002Fclient\u002Fvanilla\u002Fsetup.mdx\n  - www\u002Fdocs\u002Fclient\u002Fvanilla\u002Finfer-types.md\n  - www\u002Fdocs\u002Fclient\u002Fheaders.md\n  - packages\u002Fclient\u002Fsrc\u002Finternals\u002FTRPCUntypedClient.ts\n---\n\n# tRPC -- Client Setup\n\n## Setup\n\n```ts\n\u002F\u002F server.ts\nimport { initTRPC } from '@trpc\u002Fserver';\nimport { z } from 'zod';\n\nconst t = initTRPC.create();\n\nconst appRouter = t.router({\n  user: t.router({\n    byId: t.procedure\n      .input(z.object({ id: z.string() }))\n      .query(({ input }) => ({ id: input.id, name: 'Bilbo' })),\n    create: t.procedure\n      .input(z.object({ name: z.string() }))\n      .mutation(({ input }) => ({ id: '1', ...input })),\n  }),\n});\n\nexport type AppRouter = typeof appRouter;\n```\n\n```ts\n\u002F\u002F client.ts\nimport { createTRPCClient, httpBatchLink } from '@trpc\u002Fclient';\nimport type { AppRouter } from '.\u002Fserver';\n\nconst client = createTRPCClient\u003CAppRouter>({\n  links: [\n    httpBatchLink({\n      url: 'http:\u002F\u002Flocalhost:3000\u002Ftrpc',\n    }),\n  ],\n});\n\nconst user = await client.user.byId.query({ id: '1' });\nconst created = await client.user.create.mutate({ name: 'Frodo' });\n```\n\n## Core Patterns\n\n### Dynamic Auth Headers\n\n```ts\nimport { createTRPCClient, httpBatchLink } from '@trpc\u002Fclient';\nimport type { AppRouter } from '.\u002Fserver';\n\nlet token = '';\n\nexport function setToken(newToken: string) {\n  token = newToken;\n}\n\nexport const client = createTRPCClient\u003CAppRouter>({\n  links: [\n    httpBatchLink({\n      url: 'http:\u002F\u002Flocalhost:3000\u002Ftrpc',\n      headers() {\n        return {\n          Authorization: token ? `Bearer ${token}` : '',\n        };\n      },\n    }),\n  ],\n});\n```\n\nThe `headers` callback is invoked on every HTTP request, so token changes take effect immediately.\n\n### Inferring Procedure Input and Output Types\n\n```ts\nimport type { inferRouterInputs, inferRouterOutputs } from '@trpc\u002Fserver';\nimport type { AppRouter } from '.\u002Fserver';\n\ntype RouterInput = inferRouterInputs\u003CAppRouter>;\ntype RouterOutput = inferRouterOutputs\u003CAppRouter>;\n\ntype UserCreateInput = RouterInput['user']['create'];\ntype UserByIdOutput = RouterOutput['user']['byId'];\n```\n\n### Aborting Requests with AbortController\n\n```ts\nimport { createTRPCClient, httpBatchLink } from '@trpc\u002Fclient';\nimport type { AppRouter } from '.\u002Fserver';\n\nconst client = createTRPCClient\u003CAppRouter>({\n  links: [httpBatchLink({ url: 'http:\u002F\u002Flocalhost:3000\u002Ftrpc' })],\n});\n\nconst ac = new AbortController();\nconst query = client.user.byId.query({ id: '1' }, { signal: ac.signal });\nac.abort();\n```\n\n### Typed Error Handling\n\n```ts\nimport { TRPCClientError } from '@trpc\u002Fclient';\nimport type { AppRouter } from '.\u002Fserver';\n\nfunction isTRPCClientError(\n  cause: unknown,\n): cause is TRPCClientError\u003CAppRouter> {\n  return cause instanceof TRPCClientError;\n}\n\ntry {\n  await client.user.byId.query({ id: '1' });\n} catch (cause) {\n  if (isTRPCClientError(cause)) {\n    console.log('tRPC error code:', cause.data?.code);\n  }\n}\n```\n\n## Common Mistakes\n\n### [CRITICAL] Missing AppRouter type parameter on createTRPCClient\n\nWrong:\n\n```ts\nconst client = createTRPCClient({ links: [httpBatchLink({ url })] });\n```\n\nCorrect:\n\n```ts\nimport type { AppRouter } from '.\u002Fserver';\n\nconst client = createTRPCClient\u003CAppRouter>({ links: [httpBatchLink({ url })] });\n```\n\nWithout the type parameter, all procedure calls return `any` and type safety is completely lost.\n\nSource: www\u002Fdocs\u002Fclient\u002Fvanilla\u002Fsetup.mdx\n\n### [CRITICAL] Transformer goes on individual links, not createTRPCClient\n\nIn v11, the `transformer` option is on individual terminating links, not the client constructor:\n\n```ts\nimport superjson from 'superjson';\n\ncreateTRPCClient\u003CAppRouter>({\n  links: [\n    httpBatchLink({\n      url: 'http:\u002F\u002Flocalhost:3000',\n      transformer: superjson,\n    }),\n  ],\n});\n```\n\nIn v11, the `transformer` option was moved from the client constructor to individual terminating links. Passing it to `createTRPCClient` throws a TypeError.\n\nSource: packages\u002Fclient\u002Fsrc\u002Finternals\u002FTRPCUntypedClient.ts\n\n### [CRITICAL] Transformer on server but not on client links\n\nWrong:\n\n```ts\n\u002F\u002F Server: initTRPC.create({ transformer: superjson })\n\u002F\u002F Client:\nhttpBatchLink({ url: 'http:\u002F\u002Flocalhost:3000' });\n```\n\nCorrect:\n\n```ts\n\u002F\u002F Server: initTRPC.create({ transformer: superjson })\n\u002F\u002F Client:\nhttpBatchLink({ url: 'http:\u002F\u002Flocalhost:3000', transformer: superjson });\n```\n\nIf the server uses a transformer, every terminating link on the client must also specify that transformer. Mismatch causes \"Unable to transform response\" errors.\n\nSource: https:\u002F\u002Fgithub.com\u002Ftrpc\u002Ftrpc\u002Fissues\u002F7083\n\n### [CRITICAL] Using import instead of import type for AppRouter\n\nWrong:\n\n```ts\nimport { AppRouter } from '..\u002Fserver\u002Frouter';\n```\n\nCorrect:\n\n```ts\nimport type { AppRouter } from '..\u002Fserver\u002Frouter';\n```\n\nA non-type import pulls the entire server bundle into the client. Use `import type` so it is erased at build time.\n\nSource: www\u002Fdocs\u002Fclient\u002Fvanilla\u002Fsetup.mdx\n\n### [CRITICAL] Importing appRouter value to derive type in client\n\nWrong:\n\n```ts\nimport { appRouter } from '..\u002Fserver\u002Frouter';\n\ntype AppRouter = typeof appRouter;\n```\n\nCorrect:\n\n```ts\n\u002F\u002F In server: export type AppRouter = typeof appRouter;\n\u002F\u002F In client:\nimport type { AppRouter } from '..\u002Fserver\u002Frouter';\n```\n\nImporting the `appRouter` value (not just the type) bundles the entire server into the client, shipping server code to the browser.\n\nSource: www\u002Fdocs\u002Fserver\u002Frouters.md\n\n### [CRITICAL] Using type assertions to bypass AppRouter import errors\n\nWrong:\n\n```ts\nconst client = createTRPCClient\u003Cany>({ links: [httpBatchLink({ url })] });\n```\n\nCorrect:\n\n```ts\n\u002F\u002F Fix the import path or monorepo configuration\nimport type { AppRouter } from '@myorg\u002Fapi-types';\n\nconst client = createTRPCClient\u003CAppRouter>({ links: [httpBatchLink({ url })] });\n```\n\nCasting to `any` or manually recreating the router type destroys end-to-end type safety. Fix the import path or monorepo config instead.\n\nSource: www\u002Fdocs\u002Fclient\u002Fvanilla\u002Fsetup.mdx\n\n### [CRITICAL] Using createTRPCProxyClient (renamed in v11)\n\nWrong:\n\n```ts\nimport { createTRPCProxyClient } from '@trpc\u002Fclient';\n```\n\nCorrect:\n\n```ts\nimport { createTRPCClient } from '@trpc\u002Fclient';\n```\n\n`createTRPCProxyClient` was renamed to `createTRPCClient` in v11.\n\nSource: www\u002Fdocs\u002Fclient\u002Fvanilla\u002Fsetup.mdx\n\n### [CRITICAL] Treating tRPC as a REST API\n\nWrong:\n\n```ts\nfetch('\u002Fapi\u002Ftrpc\u002Fusers\u002F123', { method: 'GET' });\n```\n\nCorrect:\n\n```ts\nconst user = await client.user.byId.query({ id: '123' });\n\u002F\u002F Raw equivalent: GET \u002Fapi\u002Ftrpc\u002Fuser.byId?input={\"id\":\"123\"}\n```\n\ntRPC uses JSON-RPC over HTTP. Procedures are called by dot-separated name with JSON input, not by REST resource paths.\n\nSource: www\u002Fdocs\u002Fclient\u002Foverview.md\n\n### [HIGH] HTML error page instead of JSON response\n\nIf you see `couldn't parse JSON, invalid character '\u003C'`, the tRPC endpoint returned an HTML page (404\u002F503) instead of JSON. This means the `url` in your link config is wrong or infrastructure routing is misconfigured -- it is not a tRPC bug. Verify the URL matches your adapter's mount point.\n\nSource: www\u002Fdocs\u002Fclient\u002Fvanilla\u002Fsetup.mdx\n\n## See Also\n\n- `links` -- configure httpBatchLink, httpLink, splitLink, and other link types\n- `superjson` -- set up SuperJSON transformer on server and client\n- `server-setup` -- define routers, procedures, context, and export AppRouter type\n- `react-query-setup` -- use tRPC with TanStack React Query for React applications\n",{"data":38,"body":50},{"name":4,"description":6,"type":39,"library":8,"library_version":40,"requires":41,"sources":43},"core","11.16.0",[42],"server-setup",[44,45,46,47,48,49],"www\u002Fdocs\u002Fclient\u002Foverview.md","www\u002Fdocs\u002Fclient\u002Fvanilla\u002Foverview.md","www\u002Fdocs\u002Fclient\u002Fvanilla\u002Fsetup.mdx","www\u002Fdocs\u002Fclient\u002Fvanilla\u002Finfer-types.md","www\u002Fdocs\u002Fclient\u002Fheaders.md","packages\u002Fclient\u002Fsrc\u002Finternals\u002FTRPCUntypedClient.ts",{"type":51,"children":52},"root",[53,62,69,793,1246,1252,1259,1725,1739,1745,2051,2057,2460,2466,2906,2912,2923,2928,3013,3018,3162,3175,3180,3190,3203,3399,3417,3422,3432,3436,3506,3510,3595,3600,3613,3623,3627,3674,3678,3728,3741,3745,3755,3759,3839,3843,3909,3922,3927,3937,3941,4035,4039,4192,4204,4208,4218,4222,4269,4273,4319,4337,4341,4351,4355,4429,4433,4536,4541,4546,4557,4578,4582,4588,4635],{"type":54,"tag":55,"props":56,"children":58},"element","h1",{"id":57},"trpc-client-setup",[59],{"type":60,"value":61},"text","tRPC -- Client Setup",{"type":54,"tag":63,"props":64,"children":66},"h2",{"id":65},"setup",[67],{"type":60,"value":68},"Setup",{"type":54,"tag":70,"props":71,"children":76},"pre",{"className":72,"code":73,"language":74,"meta":75,"style":75},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F server.ts\nimport { initTRPC } from '@trpc\u002Fserver';\nimport { z } from 'zod';\n\nconst t = initTRPC.create();\n\nconst appRouter = t.router({\n  user: t.router({\n    byId: t.procedure\n      .input(z.object({ id: z.string() }))\n      .query(({ input }) => ({ id: input.id, name: 'Bilbo' })),\n    create: t.procedure\n      .input(z.object({ name: z.string() }))\n      .mutation(({ input }) => ({ id: '1', ...input })),\n  }),\n});\n\nexport type AppRouter = typeof appRouter;\n","ts","",[77],{"type":54,"tag":78,"props":79,"children":80},"code",{"__ignoreMap":75},[81,93,146,188,198,242,250,291,326,352,426,535,560,624,712,730,746,754],{"type":54,"tag":82,"props":83,"children":86},"span",{"class":84,"line":85},"line",1,[87],{"type":54,"tag":82,"props":88,"children":90},{"style":89},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[91],{"type":60,"value":92},"\u002F\u002F server.ts\n",{"type":54,"tag":82,"props":94,"children":96},{"class":84,"line":95},2,[97,103,109,115,120,125,130,136,141],{"type":54,"tag":82,"props":98,"children":100},{"style":99},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[101],{"type":60,"value":102},"import",{"type":54,"tag":82,"props":104,"children":106},{"style":105},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[107],{"type":60,"value":108}," {",{"type":54,"tag":82,"props":110,"children":112},{"style":111},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[113],{"type":60,"value":114}," initTRPC",{"type":54,"tag":82,"props":116,"children":117},{"style":105},[118],{"type":60,"value":119}," }",{"type":54,"tag":82,"props":121,"children":122},{"style":99},[123],{"type":60,"value":124}," from",{"type":54,"tag":82,"props":126,"children":127},{"style":105},[128],{"type":60,"value":129}," '",{"type":54,"tag":82,"props":131,"children":133},{"style":132},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[134],{"type":60,"value":135},"@trpc\u002Fserver",{"type":54,"tag":82,"props":137,"children":138},{"style":105},[139],{"type":60,"value":140},"'",{"type":54,"tag":82,"props":142,"children":143},{"style":105},[144],{"type":60,"value":145},";\n",{"type":54,"tag":82,"props":147,"children":149},{"class":84,"line":148},3,[150,154,158,163,167,171,175,180,184],{"type":54,"tag":82,"props":151,"children":152},{"style":99},[153],{"type":60,"value":102},{"type":54,"tag":82,"props":155,"children":156},{"style":105},[157],{"type":60,"value":108},{"type":54,"tag":82,"props":159,"children":160},{"style":111},[161],{"type":60,"value":162}," z",{"type":54,"tag":82,"props":164,"children":165},{"style":105},[166],{"type":60,"value":119},{"type":54,"tag":82,"props":168,"children":169},{"style":99},[170],{"type":60,"value":124},{"type":54,"tag":82,"props":172,"children":173},{"style":105},[174],{"type":60,"value":129},{"type":54,"tag":82,"props":176,"children":177},{"style":132},[178],{"type":60,"value":179},"zod",{"type":54,"tag":82,"props":181,"children":182},{"style":105},[183],{"type":60,"value":140},{"type":54,"tag":82,"props":185,"children":186},{"style":105},[187],{"type":60,"value":145},{"type":54,"tag":82,"props":189,"children":191},{"class":84,"line":190},4,[192],{"type":54,"tag":82,"props":193,"children":195},{"emptyLinePlaceholder":194},true,[196],{"type":60,"value":197},"\n",{"type":54,"tag":82,"props":199,"children":201},{"class":84,"line":200},5,[202,208,213,218,222,227,233,238],{"type":54,"tag":82,"props":203,"children":205},{"style":204},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[206],{"type":60,"value":207},"const",{"type":54,"tag":82,"props":209,"children":210},{"style":111},[211],{"type":60,"value":212}," t ",{"type":54,"tag":82,"props":214,"children":215},{"style":105},[216],{"type":60,"value":217},"=",{"type":54,"tag":82,"props":219,"children":220},{"style":111},[221],{"type":60,"value":114},{"type":54,"tag":82,"props":223,"children":224},{"style":105},[225],{"type":60,"value":226},".",{"type":54,"tag":82,"props":228,"children":230},{"style":229},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[231],{"type":60,"value":232},"create",{"type":54,"tag":82,"props":234,"children":235},{"style":111},[236],{"type":60,"value":237},"()",{"type":54,"tag":82,"props":239,"children":240},{"style":105},[241],{"type":60,"value":145},{"type":54,"tag":82,"props":243,"children":245},{"class":84,"line":244},6,[246],{"type":54,"tag":82,"props":247,"children":248},{"emptyLinePlaceholder":194},[249],{"type":60,"value":197},{"type":54,"tag":82,"props":251,"children":253},{"class":84,"line":252},7,[254,258,263,267,272,276,281,286],{"type":54,"tag":82,"props":255,"children":256},{"style":204},[257],{"type":60,"value":207},{"type":54,"tag":82,"props":259,"children":260},{"style":111},[261],{"type":60,"value":262}," appRouter ",{"type":54,"tag":82,"props":264,"children":265},{"style":105},[266],{"type":60,"value":217},{"type":54,"tag":82,"props":268,"children":269},{"style":111},[270],{"type":60,"value":271}," t",{"type":54,"tag":82,"props":273,"children":274},{"style":105},[275],{"type":60,"value":226},{"type":54,"tag":82,"props":277,"children":278},{"style":229},[279],{"type":60,"value":280},"router",{"type":54,"tag":82,"props":282,"children":283},{"style":111},[284],{"type":60,"value":285},"(",{"type":54,"tag":82,"props":287,"children":288},{"style":105},[289],{"type":60,"value":290},"{\n",{"type":54,"tag":82,"props":292,"children":294},{"class":84,"line":293},8,[295,301,306,310,314,318,322],{"type":54,"tag":82,"props":296,"children":298},{"style":297},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[299],{"type":60,"value":300},"  user",{"type":54,"tag":82,"props":302,"children":303},{"style":105},[304],{"type":60,"value":305},":",{"type":54,"tag":82,"props":307,"children":308},{"style":111},[309],{"type":60,"value":271},{"type":54,"tag":82,"props":311,"children":312},{"style":105},[313],{"type":60,"value":226},{"type":54,"tag":82,"props":315,"children":316},{"style":229},[317],{"type":60,"value":280},{"type":54,"tag":82,"props":319,"children":320},{"style":111},[321],{"type":60,"value":285},{"type":54,"tag":82,"props":323,"children":324},{"style":105},[325],{"type":60,"value":290},{"type":54,"tag":82,"props":327,"children":329},{"class":84,"line":328},9,[330,335,339,343,347],{"type":54,"tag":82,"props":331,"children":332},{"style":297},[333],{"type":60,"value":334},"    byId",{"type":54,"tag":82,"props":336,"children":337},{"style":105},[338],{"type":60,"value":305},{"type":54,"tag":82,"props":340,"children":341},{"style":111},[342],{"type":60,"value":271},{"type":54,"tag":82,"props":344,"children":345},{"style":105},[346],{"type":60,"value":226},{"type":54,"tag":82,"props":348,"children":349},{"style":111},[350],{"type":60,"value":351},"procedure\n",{"type":54,"tag":82,"props":353,"children":355},{"class":84,"line":354},10,[356,361,366,371,375,380,384,389,394,398,402,406,411,416,421],{"type":54,"tag":82,"props":357,"children":358},{"style":105},[359],{"type":60,"value":360},"      .",{"type":54,"tag":82,"props":362,"children":363},{"style":229},[364],{"type":60,"value":365},"input",{"type":54,"tag":82,"props":367,"children":368},{"style":111},[369],{"type":60,"value":370},"(z",{"type":54,"tag":82,"props":372,"children":373},{"style":105},[374],{"type":60,"value":226},{"type":54,"tag":82,"props":376,"children":377},{"style":229},[378],{"type":60,"value":379},"object",{"type":54,"tag":82,"props":381,"children":382},{"style":111},[383],{"type":60,"value":285},{"type":54,"tag":82,"props":385,"children":386},{"style":105},[387],{"type":60,"value":388},"{",{"type":54,"tag":82,"props":390,"children":391},{"style":297},[392],{"type":60,"value":393}," id",{"type":54,"tag":82,"props":395,"children":396},{"style":105},[397],{"type":60,"value":305},{"type":54,"tag":82,"props":399,"children":400},{"style":111},[401],{"type":60,"value":162},{"type":54,"tag":82,"props":403,"children":404},{"style":105},[405],{"type":60,"value":226},{"type":54,"tag":82,"props":407,"children":408},{"style":229},[409],{"type":60,"value":410},"string",{"type":54,"tag":82,"props":412,"children":413},{"style":111},[414],{"type":60,"value":415},"() ",{"type":54,"tag":82,"props":417,"children":418},{"style":105},[419],{"type":60,"value":420},"}",{"type":54,"tag":82,"props":422,"children":423},{"style":111},[424],{"type":60,"value":425},"))\n",{"type":54,"tag":82,"props":427,"children":429},{"class":84,"line":428},11,[430,434,439,443,448,454,459,464,469,473,477,481,485,489,494,499,504,508,512,517,521,525,530],{"type":54,"tag":82,"props":431,"children":432},{"style":105},[433],{"type":60,"value":360},{"type":54,"tag":82,"props":435,"children":436},{"style":229},[437],{"type":60,"value":438},"query",{"type":54,"tag":82,"props":440,"children":441},{"style":111},[442],{"type":60,"value":285},{"type":54,"tag":82,"props":444,"children":445},{"style":105},[446],{"type":60,"value":447},"({",{"type":54,"tag":82,"props":449,"children":451},{"style":450},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[452],{"type":60,"value":453}," input",{"type":54,"tag":82,"props":455,"children":456},{"style":105},[457],{"type":60,"value":458}," })",{"type":54,"tag":82,"props":460,"children":461},{"style":204},[462],{"type":60,"value":463}," =>",{"type":54,"tag":82,"props":465,"children":466},{"style":111},[467],{"type":60,"value":468}," (",{"type":54,"tag":82,"props":470,"children":471},{"style":105},[472],{"type":60,"value":388},{"type":54,"tag":82,"props":474,"children":475},{"style":297},[476],{"type":60,"value":393},{"type":54,"tag":82,"props":478,"children":479},{"style":105},[480],{"type":60,"value":305},{"type":54,"tag":82,"props":482,"children":483},{"style":111},[484],{"type":60,"value":453},{"type":54,"tag":82,"props":486,"children":487},{"style":105},[488],{"type":60,"value":226},{"type":54,"tag":82,"props":490,"children":491},{"style":111},[492],{"type":60,"value":493},"id",{"type":54,"tag":82,"props":495,"children":496},{"style":105},[497],{"type":60,"value":498},",",{"type":54,"tag":82,"props":500,"children":501},{"style":297},[502],{"type":60,"value":503}," name",{"type":54,"tag":82,"props":505,"children":506},{"style":105},[507],{"type":60,"value":305},{"type":54,"tag":82,"props":509,"children":510},{"style":105},[511],{"type":60,"value":129},{"type":54,"tag":82,"props":513,"children":514},{"style":132},[515],{"type":60,"value":516},"Bilbo",{"type":54,"tag":82,"props":518,"children":519},{"style":105},[520],{"type":60,"value":140},{"type":54,"tag":82,"props":522,"children":523},{"style":105},[524],{"type":60,"value":119},{"type":54,"tag":82,"props":526,"children":527},{"style":111},[528],{"type":60,"value":529},"))",{"type":54,"tag":82,"props":531,"children":532},{"style":105},[533],{"type":60,"value":534},",\n",{"type":54,"tag":82,"props":536,"children":538},{"class":84,"line":537},12,[539,544,548,552,556],{"type":54,"tag":82,"props":540,"children":541},{"style":297},[542],{"type":60,"value":543},"    create",{"type":54,"tag":82,"props":545,"children":546},{"style":105},[547],{"type":60,"value":305},{"type":54,"tag":82,"props":549,"children":550},{"style":111},[551],{"type":60,"value":271},{"type":54,"tag":82,"props":553,"children":554},{"style":105},[555],{"type":60,"value":226},{"type":54,"tag":82,"props":557,"children":558},{"style":111},[559],{"type":60,"value":351},{"type":54,"tag":82,"props":561,"children":563},{"class":84,"line":562},13,[564,568,572,576,580,584,588,592,596,600,604,608,612,616,620],{"type":54,"tag":82,"props":565,"children":566},{"style":105},[567],{"type":60,"value":360},{"type":54,"tag":82,"props":569,"children":570},{"style":229},[571],{"type":60,"value":365},{"type":54,"tag":82,"props":573,"children":574},{"style":111},[575],{"type":60,"value":370},{"type":54,"tag":82,"props":577,"children":578},{"style":105},[579],{"type":60,"value":226},{"type":54,"tag":82,"props":581,"children":582},{"style":229},[583],{"type":60,"value":379},{"type":54,"tag":82,"props":585,"children":586},{"style":111},[587],{"type":60,"value":285},{"type":54,"tag":82,"props":589,"children":590},{"style":105},[591],{"type":60,"value":388},{"type":54,"tag":82,"props":593,"children":594},{"style":297},[595],{"type":60,"value":503},{"type":54,"tag":82,"props":597,"children":598},{"style":105},[599],{"type":60,"value":305},{"type":54,"tag":82,"props":601,"children":602},{"style":111},[603],{"type":60,"value":162},{"type":54,"tag":82,"props":605,"children":606},{"style":105},[607],{"type":60,"value":226},{"type":54,"tag":82,"props":609,"children":610},{"style":229},[611],{"type":60,"value":410},{"type":54,"tag":82,"props":613,"children":614},{"style":111},[615],{"type":60,"value":415},{"type":54,"tag":82,"props":617,"children":618},{"style":105},[619],{"type":60,"value":420},{"type":54,"tag":82,"props":621,"children":622},{"style":111},[623],{"type":60,"value":425},{"type":54,"tag":82,"props":625,"children":627},{"class":84,"line":626},14,[628,632,637,641,645,649,653,657,661,665,669,673,677,682,686,690,695,700,704,708],{"type":54,"tag":82,"props":629,"children":630},{"style":105},[631],{"type":60,"value":360},{"type":54,"tag":82,"props":633,"children":634},{"style":229},[635],{"type":60,"value":636},"mutation",{"type":54,"tag":82,"props":638,"children":639},{"style":111},[640],{"type":60,"value":285},{"type":54,"tag":82,"props":642,"children":643},{"style":105},[644],{"type":60,"value":447},{"type":54,"tag":82,"props":646,"children":647},{"style":450},[648],{"type":60,"value":453},{"type":54,"tag":82,"props":650,"children":651},{"style":105},[652],{"type":60,"value":458},{"type":54,"tag":82,"props":654,"children":655},{"style":204},[656],{"type":60,"value":463},{"type":54,"tag":82,"props":658,"children":659},{"style":111},[660],{"type":60,"value":468},{"type":54,"tag":82,"props":662,"children":663},{"style":105},[664],{"type":60,"value":388},{"type":54,"tag":82,"props":666,"children":667},{"style":297},[668],{"type":60,"value":393},{"type":54,"tag":82,"props":670,"children":671},{"style":105},[672],{"type":60,"value":305},{"type":54,"tag":82,"props":674,"children":675},{"style":105},[676],{"type":60,"value":129},{"type":54,"tag":82,"props":678,"children":679},{"style":132},[680],{"type":60,"value":681},"1",{"type":54,"tag":82,"props":683,"children":684},{"style":105},[685],{"type":60,"value":140},{"type":54,"tag":82,"props":687,"children":688},{"style":105},[689],{"type":60,"value":498},{"type":54,"tag":82,"props":691,"children":692},{"style":105},[693],{"type":60,"value":694}," ...",{"type":54,"tag":82,"props":696,"children":697},{"style":111},[698],{"type":60,"value":699},"input ",{"type":54,"tag":82,"props":701,"children":702},{"style":105},[703],{"type":60,"value":420},{"type":54,"tag":82,"props":705,"children":706},{"style":111},[707],{"type":60,"value":529},{"type":54,"tag":82,"props":709,"children":710},{"style":105},[711],{"type":60,"value":534},{"type":54,"tag":82,"props":713,"children":715},{"class":84,"line":714},15,[716,721,726],{"type":54,"tag":82,"props":717,"children":718},{"style":105},[719],{"type":60,"value":720},"  }",{"type":54,"tag":82,"props":722,"children":723},{"style":111},[724],{"type":60,"value":725},")",{"type":54,"tag":82,"props":727,"children":728},{"style":105},[729],{"type":60,"value":534},{"type":54,"tag":82,"props":731,"children":733},{"class":84,"line":732},16,[734,738,742],{"type":54,"tag":82,"props":735,"children":736},{"style":105},[737],{"type":60,"value":420},{"type":54,"tag":82,"props":739,"children":740},{"style":111},[741],{"type":60,"value":725},{"type":54,"tag":82,"props":743,"children":744},{"style":105},[745],{"type":60,"value":145},{"type":54,"tag":82,"props":747,"children":749},{"class":84,"line":748},17,[750],{"type":54,"tag":82,"props":751,"children":752},{"emptyLinePlaceholder":194},[753],{"type":60,"value":197},{"type":54,"tag":82,"props":755,"children":757},{"class":84,"line":756},18,[758,763,768,774,779,784,789],{"type":54,"tag":82,"props":759,"children":760},{"style":99},[761],{"type":60,"value":762},"export",{"type":54,"tag":82,"props":764,"children":765},{"style":204},[766],{"type":60,"value":767}," type",{"type":54,"tag":82,"props":769,"children":771},{"style":770},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[772],{"type":60,"value":773}," AppRouter",{"type":54,"tag":82,"props":775,"children":776},{"style":105},[777],{"type":60,"value":778}," =",{"type":54,"tag":82,"props":780,"children":781},{"style":105},[782],{"type":60,"value":783}," typeof",{"type":54,"tag":82,"props":785,"children":786},{"style":111},[787],{"type":60,"value":788}," appRouter",{"type":54,"tag":82,"props":790,"children":791},{"style":105},[792],{"type":60,"value":145},{"type":54,"tag":70,"props":794,"children":796},{"className":72,"code":795,"language":74,"meta":75,"style":75},"\u002F\u002F client.ts\nimport { createTRPCClient, httpBatchLink } from '@trpc\u002Fclient';\nimport type { AppRouter } from '.\u002Fserver';\n\nconst client = createTRPCClient\u003CAppRouter>({\n  links: [\n    httpBatchLink({\n      url: 'http:\u002F\u002Flocalhost:3000\u002Ftrpc',\n    }),\n  ],\n});\n\nconst user = await client.user.byId.query({ id: '1' });\nconst created = await client.user.create.mutate({ name: 'Frodo' });\n",[797],{"type":54,"tag":78,"props":798,"children":799},{"__ignoreMap":75},[800,808,858,902,909,952,969,985,1014,1030,1042,1057,1064,1156],{"type":54,"tag":82,"props":801,"children":802},{"class":84,"line":85},[803],{"type":54,"tag":82,"props":804,"children":805},{"style":89},[806],{"type":60,"value":807},"\u002F\u002F client.ts\n",{"type":54,"tag":82,"props":809,"children":810},{"class":84,"line":95},[811,815,819,824,828,833,837,841,845,850,854],{"type":54,"tag":82,"props":812,"children":813},{"style":99},[814],{"type":60,"value":102},{"type":54,"tag":82,"props":816,"children":817},{"style":105},[818],{"type":60,"value":108},{"type":54,"tag":82,"props":820,"children":821},{"style":111},[822],{"type":60,"value":823}," createTRPCClient",{"type":54,"tag":82,"props":825,"children":826},{"style":105},[827],{"type":60,"value":498},{"type":54,"tag":82,"props":829,"children":830},{"style":111},[831],{"type":60,"value":832}," httpBatchLink",{"type":54,"tag":82,"props":834,"children":835},{"style":105},[836],{"type":60,"value":119},{"type":54,"tag":82,"props":838,"children":839},{"style":99},[840],{"type":60,"value":124},{"type":54,"tag":82,"props":842,"children":843},{"style":105},[844],{"type":60,"value":129},{"type":54,"tag":82,"props":846,"children":847},{"style":132},[848],{"type":60,"value":849},"@trpc\u002Fclient",{"type":54,"tag":82,"props":851,"children":852},{"style":105},[853],{"type":60,"value":140},{"type":54,"tag":82,"props":855,"children":856},{"style":105},[857],{"type":60,"value":145},{"type":54,"tag":82,"props":859,"children":860},{"class":84,"line":148},[861,865,869,873,877,881,885,889,894,898],{"type":54,"tag":82,"props":862,"children":863},{"style":99},[864],{"type":60,"value":102},{"type":54,"tag":82,"props":866,"children":867},{"style":99},[868],{"type":60,"value":767},{"type":54,"tag":82,"props":870,"children":871},{"style":105},[872],{"type":60,"value":108},{"type":54,"tag":82,"props":874,"children":875},{"style":111},[876],{"type":60,"value":773},{"type":54,"tag":82,"props":878,"children":879},{"style":105},[880],{"type":60,"value":119},{"type":54,"tag":82,"props":882,"children":883},{"style":99},[884],{"type":60,"value":124},{"type":54,"tag":82,"props":886,"children":887},{"style":105},[888],{"type":60,"value":129},{"type":54,"tag":82,"props":890,"children":891},{"style":132},[892],{"type":60,"value":893},".\u002Fserver",{"type":54,"tag":82,"props":895,"children":896},{"style":105},[897],{"type":60,"value":140},{"type":54,"tag":82,"props":899,"children":900},{"style":105},[901],{"type":60,"value":145},{"type":54,"tag":82,"props":903,"children":904},{"class":84,"line":190},[905],{"type":54,"tag":82,"props":906,"children":907},{"emptyLinePlaceholder":194},[908],{"type":60,"value":197},{"type":54,"tag":82,"props":910,"children":911},{"class":84,"line":200},[912,916,921,925,929,934,939,944,948],{"type":54,"tag":82,"props":913,"children":914},{"style":204},[915],{"type":60,"value":207},{"type":54,"tag":82,"props":917,"children":918},{"style":111},[919],{"type":60,"value":920}," client ",{"type":54,"tag":82,"props":922,"children":923},{"style":105},[924],{"type":60,"value":217},{"type":54,"tag":82,"props":926,"children":927},{"style":229},[928],{"type":60,"value":823},{"type":54,"tag":82,"props":930,"children":931},{"style":105},[932],{"type":60,"value":933},"\u003C",{"type":54,"tag":82,"props":935,"children":936},{"style":770},[937],{"type":60,"value":938},"AppRouter",{"type":54,"tag":82,"props":940,"children":941},{"style":105},[942],{"type":60,"value":943},">",{"type":54,"tag":82,"props":945,"children":946},{"style":111},[947],{"type":60,"value":285},{"type":54,"tag":82,"props":949,"children":950},{"style":105},[951],{"type":60,"value":290},{"type":54,"tag":82,"props":953,"children":954},{"class":84,"line":244},[955,960,964],{"type":54,"tag":82,"props":956,"children":957},{"style":297},[958],{"type":60,"value":959},"  links",{"type":54,"tag":82,"props":961,"children":962},{"style":105},[963],{"type":60,"value":305},{"type":54,"tag":82,"props":965,"children":966},{"style":111},[967],{"type":60,"value":968}," [\n",{"type":54,"tag":82,"props":970,"children":971},{"class":84,"line":252},[972,977,981],{"type":54,"tag":82,"props":973,"children":974},{"style":229},[975],{"type":60,"value":976},"    httpBatchLink",{"type":54,"tag":82,"props":978,"children":979},{"style":111},[980],{"type":60,"value":285},{"type":54,"tag":82,"props":982,"children":983},{"style":105},[984],{"type":60,"value":290},{"type":54,"tag":82,"props":986,"children":987},{"class":84,"line":293},[988,993,997,1001,1006,1010],{"type":54,"tag":82,"props":989,"children":990},{"style":297},[991],{"type":60,"value":992},"      url",{"type":54,"tag":82,"props":994,"children":995},{"style":105},[996],{"type":60,"value":305},{"type":54,"tag":82,"props":998,"children":999},{"style":105},[1000],{"type":60,"value":129},{"type":54,"tag":82,"props":1002,"children":1003},{"style":132},[1004],{"type":60,"value":1005},"http:\u002F\u002Flocalhost:3000\u002Ftrpc",{"type":54,"tag":82,"props":1007,"children":1008},{"style":105},[1009],{"type":60,"value":140},{"type":54,"tag":82,"props":1011,"children":1012},{"style":105},[1013],{"type":60,"value":534},{"type":54,"tag":82,"props":1015,"children":1016},{"class":84,"line":328},[1017,1022,1026],{"type":54,"tag":82,"props":1018,"children":1019},{"style":105},[1020],{"type":60,"value":1021},"    }",{"type":54,"tag":82,"props":1023,"children":1024},{"style":111},[1025],{"type":60,"value":725},{"type":54,"tag":82,"props":1027,"children":1028},{"style":105},[1029],{"type":60,"value":534},{"type":54,"tag":82,"props":1031,"children":1032},{"class":84,"line":354},[1033,1038],{"type":54,"tag":82,"props":1034,"children":1035},{"style":111},[1036],{"type":60,"value":1037},"  ]",{"type":54,"tag":82,"props":1039,"children":1040},{"style":105},[1041],{"type":60,"value":534},{"type":54,"tag":82,"props":1043,"children":1044},{"class":84,"line":428},[1045,1049,1053],{"type":54,"tag":82,"props":1046,"children":1047},{"style":105},[1048],{"type":60,"value":420},{"type":54,"tag":82,"props":1050,"children":1051},{"style":111},[1052],{"type":60,"value":725},{"type":54,"tag":82,"props":1054,"children":1055},{"style":105},[1056],{"type":60,"value":145},{"type":54,"tag":82,"props":1058,"children":1059},{"class":84,"line":537},[1060],{"type":54,"tag":82,"props":1061,"children":1062},{"emptyLinePlaceholder":194},[1063],{"type":60,"value":197},{"type":54,"tag":82,"props":1065,"children":1066},{"class":84,"line":562},[1067,1071,1076,1080,1085,1090,1094,1099,1103,1108,1112,1116,1120,1124,1128,1132,1136,1140,1144,1148,1152],{"type":54,"tag":82,"props":1068,"children":1069},{"style":204},[1070],{"type":60,"value":207},{"type":54,"tag":82,"props":1072,"children":1073},{"style":111},[1074],{"type":60,"value":1075}," user ",{"type":54,"tag":82,"props":1077,"children":1078},{"style":105},[1079],{"type":60,"value":217},{"type":54,"tag":82,"props":1081,"children":1082},{"style":99},[1083],{"type":60,"value":1084}," await",{"type":54,"tag":82,"props":1086,"children":1087},{"style":111},[1088],{"type":60,"value":1089}," client",{"type":54,"tag":82,"props":1091,"children":1092},{"style":105},[1093],{"type":60,"value":226},{"type":54,"tag":82,"props":1095,"children":1096},{"style":111},[1097],{"type":60,"value":1098},"user",{"type":54,"tag":82,"props":1100,"children":1101},{"style":105},[1102],{"type":60,"value":226},{"type":54,"tag":82,"props":1104,"children":1105},{"style":111},[1106],{"type":60,"value":1107},"byId",{"type":54,"tag":82,"props":1109,"children":1110},{"style":105},[1111],{"type":60,"value":226},{"type":54,"tag":82,"props":1113,"children":1114},{"style":229},[1115],{"type":60,"value":438},{"type":54,"tag":82,"props":1117,"children":1118},{"style":111},[1119],{"type":60,"value":285},{"type":54,"tag":82,"props":1121,"children":1122},{"style":105},[1123],{"type":60,"value":388},{"type":54,"tag":82,"props":1125,"children":1126},{"style":297},[1127],{"type":60,"value":393},{"type":54,"tag":82,"props":1129,"children":1130},{"style":105},[1131],{"type":60,"value":305},{"type":54,"tag":82,"props":1133,"children":1134},{"style":105},[1135],{"type":60,"value":129},{"type":54,"tag":82,"props":1137,"children":1138},{"style":132},[1139],{"type":60,"value":681},{"type":54,"tag":82,"props":1141,"children":1142},{"style":105},[1143],{"type":60,"value":140},{"type":54,"tag":82,"props":1145,"children":1146},{"style":105},[1147],{"type":60,"value":119},{"type":54,"tag":82,"props":1149,"children":1150},{"style":111},[1151],{"type":60,"value":725},{"type":54,"tag":82,"props":1153,"children":1154},{"style":105},[1155],{"type":60,"value":145},{"type":54,"tag":82,"props":1157,"children":1158},{"class":84,"line":626},[1159,1163,1168,1172,1176,1180,1184,1188,1192,1196,1200,1205,1209,1213,1217,1221,1225,1230,1234,1238,1242],{"type":54,"tag":82,"props":1160,"children":1161},{"style":204},[1162],{"type":60,"value":207},{"type":54,"tag":82,"props":1164,"children":1165},{"style":111},[1166],{"type":60,"value":1167}," created ",{"type":54,"tag":82,"props":1169,"children":1170},{"style":105},[1171],{"type":60,"value":217},{"type":54,"tag":82,"props":1173,"children":1174},{"style":99},[1175],{"type":60,"value":1084},{"type":54,"tag":82,"props":1177,"children":1178},{"style":111},[1179],{"type":60,"value":1089},{"type":54,"tag":82,"props":1181,"children":1182},{"style":105},[1183],{"type":60,"value":226},{"type":54,"tag":82,"props":1185,"children":1186},{"style":111},[1187],{"type":60,"value":1098},{"type":54,"tag":82,"props":1189,"children":1190},{"style":105},[1191],{"type":60,"value":226},{"type":54,"tag":82,"props":1193,"children":1194},{"style":111},[1195],{"type":60,"value":232},{"type":54,"tag":82,"props":1197,"children":1198},{"style":105},[1199],{"type":60,"value":226},{"type":54,"tag":82,"props":1201,"children":1202},{"style":229},[1203],{"type":60,"value":1204},"mutate",{"type":54,"tag":82,"props":1206,"children":1207},{"style":111},[1208],{"type":60,"value":285},{"type":54,"tag":82,"props":1210,"children":1211},{"style":105},[1212],{"type":60,"value":388},{"type":54,"tag":82,"props":1214,"children":1215},{"style":297},[1216],{"type":60,"value":503},{"type":54,"tag":82,"props":1218,"children":1219},{"style":105},[1220],{"type":60,"value":305},{"type":54,"tag":82,"props":1222,"children":1223},{"style":105},[1224],{"type":60,"value":129},{"type":54,"tag":82,"props":1226,"children":1227},{"style":132},[1228],{"type":60,"value":1229},"Frodo",{"type":54,"tag":82,"props":1231,"children":1232},{"style":105},[1233],{"type":60,"value":140},{"type":54,"tag":82,"props":1235,"children":1236},{"style":105},[1237],{"type":60,"value":119},{"type":54,"tag":82,"props":1239,"children":1240},{"style":111},[1241],{"type":60,"value":725},{"type":54,"tag":82,"props":1243,"children":1244},{"style":105},[1245],{"type":60,"value":145},{"type":54,"tag":63,"props":1247,"children":1249},{"id":1248},"core-patterns",[1250],{"type":60,"value":1251},"Core Patterns",{"type":54,"tag":1253,"props":1254,"children":1256},"h3",{"id":1255},"dynamic-auth-headers",[1257],{"type":60,"value":1258},"Dynamic Auth Headers",{"type":54,"tag":70,"props":1260,"children":1262},{"className":72,"code":1261,"language":74,"meta":75,"style":75},"import { createTRPCClient, httpBatchLink } from '@trpc\u002Fclient';\nimport type { AppRouter } from '.\u002Fserver';\n\nlet token = '';\n\nexport function setToken(newToken: string) {\n  token = newToken;\n}\n\nexport const client = createTRPCClient\u003CAppRouter>({\n  links: [\n    httpBatchLink({\n      url: 'http:\u002F\u002Flocalhost:3000\u002Ftrpc',\n      headers() {\n        return {\n          Authorization: token ? `Bearer ${token}` : '',\n        };\n      },\n    }),\n  ],\n});\n",[1263],{"type":54,"tag":78,"props":1264,"children":1265},{"__ignoreMap":75},[1266,1313,1356,1363,1389,1396,1440,1461,1469,1476,1520,1535,1550,1577,1593,1605,1665,1673,1681,1697,1709],{"type":54,"tag":82,"props":1267,"children":1268},{"class":84,"line":85},[1269,1273,1277,1281,1285,1289,1293,1297,1301,1305,1309],{"type":54,"tag":82,"props":1270,"children":1271},{"style":99},[1272],{"type":60,"value":102},{"type":54,"tag":82,"props":1274,"children":1275},{"style":105},[1276],{"type":60,"value":108},{"type":54,"tag":82,"props":1278,"children":1279},{"style":111},[1280],{"type":60,"value":823},{"type":54,"tag":82,"props":1282,"children":1283},{"style":105},[1284],{"type":60,"value":498},{"type":54,"tag":82,"props":1286,"children":1287},{"style":111},[1288],{"type":60,"value":832},{"type":54,"tag":82,"props":1290,"children":1291},{"style":105},[1292],{"type":60,"value":119},{"type":54,"tag":82,"props":1294,"children":1295},{"style":99},[1296],{"type":60,"value":124},{"type":54,"tag":82,"props":1298,"children":1299},{"style":105},[1300],{"type":60,"value":129},{"type":54,"tag":82,"props":1302,"children":1303},{"style":132},[1304],{"type":60,"value":849},{"type":54,"tag":82,"props":1306,"children":1307},{"style":105},[1308],{"type":60,"value":140},{"type":54,"tag":82,"props":1310,"children":1311},{"style":105},[1312],{"type":60,"value":145},{"type":54,"tag":82,"props":1314,"children":1315},{"class":84,"line":95},[1316,1320,1324,1328,1332,1336,1340,1344,1348,1352],{"type":54,"tag":82,"props":1317,"children":1318},{"style":99},[1319],{"type":60,"value":102},{"type":54,"tag":82,"props":1321,"children":1322},{"style":99},[1323],{"type":60,"value":767},{"type":54,"tag":82,"props":1325,"children":1326},{"style":105},[1327],{"type":60,"value":108},{"type":54,"tag":82,"props":1329,"children":1330},{"style":111},[1331],{"type":60,"value":773},{"type":54,"tag":82,"props":1333,"children":1334},{"style":105},[1335],{"type":60,"value":119},{"type":54,"tag":82,"props":1337,"children":1338},{"style":99},[1339],{"type":60,"value":124},{"type":54,"tag":82,"props":1341,"children":1342},{"style":105},[1343],{"type":60,"value":129},{"type":54,"tag":82,"props":1345,"children":1346},{"style":132},[1347],{"type":60,"value":893},{"type":54,"tag":82,"props":1349,"children":1350},{"style":105},[1351],{"type":60,"value":140},{"type":54,"tag":82,"props":1353,"children":1354},{"style":105},[1355],{"type":60,"value":145},{"type":54,"tag":82,"props":1357,"children":1358},{"class":84,"line":148},[1359],{"type":54,"tag":82,"props":1360,"children":1361},{"emptyLinePlaceholder":194},[1362],{"type":60,"value":197},{"type":54,"tag":82,"props":1364,"children":1365},{"class":84,"line":190},[1366,1371,1376,1380,1385],{"type":54,"tag":82,"props":1367,"children":1368},{"style":204},[1369],{"type":60,"value":1370},"let",{"type":54,"tag":82,"props":1372,"children":1373},{"style":111},[1374],{"type":60,"value":1375}," token ",{"type":54,"tag":82,"props":1377,"children":1378},{"style":105},[1379],{"type":60,"value":217},{"type":54,"tag":82,"props":1381,"children":1382},{"style":105},[1383],{"type":60,"value":1384}," ''",{"type":54,"tag":82,"props":1386,"children":1387},{"style":105},[1388],{"type":60,"value":145},{"type":54,"tag":82,"props":1390,"children":1391},{"class":84,"line":200},[1392],{"type":54,"tag":82,"props":1393,"children":1394},{"emptyLinePlaceholder":194},[1395],{"type":60,"value":197},{"type":54,"tag":82,"props":1397,"children":1398},{"class":84,"line":244},[1399,1403,1408,1413,1417,1422,1426,1431,1435],{"type":54,"tag":82,"props":1400,"children":1401},{"style":99},[1402],{"type":60,"value":762},{"type":54,"tag":82,"props":1404,"children":1405},{"style":204},[1406],{"type":60,"value":1407}," function",{"type":54,"tag":82,"props":1409,"children":1410},{"style":229},[1411],{"type":60,"value":1412}," setToken",{"type":54,"tag":82,"props":1414,"children":1415},{"style":105},[1416],{"type":60,"value":285},{"type":54,"tag":82,"props":1418,"children":1419},{"style":450},[1420],{"type":60,"value":1421},"newToken",{"type":54,"tag":82,"props":1423,"children":1424},{"style":105},[1425],{"type":60,"value":305},{"type":54,"tag":82,"props":1427,"children":1428},{"style":770},[1429],{"type":60,"value":1430}," string",{"type":54,"tag":82,"props":1432,"children":1433},{"style":105},[1434],{"type":60,"value":725},{"type":54,"tag":82,"props":1436,"children":1437},{"style":105},[1438],{"type":60,"value":1439}," {\n",{"type":54,"tag":82,"props":1441,"children":1442},{"class":84,"line":252},[1443,1448,1452,1457],{"type":54,"tag":82,"props":1444,"children":1445},{"style":111},[1446],{"type":60,"value":1447},"  token",{"type":54,"tag":82,"props":1449,"children":1450},{"style":105},[1451],{"type":60,"value":778},{"type":54,"tag":82,"props":1453,"children":1454},{"style":111},[1455],{"type":60,"value":1456}," newToken",{"type":54,"tag":82,"props":1458,"children":1459},{"style":105},[1460],{"type":60,"value":145},{"type":54,"tag":82,"props":1462,"children":1463},{"class":84,"line":293},[1464],{"type":54,"tag":82,"props":1465,"children":1466},{"style":105},[1467],{"type":60,"value":1468},"}\n",{"type":54,"tag":82,"props":1470,"children":1471},{"class":84,"line":328},[1472],{"type":54,"tag":82,"props":1473,"children":1474},{"emptyLinePlaceholder":194},[1475],{"type":60,"value":197},{"type":54,"tag":82,"props":1477,"children":1478},{"class":84,"line":354},[1479,1483,1488,1492,1496,1500,1504,1508,1512,1516],{"type":54,"tag":82,"props":1480,"children":1481},{"style":99},[1482],{"type":60,"value":762},{"type":54,"tag":82,"props":1484,"children":1485},{"style":204},[1486],{"type":60,"value":1487}," const",{"type":54,"tag":82,"props":1489,"children":1490},{"style":111},[1491],{"type":60,"value":920},{"type":54,"tag":82,"props":1493,"children":1494},{"style":105},[1495],{"type":60,"value":217},{"type":54,"tag":82,"props":1497,"children":1498},{"style":229},[1499],{"type":60,"value":823},{"type":54,"tag":82,"props":1501,"children":1502},{"style":105},[1503],{"type":60,"value":933},{"type":54,"tag":82,"props":1505,"children":1506},{"style":770},[1507],{"type":60,"value":938},{"type":54,"tag":82,"props":1509,"children":1510},{"style":105},[1511],{"type":60,"value":943},{"type":54,"tag":82,"props":1513,"children":1514},{"style":111},[1515],{"type":60,"value":285},{"type":54,"tag":82,"props":1517,"children":1518},{"style":105},[1519],{"type":60,"value":290},{"type":54,"tag":82,"props":1521,"children":1522},{"class":84,"line":428},[1523,1527,1531],{"type":54,"tag":82,"props":1524,"children":1525},{"style":297},[1526],{"type":60,"value":959},{"type":54,"tag":82,"props":1528,"children":1529},{"style":105},[1530],{"type":60,"value":305},{"type":54,"tag":82,"props":1532,"children":1533},{"style":111},[1534],{"type":60,"value":968},{"type":54,"tag":82,"props":1536,"children":1537},{"class":84,"line":537},[1538,1542,1546],{"type":54,"tag":82,"props":1539,"children":1540},{"style":229},[1541],{"type":60,"value":976},{"type":54,"tag":82,"props":1543,"children":1544},{"style":111},[1545],{"type":60,"value":285},{"type":54,"tag":82,"props":1547,"children":1548},{"style":105},[1549],{"type":60,"value":290},{"type":54,"tag":82,"props":1551,"children":1552},{"class":84,"line":562},[1553,1557,1561,1565,1569,1573],{"type":54,"tag":82,"props":1554,"children":1555},{"style":297},[1556],{"type":60,"value":992},{"type":54,"tag":82,"props":1558,"children":1559},{"style":105},[1560],{"type":60,"value":305},{"type":54,"tag":82,"props":1562,"children":1563},{"style":105},[1564],{"type":60,"value":129},{"type":54,"tag":82,"props":1566,"children":1567},{"style":132},[1568],{"type":60,"value":1005},{"type":54,"tag":82,"props":1570,"children":1571},{"style":105},[1572],{"type":60,"value":140},{"type":54,"tag":82,"props":1574,"children":1575},{"style":105},[1576],{"type":60,"value":534},{"type":54,"tag":82,"props":1578,"children":1579},{"class":84,"line":626},[1580,1585,1589],{"type":54,"tag":82,"props":1581,"children":1582},{"style":297},[1583],{"type":60,"value":1584},"      headers",{"type":54,"tag":82,"props":1586,"children":1587},{"style":105},[1588],{"type":60,"value":237},{"type":54,"tag":82,"props":1590,"children":1591},{"style":105},[1592],{"type":60,"value":1439},{"type":54,"tag":82,"props":1594,"children":1595},{"class":84,"line":714},[1596,1601],{"type":54,"tag":82,"props":1597,"children":1598},{"style":99},[1599],{"type":60,"value":1600},"        return",{"type":54,"tag":82,"props":1602,"children":1603},{"style":105},[1604],{"type":60,"value":1439},{"type":54,"tag":82,"props":1606,"children":1607},{"class":84,"line":732},[1608,1613,1617,1622,1627,1632,1637,1642,1647,1652,1657,1661],{"type":54,"tag":82,"props":1609,"children":1610},{"style":297},[1611],{"type":60,"value":1612},"          Authorization",{"type":54,"tag":82,"props":1614,"children":1615},{"style":105},[1616],{"type":60,"value":305},{"type":54,"tag":82,"props":1618,"children":1619},{"style":111},[1620],{"type":60,"value":1621}," token",{"type":54,"tag":82,"props":1623,"children":1624},{"style":105},[1625],{"type":60,"value":1626}," ?",{"type":54,"tag":82,"props":1628,"children":1629},{"style":105},[1630],{"type":60,"value":1631}," `",{"type":54,"tag":82,"props":1633,"children":1634},{"style":132},[1635],{"type":60,"value":1636},"Bearer ",{"type":54,"tag":82,"props":1638,"children":1639},{"style":105},[1640],{"type":60,"value":1641},"${",{"type":54,"tag":82,"props":1643,"children":1644},{"style":111},[1645],{"type":60,"value":1646},"token",{"type":54,"tag":82,"props":1648,"children":1649},{"style":105},[1650],{"type":60,"value":1651},"}`",{"type":54,"tag":82,"props":1653,"children":1654},{"style":105},[1655],{"type":60,"value":1656}," :",{"type":54,"tag":82,"props":1658,"children":1659},{"style":105},[1660],{"type":60,"value":1384},{"type":54,"tag":82,"props":1662,"children":1663},{"style":105},[1664],{"type":60,"value":534},{"type":54,"tag":82,"props":1666,"children":1667},{"class":84,"line":748},[1668],{"type":54,"tag":82,"props":1669,"children":1670},{"style":105},[1671],{"type":60,"value":1672},"        };\n",{"type":54,"tag":82,"props":1674,"children":1675},{"class":84,"line":756},[1676],{"type":54,"tag":82,"props":1677,"children":1678},{"style":105},[1679],{"type":60,"value":1680},"      },\n",{"type":54,"tag":82,"props":1682,"children":1684},{"class":84,"line":1683},19,[1685,1689,1693],{"type":54,"tag":82,"props":1686,"children":1687},{"style":105},[1688],{"type":60,"value":1021},{"type":54,"tag":82,"props":1690,"children":1691},{"style":111},[1692],{"type":60,"value":725},{"type":54,"tag":82,"props":1694,"children":1695},{"style":105},[1696],{"type":60,"value":534},{"type":54,"tag":82,"props":1698,"children":1700},{"class":84,"line":1699},20,[1701,1705],{"type":54,"tag":82,"props":1702,"children":1703},{"style":111},[1704],{"type":60,"value":1037},{"type":54,"tag":82,"props":1706,"children":1707},{"style":105},[1708],{"type":60,"value":534},{"type":54,"tag":82,"props":1710,"children":1712},{"class":84,"line":1711},21,[1713,1717,1721],{"type":54,"tag":82,"props":1714,"children":1715},{"style":105},[1716],{"type":60,"value":420},{"type":54,"tag":82,"props":1718,"children":1719},{"style":111},[1720],{"type":60,"value":725},{"type":54,"tag":82,"props":1722,"children":1723},{"style":105},[1724],{"type":60,"value":145},{"type":54,"tag":1726,"props":1727,"children":1728},"p",{},[1729,1731,1737],{"type":60,"value":1730},"The ",{"type":54,"tag":78,"props":1732,"children":1734},{"className":1733},[],[1735],{"type":60,"value":1736},"headers",{"type":60,"value":1738}," callback is invoked on every HTTP request, so token changes take effect immediately.",{"type":54,"tag":1253,"props":1740,"children":1742},{"id":1741},"inferring-procedure-input-and-output-types",[1743],{"type":60,"value":1744},"Inferring Procedure Input and Output Types",{"type":54,"tag":70,"props":1746,"children":1748},{"className":72,"code":1747,"language":74,"meta":75,"style":75},"import type { inferRouterInputs, inferRouterOutputs } from '@trpc\u002Fserver';\nimport type { AppRouter } from '.\u002Fserver';\n\ntype RouterInput = inferRouterInputs\u003CAppRouter>;\ntype RouterOutput = inferRouterOutputs\u003CAppRouter>;\n\ntype UserCreateInput = RouterInput['user']['create'];\ntype UserByIdOutput = RouterOutput['user']['byId'];\n",[1749],{"type":54,"tag":78,"props":1750,"children":1751},{"__ignoreMap":75},[1752,1805,1848,1855,1889,1921,1928,1991],{"type":54,"tag":82,"props":1753,"children":1754},{"class":84,"line":85},[1755,1759,1763,1767,1772,1776,1781,1785,1789,1793,1797,1801],{"type":54,"tag":82,"props":1756,"children":1757},{"style":99},[1758],{"type":60,"value":102},{"type":54,"tag":82,"props":1760,"children":1761},{"style":99},[1762],{"type":60,"value":767},{"type":54,"tag":82,"props":1764,"children":1765},{"style":105},[1766],{"type":60,"value":108},{"type":54,"tag":82,"props":1768,"children":1769},{"style":111},[1770],{"type":60,"value":1771}," inferRouterInputs",{"type":54,"tag":82,"props":1773,"children":1774},{"style":105},[1775],{"type":60,"value":498},{"type":54,"tag":82,"props":1777,"children":1778},{"style":111},[1779],{"type":60,"value":1780}," inferRouterOutputs",{"type":54,"tag":82,"props":1782,"children":1783},{"style":105},[1784],{"type":60,"value":119},{"type":54,"tag":82,"props":1786,"children":1787},{"style":99},[1788],{"type":60,"value":124},{"type":54,"tag":82,"props":1790,"children":1791},{"style":105},[1792],{"type":60,"value":129},{"type":54,"tag":82,"props":1794,"children":1795},{"style":132},[1796],{"type":60,"value":135},{"type":54,"tag":82,"props":1798,"children":1799},{"style":105},[1800],{"type":60,"value":140},{"type":54,"tag":82,"props":1802,"children":1803},{"style":105},[1804],{"type":60,"value":145},{"type":54,"tag":82,"props":1806,"children":1807},{"class":84,"line":95},[1808,1812,1816,1820,1824,1828,1832,1836,1840,1844],{"type":54,"tag":82,"props":1809,"children":1810},{"style":99},[1811],{"type":60,"value":102},{"type":54,"tag":82,"props":1813,"children":1814},{"style":99},[1815],{"type":60,"value":767},{"type":54,"tag":82,"props":1817,"children":1818},{"style":105},[1819],{"type":60,"value":108},{"type":54,"tag":82,"props":1821,"children":1822},{"style":111},[1823],{"type":60,"value":773},{"type":54,"tag":82,"props":1825,"children":1826},{"style":105},[1827],{"type":60,"value":119},{"type":54,"tag":82,"props":1829,"children":1830},{"style":99},[1831],{"type":60,"value":124},{"type":54,"tag":82,"props":1833,"children":1834},{"style":105},[1835],{"type":60,"value":129},{"type":54,"tag":82,"props":1837,"children":1838},{"style":132},[1839],{"type":60,"value":893},{"type":54,"tag":82,"props":1841,"children":1842},{"style":105},[1843],{"type":60,"value":140},{"type":54,"tag":82,"props":1845,"children":1846},{"style":105},[1847],{"type":60,"value":145},{"type":54,"tag":82,"props":1849,"children":1850},{"class":84,"line":148},[1851],{"type":54,"tag":82,"props":1852,"children":1853},{"emptyLinePlaceholder":194},[1854],{"type":60,"value":197},{"type":54,"tag":82,"props":1856,"children":1857},{"class":84,"line":190},[1858,1863,1868,1872,1876,1880,1884],{"type":54,"tag":82,"props":1859,"children":1860},{"style":204},[1861],{"type":60,"value":1862},"type",{"type":54,"tag":82,"props":1864,"children":1865},{"style":770},[1866],{"type":60,"value":1867}," RouterInput",{"type":54,"tag":82,"props":1869,"children":1870},{"style":105},[1871],{"type":60,"value":778},{"type":54,"tag":82,"props":1873,"children":1874},{"style":770},[1875],{"type":60,"value":1771},{"type":54,"tag":82,"props":1877,"children":1878},{"style":105},[1879],{"type":60,"value":933},{"type":54,"tag":82,"props":1881,"children":1882},{"style":770},[1883],{"type":60,"value":938},{"type":54,"tag":82,"props":1885,"children":1886},{"style":105},[1887],{"type":60,"value":1888},">;\n",{"type":54,"tag":82,"props":1890,"children":1891},{"class":84,"line":200},[1892,1896,1901,1905,1909,1913,1917],{"type":54,"tag":82,"props":1893,"children":1894},{"style":204},[1895],{"type":60,"value":1862},{"type":54,"tag":82,"props":1897,"children":1898},{"style":770},[1899],{"type":60,"value":1900}," RouterOutput",{"type":54,"tag":82,"props":1902,"children":1903},{"style":105},[1904],{"type":60,"value":778},{"type":54,"tag":82,"props":1906,"children":1907},{"style":770},[1908],{"type":60,"value":1780},{"type":54,"tag":82,"props":1910,"children":1911},{"style":105},[1912],{"type":60,"value":933},{"type":54,"tag":82,"props":1914,"children":1915},{"style":770},[1916],{"type":60,"value":938},{"type":54,"tag":82,"props":1918,"children":1919},{"style":105},[1920],{"type":60,"value":1888},{"type":54,"tag":82,"props":1922,"children":1923},{"class":84,"line":244},[1924],{"type":54,"tag":82,"props":1925,"children":1926},{"emptyLinePlaceholder":194},[1927],{"type":60,"value":197},{"type":54,"tag":82,"props":1929,"children":1930},{"class":84,"line":252},[1931,1935,1940,1944,1948,1953,1957,1961,1965,1970,1974,1978,1982,1987],{"type":54,"tag":82,"props":1932,"children":1933},{"style":204},[1934],{"type":60,"value":1862},{"type":54,"tag":82,"props":1936,"children":1937},{"style":770},[1938],{"type":60,"value":1939}," UserCreateInput",{"type":54,"tag":82,"props":1941,"children":1942},{"style":105},[1943],{"type":60,"value":778},{"type":54,"tag":82,"props":1945,"children":1946},{"style":770},[1947],{"type":60,"value":1867},{"type":54,"tag":82,"props":1949,"children":1950},{"style":111},[1951],{"type":60,"value":1952},"[",{"type":54,"tag":82,"props":1954,"children":1955},{"style":105},[1956],{"type":60,"value":140},{"type":54,"tag":82,"props":1958,"children":1959},{"style":132},[1960],{"type":60,"value":1098},{"type":54,"tag":82,"props":1962,"children":1963},{"style":105},[1964],{"type":60,"value":140},{"type":54,"tag":82,"props":1966,"children":1967},{"style":111},[1968],{"type":60,"value":1969},"][",{"type":54,"tag":82,"props":1971,"children":1972},{"style":105},[1973],{"type":60,"value":140},{"type":54,"tag":82,"props":1975,"children":1976},{"style":132},[1977],{"type":60,"value":232},{"type":54,"tag":82,"props":1979,"children":1980},{"style":105},[1981],{"type":60,"value":140},{"type":54,"tag":82,"props":1983,"children":1984},{"style":111},[1985],{"type":60,"value":1986},"]",{"type":54,"tag":82,"props":1988,"children":1989},{"style":105},[1990],{"type":60,"value":145},{"type":54,"tag":82,"props":1992,"children":1993},{"class":84,"line":293},[1994,1998,2003,2007,2011,2015,2019,2023,2027,2031,2035,2039,2043,2047],{"type":54,"tag":82,"props":1995,"children":1996},{"style":204},[1997],{"type":60,"value":1862},{"type":54,"tag":82,"props":1999,"children":2000},{"style":770},[2001],{"type":60,"value":2002}," UserByIdOutput",{"type":54,"tag":82,"props":2004,"children":2005},{"style":105},[2006],{"type":60,"value":778},{"type":54,"tag":82,"props":2008,"children":2009},{"style":770},[2010],{"type":60,"value":1900},{"type":54,"tag":82,"props":2012,"children":2013},{"style":111},[2014],{"type":60,"value":1952},{"type":54,"tag":82,"props":2016,"children":2017},{"style":105},[2018],{"type":60,"value":140},{"type":54,"tag":82,"props":2020,"children":2021},{"style":132},[2022],{"type":60,"value":1098},{"type":54,"tag":82,"props":2024,"children":2025},{"style":105},[2026],{"type":60,"value":140},{"type":54,"tag":82,"props":2028,"children":2029},{"style":111},[2030],{"type":60,"value":1969},{"type":54,"tag":82,"props":2032,"children":2033},{"style":105},[2034],{"type":60,"value":140},{"type":54,"tag":82,"props":2036,"children":2037},{"style":132},[2038],{"type":60,"value":1107},{"type":54,"tag":82,"props":2040,"children":2041},{"style":105},[2042],{"type":60,"value":140},{"type":54,"tag":82,"props":2044,"children":2045},{"style":111},[2046],{"type":60,"value":1986},{"type":54,"tag":82,"props":2048,"children":2049},{"style":105},[2050],{"type":60,"value":145},{"type":54,"tag":1253,"props":2052,"children":2054},{"id":2053},"aborting-requests-with-abortcontroller",[2055],{"type":60,"value":2056},"Aborting Requests with AbortController",{"type":54,"tag":70,"props":2058,"children":2060},{"className":72,"code":2059,"language":74,"meta":75,"style":75},"import { createTRPCClient, httpBatchLink } from '@trpc\u002Fclient';\nimport type { AppRouter } from '.\u002Fserver';\n\nconst client = createTRPCClient\u003CAppRouter>({\n  links: [httpBatchLink({ url: 'http:\u002F\u002Flocalhost:3000\u002Ftrpc' })],\n});\n\nconst ac = new AbortController();\nconst query = client.user.byId.query({ id: '1' }, { signal: ac.signal });\nac.abort();\n",[2061],{"type":54,"tag":78,"props":2062,"children":2063},{"__ignoreMap":75},[2064,2111,2154,2161,2200,2263,2278,2285,2319,2435],{"type":54,"tag":82,"props":2065,"children":2066},{"class":84,"line":85},[2067,2071,2075,2079,2083,2087,2091,2095,2099,2103,2107],{"type":54,"tag":82,"props":2068,"children":2069},{"style":99},[2070],{"type":60,"value":102},{"type":54,"tag":82,"props":2072,"children":2073},{"style":105},[2074],{"type":60,"value":108},{"type":54,"tag":82,"props":2076,"children":2077},{"style":111},[2078],{"type":60,"value":823},{"type":54,"tag":82,"props":2080,"children":2081},{"style":105},[2082],{"type":60,"value":498},{"type":54,"tag":82,"props":2084,"children":2085},{"style":111},[2086],{"type":60,"value":832},{"type":54,"tag":82,"props":2088,"children":2089},{"style":105},[2090],{"type":60,"value":119},{"type":54,"tag":82,"props":2092,"children":2093},{"style":99},[2094],{"type":60,"value":124},{"type":54,"tag":82,"props":2096,"children":2097},{"style":105},[2098],{"type":60,"value":129},{"type":54,"tag":82,"props":2100,"children":2101},{"style":132},[2102],{"type":60,"value":849},{"type":54,"tag":82,"props":2104,"children":2105},{"style":105},[2106],{"type":60,"value":140},{"type":54,"tag":82,"props":2108,"children":2109},{"style":105},[2110],{"type":60,"value":145},{"type":54,"tag":82,"props":2112,"children":2113},{"class":84,"line":95},[2114,2118,2122,2126,2130,2134,2138,2142,2146,2150],{"type":54,"tag":82,"props":2115,"children":2116},{"style":99},[2117],{"type":60,"value":102},{"type":54,"tag":82,"props":2119,"children":2120},{"style":99},[2121],{"type":60,"value":767},{"type":54,"tag":82,"props":2123,"children":2124},{"style":105},[2125],{"type":60,"value":108},{"type":54,"tag":82,"props":2127,"children":2128},{"style":111},[2129],{"type":60,"value":773},{"type":54,"tag":82,"props":2131,"children":2132},{"style":105},[2133],{"type":60,"value":119},{"type":54,"tag":82,"props":2135,"children":2136},{"style":99},[2137],{"type":60,"value":124},{"type":54,"tag":82,"props":2139,"children":2140},{"style":105},[2141],{"type":60,"value":129},{"type":54,"tag":82,"props":2143,"children":2144},{"style":132},[2145],{"type":60,"value":893},{"type":54,"tag":82,"props":2147,"children":2148},{"style":105},[2149],{"type":60,"value":140},{"type":54,"tag":82,"props":2151,"children":2152},{"style":105},[2153],{"type":60,"value":145},{"type":54,"tag":82,"props":2155,"children":2156},{"class":84,"line":148},[2157],{"type":54,"tag":82,"props":2158,"children":2159},{"emptyLinePlaceholder":194},[2160],{"type":60,"value":197},{"type":54,"tag":82,"props":2162,"children":2163},{"class":84,"line":190},[2164,2168,2172,2176,2180,2184,2188,2192,2196],{"type":54,"tag":82,"props":2165,"children":2166},{"style":204},[2167],{"type":60,"value":207},{"type":54,"tag":82,"props":2169,"children":2170},{"style":111},[2171],{"type":60,"value":920},{"type":54,"tag":82,"props":2173,"children":2174},{"style":105},[2175],{"type":60,"value":217},{"type":54,"tag":82,"props":2177,"children":2178},{"style":229},[2179],{"type":60,"value":823},{"type":54,"tag":82,"props":2181,"children":2182},{"style":105},[2183],{"type":60,"value":933},{"type":54,"tag":82,"props":2185,"children":2186},{"style":770},[2187],{"type":60,"value":938},{"type":54,"tag":82,"props":2189,"children":2190},{"style":105},[2191],{"type":60,"value":943},{"type":54,"tag":82,"props":2193,"children":2194},{"style":111},[2195],{"type":60,"value":285},{"type":54,"tag":82,"props":2197,"children":2198},{"style":105},[2199],{"type":60,"value":290},{"type":54,"tag":82,"props":2201,"children":2202},{"class":84,"line":200},[2203,2207,2211,2216,2221,2225,2229,2234,2238,2242,2246,2250,2254,2259],{"type":54,"tag":82,"props":2204,"children":2205},{"style":297},[2206],{"type":60,"value":959},{"type":54,"tag":82,"props":2208,"children":2209},{"style":105},[2210],{"type":60,"value":305},{"type":54,"tag":82,"props":2212,"children":2213},{"style":111},[2214],{"type":60,"value":2215}," [",{"type":54,"tag":82,"props":2217,"children":2218},{"style":229},[2219],{"type":60,"value":2220},"httpBatchLink",{"type":54,"tag":82,"props":2222,"children":2223},{"style":111},[2224],{"type":60,"value":285},{"type":54,"tag":82,"props":2226,"children":2227},{"style":105},[2228],{"type":60,"value":388},{"type":54,"tag":82,"props":2230,"children":2231},{"style":297},[2232],{"type":60,"value":2233}," url",{"type":54,"tag":82,"props":2235,"children":2236},{"style":105},[2237],{"type":60,"value":305},{"type":54,"tag":82,"props":2239,"children":2240},{"style":105},[2241],{"type":60,"value":129},{"type":54,"tag":82,"props":2243,"children":2244},{"style":132},[2245],{"type":60,"value":1005},{"type":54,"tag":82,"props":2247,"children":2248},{"style":105},[2249],{"type":60,"value":140},{"type":54,"tag":82,"props":2251,"children":2252},{"style":105},[2253],{"type":60,"value":119},{"type":54,"tag":82,"props":2255,"children":2256},{"style":111},[2257],{"type":60,"value":2258},")]",{"type":54,"tag":82,"props":2260,"children":2261},{"style":105},[2262],{"type":60,"value":534},{"type":54,"tag":82,"props":2264,"children":2265},{"class":84,"line":244},[2266,2270,2274],{"type":54,"tag":82,"props":2267,"children":2268},{"style":105},[2269],{"type":60,"value":420},{"type":54,"tag":82,"props":2271,"children":2272},{"style":111},[2273],{"type":60,"value":725},{"type":54,"tag":82,"props":2275,"children":2276},{"style":105},[2277],{"type":60,"value":145},{"type":54,"tag":82,"props":2279,"children":2280},{"class":84,"line":252},[2281],{"type":54,"tag":82,"props":2282,"children":2283},{"emptyLinePlaceholder":194},[2284],{"type":60,"value":197},{"type":54,"tag":82,"props":2286,"children":2287},{"class":84,"line":293},[2288,2292,2297,2301,2306,2311,2315],{"type":54,"tag":82,"props":2289,"children":2290},{"style":204},[2291],{"type":60,"value":207},{"type":54,"tag":82,"props":2293,"children":2294},{"style":111},[2295],{"type":60,"value":2296}," ac ",{"type":54,"tag":82,"props":2298,"children":2299},{"style":105},[2300],{"type":60,"value":217},{"type":54,"tag":82,"props":2302,"children":2303},{"style":105},[2304],{"type":60,"value":2305}," new",{"type":54,"tag":82,"props":2307,"children":2308},{"style":229},[2309],{"type":60,"value":2310}," AbortController",{"type":54,"tag":82,"props":2312,"children":2313},{"style":111},[2314],{"type":60,"value":237},{"type":54,"tag":82,"props":2316,"children":2317},{"style":105},[2318],{"type":60,"value":145},{"type":54,"tag":82,"props":2320,"children":2321},{"class":84,"line":328},[2322,2326,2331,2335,2339,2343,2347,2351,2355,2359,2363,2367,2371,2375,2379,2383,2387,2391,2396,2400,2405,2409,2414,2418,2423,2427,2431],{"type":54,"tag":82,"props":2323,"children":2324},{"style":204},[2325],{"type":60,"value":207},{"type":54,"tag":82,"props":2327,"children":2328},{"style":111},[2329],{"type":60,"value":2330}," query ",{"type":54,"tag":82,"props":2332,"children":2333},{"style":105},[2334],{"type":60,"value":217},{"type":54,"tag":82,"props":2336,"children":2337},{"style":111},[2338],{"type":60,"value":1089},{"type":54,"tag":82,"props":2340,"children":2341},{"style":105},[2342],{"type":60,"value":226},{"type":54,"tag":82,"props":2344,"children":2345},{"style":111},[2346],{"type":60,"value":1098},{"type":54,"tag":82,"props":2348,"children":2349},{"style":105},[2350],{"type":60,"value":226},{"type":54,"tag":82,"props":2352,"children":2353},{"style":111},[2354],{"type":60,"value":1107},{"type":54,"tag":82,"props":2356,"children":2357},{"style":105},[2358],{"type":60,"value":226},{"type":54,"tag":82,"props":2360,"children":2361},{"style":229},[2362],{"type":60,"value":438},{"type":54,"tag":82,"props":2364,"children":2365},{"style":111},[2366],{"type":60,"value":285},{"type":54,"tag":82,"props":2368,"children":2369},{"style":105},[2370],{"type":60,"value":388},{"type":54,"tag":82,"props":2372,"children":2373},{"style":297},[2374],{"type":60,"value":393},{"type":54,"tag":82,"props":2376,"children":2377},{"style":105},[2378],{"type":60,"value":305},{"type":54,"tag":82,"props":2380,"children":2381},{"style":105},[2382],{"type":60,"value":129},{"type":54,"tag":82,"props":2384,"children":2385},{"style":132},[2386],{"type":60,"value":681},{"type":54,"tag":82,"props":2388,"children":2389},{"style":105},[2390],{"type":60,"value":140},{"type":54,"tag":82,"props":2392,"children":2393},{"style":105},[2394],{"type":60,"value":2395}," },",{"type":54,"tag":82,"props":2397,"children":2398},{"style":105},[2399],{"type":60,"value":108},{"type":54,"tag":82,"props":2401,"children":2402},{"style":297},[2403],{"type":60,"value":2404}," signal",{"type":54,"tag":82,"props":2406,"children":2407},{"style":105},[2408],{"type":60,"value":305},{"type":54,"tag":82,"props":2410,"children":2411},{"style":111},[2412],{"type":60,"value":2413}," ac",{"type":54,"tag":82,"props":2415,"children":2416},{"style":105},[2417],{"type":60,"value":226},{"type":54,"tag":82,"props":2419,"children":2420},{"style":111},[2421],{"type":60,"value":2422},"signal ",{"type":54,"tag":82,"props":2424,"children":2425},{"style":105},[2426],{"type":60,"value":420},{"type":54,"tag":82,"props":2428,"children":2429},{"style":111},[2430],{"type":60,"value":725},{"type":54,"tag":82,"props":2432,"children":2433},{"style":105},[2434],{"type":60,"value":145},{"type":54,"tag":82,"props":2436,"children":2437},{"class":84,"line":354},[2438,2443,2447,2452,2456],{"type":54,"tag":82,"props":2439,"children":2440},{"style":111},[2441],{"type":60,"value":2442},"ac",{"type":54,"tag":82,"props":2444,"children":2445},{"style":105},[2446],{"type":60,"value":226},{"type":54,"tag":82,"props":2448,"children":2449},{"style":229},[2450],{"type":60,"value":2451},"abort",{"type":54,"tag":82,"props":2453,"children":2454},{"style":111},[2455],{"type":60,"value":237},{"type":54,"tag":82,"props":2457,"children":2458},{"style":105},[2459],{"type":60,"value":145},{"type":54,"tag":1253,"props":2461,"children":2463},{"id":2462},"typed-error-handling",[2464],{"type":60,"value":2465},"Typed Error Handling",{"type":54,"tag":70,"props":2467,"children":2469},{"className":72,"code":2468,"language":74,"meta":75,"style":75},"import { TRPCClientError } from '@trpc\u002Fclient';\nimport type { AppRouter } from '.\u002Fserver';\n\nfunction isTRPCClientError(\n  cause: unknown,\n): cause is TRPCClientError\u003CAppRouter> {\n  return cause instanceof TRPCClientError;\n}\n\ntry {\n  await client.user.byId.query({ id: '1' });\n} catch (cause) {\n  if (isTRPCClientError(cause)) {\n    console.log('tRPC error code:', cause.data?.code);\n  }\n}\n",[2470],{"type":54,"tag":78,"props":2471,"children":2472},{"__ignoreMap":75},[2473,2513,2556,2563,2581,2602,2640,2665,2672,2679,2691,2767,2788,2823,2891,2899],{"type":54,"tag":82,"props":2474,"children":2475},{"class":84,"line":85},[2476,2480,2484,2489,2493,2497,2501,2505,2509],{"type":54,"tag":82,"props":2477,"children":2478},{"style":99},[2479],{"type":60,"value":102},{"type":54,"tag":82,"props":2481,"children":2482},{"style":105},[2483],{"type":60,"value":108},{"type":54,"tag":82,"props":2485,"children":2486},{"style":111},[2487],{"type":60,"value":2488}," TRPCClientError",{"type":54,"tag":82,"props":2490,"children":2491},{"style":105},[2492],{"type":60,"value":119},{"type":54,"tag":82,"props":2494,"children":2495},{"style":99},[2496],{"type":60,"value":124},{"type":54,"tag":82,"props":2498,"children":2499},{"style":105},[2500],{"type":60,"value":129},{"type":54,"tag":82,"props":2502,"children":2503},{"style":132},[2504],{"type":60,"value":849},{"type":54,"tag":82,"props":2506,"children":2507},{"style":105},[2508],{"type":60,"value":140},{"type":54,"tag":82,"props":2510,"children":2511},{"style":105},[2512],{"type":60,"value":145},{"type":54,"tag":82,"props":2514,"children":2515},{"class":84,"line":95},[2516,2520,2524,2528,2532,2536,2540,2544,2548,2552],{"type":54,"tag":82,"props":2517,"children":2518},{"style":99},[2519],{"type":60,"value":102},{"type":54,"tag":82,"props":2521,"children":2522},{"style":99},[2523],{"type":60,"value":767},{"type":54,"tag":82,"props":2525,"children":2526},{"style":105},[2527],{"type":60,"value":108},{"type":54,"tag":82,"props":2529,"children":2530},{"style":111},[2531],{"type":60,"value":773},{"type":54,"tag":82,"props":2533,"children":2534},{"style":105},[2535],{"type":60,"value":119},{"type":54,"tag":82,"props":2537,"children":2538},{"style":99},[2539],{"type":60,"value":124},{"type":54,"tag":82,"props":2541,"children":2542},{"style":105},[2543],{"type":60,"value":129},{"type":54,"tag":82,"props":2545,"children":2546},{"style":132},[2547],{"type":60,"value":893},{"type":54,"tag":82,"props":2549,"children":2550},{"style":105},[2551],{"type":60,"value":140},{"type":54,"tag":82,"props":2553,"children":2554},{"style":105},[2555],{"type":60,"value":145},{"type":54,"tag":82,"props":2557,"children":2558},{"class":84,"line":148},[2559],{"type":54,"tag":82,"props":2560,"children":2561},{"emptyLinePlaceholder":194},[2562],{"type":60,"value":197},{"type":54,"tag":82,"props":2564,"children":2565},{"class":84,"line":190},[2566,2571,2576],{"type":54,"tag":82,"props":2567,"children":2568},{"style":204},[2569],{"type":60,"value":2570},"function",{"type":54,"tag":82,"props":2572,"children":2573},{"style":229},[2574],{"type":60,"value":2575}," isTRPCClientError",{"type":54,"tag":82,"props":2577,"children":2578},{"style":105},[2579],{"type":60,"value":2580},"(\n",{"type":54,"tag":82,"props":2582,"children":2583},{"class":84,"line":200},[2584,2589,2593,2598],{"type":54,"tag":82,"props":2585,"children":2586},{"style":450},[2587],{"type":60,"value":2588},"  cause",{"type":54,"tag":82,"props":2590,"children":2591},{"style":105},[2592],{"type":60,"value":305},{"type":54,"tag":82,"props":2594,"children":2595},{"style":770},[2596],{"type":60,"value":2597}," unknown",{"type":54,"tag":82,"props":2599,"children":2600},{"style":105},[2601],{"type":60,"value":534},{"type":54,"tag":82,"props":2603,"children":2604},{"class":84,"line":244},[2605,2610,2615,2620,2624,2628,2632,2636],{"type":54,"tag":82,"props":2606,"children":2607},{"style":105},[2608],{"type":60,"value":2609},"):",{"type":54,"tag":82,"props":2611,"children":2612},{"style":450},[2613],{"type":60,"value":2614}," cause",{"type":54,"tag":82,"props":2616,"children":2617},{"style":105},[2618],{"type":60,"value":2619}," is",{"type":54,"tag":82,"props":2621,"children":2622},{"style":770},[2623],{"type":60,"value":2488},{"type":54,"tag":82,"props":2625,"children":2626},{"style":105},[2627],{"type":60,"value":933},{"type":54,"tag":82,"props":2629,"children":2630},{"style":770},[2631],{"type":60,"value":938},{"type":54,"tag":82,"props":2633,"children":2634},{"style":105},[2635],{"type":60,"value":943},{"type":54,"tag":82,"props":2637,"children":2638},{"style":105},[2639],{"type":60,"value":1439},{"type":54,"tag":82,"props":2641,"children":2642},{"class":84,"line":252},[2643,2648,2652,2657,2661],{"type":54,"tag":82,"props":2644,"children":2645},{"style":99},[2646],{"type":60,"value":2647},"  return",{"type":54,"tag":82,"props":2649,"children":2650},{"style":111},[2651],{"type":60,"value":2614},{"type":54,"tag":82,"props":2653,"children":2654},{"style":105},[2655],{"type":60,"value":2656}," instanceof",{"type":54,"tag":82,"props":2658,"children":2659},{"style":770},[2660],{"type":60,"value":2488},{"type":54,"tag":82,"props":2662,"children":2663},{"style":105},[2664],{"type":60,"value":145},{"type":54,"tag":82,"props":2666,"children":2667},{"class":84,"line":293},[2668],{"type":54,"tag":82,"props":2669,"children":2670},{"style":105},[2671],{"type":60,"value":1468},{"type":54,"tag":82,"props":2673,"children":2674},{"class":84,"line":328},[2675],{"type":54,"tag":82,"props":2676,"children":2677},{"emptyLinePlaceholder":194},[2678],{"type":60,"value":197},{"type":54,"tag":82,"props":2680,"children":2681},{"class":84,"line":354},[2682,2687],{"type":54,"tag":82,"props":2683,"children":2684},{"style":99},[2685],{"type":60,"value":2686},"try",{"type":54,"tag":82,"props":2688,"children":2689},{"style":105},[2690],{"type":60,"value":1439},{"type":54,"tag":82,"props":2692,"children":2693},{"class":84,"line":428},[2694,2699,2703,2707,2711,2715,2719,2723,2727,2731,2735,2739,2743,2747,2751,2755,2759,2763],{"type":54,"tag":82,"props":2695,"children":2696},{"style":99},[2697],{"type":60,"value":2698},"  await",{"type":54,"tag":82,"props":2700,"children":2701},{"style":111},[2702],{"type":60,"value":1089},{"type":54,"tag":82,"props":2704,"children":2705},{"style":105},[2706],{"type":60,"value":226},{"type":54,"tag":82,"props":2708,"children":2709},{"style":111},[2710],{"type":60,"value":1098},{"type":54,"tag":82,"props":2712,"children":2713},{"style":105},[2714],{"type":60,"value":226},{"type":54,"tag":82,"props":2716,"children":2717},{"style":111},[2718],{"type":60,"value":1107},{"type":54,"tag":82,"props":2720,"children":2721},{"style":105},[2722],{"type":60,"value":226},{"type":54,"tag":82,"props":2724,"children":2725},{"style":229},[2726],{"type":60,"value":438},{"type":54,"tag":82,"props":2728,"children":2729},{"style":297},[2730],{"type":60,"value":285},{"type":54,"tag":82,"props":2732,"children":2733},{"style":105},[2734],{"type":60,"value":388},{"type":54,"tag":82,"props":2736,"children":2737},{"style":297},[2738],{"type":60,"value":393},{"type":54,"tag":82,"props":2740,"children":2741},{"style":105},[2742],{"type":60,"value":305},{"type":54,"tag":82,"props":2744,"children":2745},{"style":105},[2746],{"type":60,"value":129},{"type":54,"tag":82,"props":2748,"children":2749},{"style":132},[2750],{"type":60,"value":681},{"type":54,"tag":82,"props":2752,"children":2753},{"style":105},[2754],{"type":60,"value":140},{"type":54,"tag":82,"props":2756,"children":2757},{"style":105},[2758],{"type":60,"value":119},{"type":54,"tag":82,"props":2760,"children":2761},{"style":297},[2762],{"type":60,"value":725},{"type":54,"tag":82,"props":2764,"children":2765},{"style":105},[2766],{"type":60,"value":145},{"type":54,"tag":82,"props":2768,"children":2769},{"class":84,"line":537},[2770,2774,2779,2784],{"type":54,"tag":82,"props":2771,"children":2772},{"style":105},[2773],{"type":60,"value":420},{"type":54,"tag":82,"props":2775,"children":2776},{"style":99},[2777],{"type":60,"value":2778}," catch",{"type":54,"tag":82,"props":2780,"children":2781},{"style":111},[2782],{"type":60,"value":2783}," (cause) ",{"type":54,"tag":82,"props":2785,"children":2786},{"style":105},[2787],{"type":60,"value":290},{"type":54,"tag":82,"props":2789,"children":2790},{"class":84,"line":562},[2791,2796,2800,2805,2809,2814,2819],{"type":54,"tag":82,"props":2792,"children":2793},{"style":99},[2794],{"type":60,"value":2795},"  if",{"type":54,"tag":82,"props":2797,"children":2798},{"style":297},[2799],{"type":60,"value":468},{"type":54,"tag":82,"props":2801,"children":2802},{"style":229},[2803],{"type":60,"value":2804},"isTRPCClientError",{"type":54,"tag":82,"props":2806,"children":2807},{"style":297},[2808],{"type":60,"value":285},{"type":54,"tag":82,"props":2810,"children":2811},{"style":111},[2812],{"type":60,"value":2813},"cause",{"type":54,"tag":82,"props":2815,"children":2816},{"style":297},[2817],{"type":60,"value":2818},")) ",{"type":54,"tag":82,"props":2820,"children":2821},{"style":105},[2822],{"type":60,"value":290},{"type":54,"tag":82,"props":2824,"children":2825},{"class":84,"line":626},[2826,2831,2835,2840,2844,2848,2853,2857,2861,2865,2869,2874,2879,2883,2887],{"type":54,"tag":82,"props":2827,"children":2828},{"style":111},[2829],{"type":60,"value":2830},"    console",{"type":54,"tag":82,"props":2832,"children":2833},{"style":105},[2834],{"type":60,"value":226},{"type":54,"tag":82,"props":2836,"children":2837},{"style":229},[2838],{"type":60,"value":2839},"log",{"type":54,"tag":82,"props":2841,"children":2842},{"style":297},[2843],{"type":60,"value":285},{"type":54,"tag":82,"props":2845,"children":2846},{"style":105},[2847],{"type":60,"value":140},{"type":54,"tag":82,"props":2849,"children":2850},{"style":132},[2851],{"type":60,"value":2852},"tRPC error code:",{"type":54,"tag":82,"props":2854,"children":2855},{"style":105},[2856],{"type":60,"value":140},{"type":54,"tag":82,"props":2858,"children":2859},{"style":105},[2860],{"type":60,"value":498},{"type":54,"tag":82,"props":2862,"children":2863},{"style":111},[2864],{"type":60,"value":2614},{"type":54,"tag":82,"props":2866,"children":2867},{"style":105},[2868],{"type":60,"value":226},{"type":54,"tag":82,"props":2870,"children":2871},{"style":111},[2872],{"type":60,"value":2873},"data",{"type":54,"tag":82,"props":2875,"children":2876},{"style":105},[2877],{"type":60,"value":2878},"?.",{"type":54,"tag":82,"props":2880,"children":2881},{"style":111},[2882],{"type":60,"value":78},{"type":54,"tag":82,"props":2884,"children":2885},{"style":297},[2886],{"type":60,"value":725},{"type":54,"tag":82,"props":2888,"children":2889},{"style":105},[2890],{"type":60,"value":145},{"type":54,"tag":82,"props":2892,"children":2893},{"class":84,"line":714},[2894],{"type":54,"tag":82,"props":2895,"children":2896},{"style":105},[2897],{"type":60,"value":2898},"  }\n",{"type":54,"tag":82,"props":2900,"children":2901},{"class":84,"line":732},[2902],{"type":54,"tag":82,"props":2903,"children":2904},{"style":105},[2905],{"type":60,"value":1468},{"type":54,"tag":63,"props":2907,"children":2909},{"id":2908},"common-mistakes",[2910],{"type":60,"value":2911},"Common Mistakes",{"type":54,"tag":1253,"props":2913,"children":2915},{"id":2914},"critical-missing-approuter-type-parameter-on-createtrpcclient",[2916,2921],{"type":54,"tag":82,"props":2917,"children":2918},{},[2919],{"type":60,"value":2920},"CRITICAL",{"type":60,"value":2922}," Missing AppRouter type parameter on createTRPCClient",{"type":54,"tag":1726,"props":2924,"children":2925},{},[2926],{"type":60,"value":2927},"Wrong:",{"type":54,"tag":70,"props":2929,"children":2931},{"className":72,"code":2930,"language":74,"meta":75,"style":75},"const client = createTRPCClient({ links: [httpBatchLink({ url })] });\n",[2932],{"type":54,"tag":78,"props":2933,"children":2934},{"__ignoreMap":75},[2935],{"type":54,"tag":82,"props":2936,"children":2937},{"class":84,"line":85},[2938,2942,2946,2950,2954,2958,2962,2967,2971,2975,2979,2983,2987,2992,2996,3001,3005,3009],{"type":54,"tag":82,"props":2939,"children":2940},{"style":204},[2941],{"type":60,"value":207},{"type":54,"tag":82,"props":2943,"children":2944},{"style":111},[2945],{"type":60,"value":920},{"type":54,"tag":82,"props":2947,"children":2948},{"style":105},[2949],{"type":60,"value":217},{"type":54,"tag":82,"props":2951,"children":2952},{"style":229},[2953],{"type":60,"value":823},{"type":54,"tag":82,"props":2955,"children":2956},{"style":111},[2957],{"type":60,"value":285},{"type":54,"tag":82,"props":2959,"children":2960},{"style":105},[2961],{"type":60,"value":388},{"type":54,"tag":82,"props":2963,"children":2964},{"style":297},[2965],{"type":60,"value":2966}," links",{"type":54,"tag":82,"props":2968,"children":2969},{"style":105},[2970],{"type":60,"value":305},{"type":54,"tag":82,"props":2972,"children":2973},{"style":111},[2974],{"type":60,"value":2215},{"type":54,"tag":82,"props":2976,"children":2977},{"style":229},[2978],{"type":60,"value":2220},{"type":54,"tag":82,"props":2980,"children":2981},{"style":111},[2982],{"type":60,"value":285},{"type":54,"tag":82,"props":2984,"children":2985},{"style":105},[2986],{"type":60,"value":388},{"type":54,"tag":82,"props":2988,"children":2989},{"style":111},[2990],{"type":60,"value":2991}," url ",{"type":54,"tag":82,"props":2993,"children":2994},{"style":105},[2995],{"type":60,"value":420},{"type":54,"tag":82,"props":2997,"children":2998},{"style":111},[2999],{"type":60,"value":3000},")] ",{"type":54,"tag":82,"props":3002,"children":3003},{"style":105},[3004],{"type":60,"value":420},{"type":54,"tag":82,"props":3006,"children":3007},{"style":111},[3008],{"type":60,"value":725},{"type":54,"tag":82,"props":3010,"children":3011},{"style":105},[3012],{"type":60,"value":145},{"type":54,"tag":1726,"props":3014,"children":3015},{},[3016],{"type":60,"value":3017},"Correct:",{"type":54,"tag":70,"props":3019,"children":3021},{"className":72,"code":3020,"language":74,"meta":75,"style":75},"import type { AppRouter } from '.\u002Fserver';\n\nconst client = createTRPCClient\u003CAppRouter>({ links: [httpBatchLink({ url })] });\n",[3022],{"type":54,"tag":78,"props":3023,"children":3024},{"__ignoreMap":75},[3025,3068,3075],{"type":54,"tag":82,"props":3026,"children":3027},{"class":84,"line":85},[3028,3032,3036,3040,3044,3048,3052,3056,3060,3064],{"type":54,"tag":82,"props":3029,"children":3030},{"style":99},[3031],{"type":60,"value":102},{"type":54,"tag":82,"props":3033,"children":3034},{"style":99},[3035],{"type":60,"value":767},{"type":54,"tag":82,"props":3037,"children":3038},{"style":105},[3039],{"type":60,"value":108},{"type":54,"tag":82,"props":3041,"children":3042},{"style":111},[3043],{"type":60,"value":773},{"type":54,"tag":82,"props":3045,"children":3046},{"style":105},[3047],{"type":60,"value":119},{"type":54,"tag":82,"props":3049,"children":3050},{"style":99},[3051],{"type":60,"value":124},{"type":54,"tag":82,"props":3053,"children":3054},{"style":105},[3055],{"type":60,"value":129},{"type":54,"tag":82,"props":3057,"children":3058},{"style":132},[3059],{"type":60,"value":893},{"type":54,"tag":82,"props":3061,"children":3062},{"style":105},[3063],{"type":60,"value":140},{"type":54,"tag":82,"props":3065,"children":3066},{"style":105},[3067],{"type":60,"value":145},{"type":54,"tag":82,"props":3069,"children":3070},{"class":84,"line":95},[3071],{"type":54,"tag":82,"props":3072,"children":3073},{"emptyLinePlaceholder":194},[3074],{"type":60,"value":197},{"type":54,"tag":82,"props":3076,"children":3077},{"class":84,"line":148},[3078,3082,3086,3090,3094,3098,3102,3106,3110,3114,3118,3122,3126,3130,3134,3138,3142,3146,3150,3154,3158],{"type":54,"tag":82,"props":3079,"children":3080},{"style":204},[3081],{"type":60,"value":207},{"type":54,"tag":82,"props":3083,"children":3084},{"style":111},[3085],{"type":60,"value":920},{"type":54,"tag":82,"props":3087,"children":3088},{"style":105},[3089],{"type":60,"value":217},{"type":54,"tag":82,"props":3091,"children":3092},{"style":229},[3093],{"type":60,"value":823},{"type":54,"tag":82,"props":3095,"children":3096},{"style":105},[3097],{"type":60,"value":933},{"type":54,"tag":82,"props":3099,"children":3100},{"style":770},[3101],{"type":60,"value":938},{"type":54,"tag":82,"props":3103,"children":3104},{"style":105},[3105],{"type":60,"value":943},{"type":54,"tag":82,"props":3107,"children":3108},{"style":111},[3109],{"type":60,"value":285},{"type":54,"tag":82,"props":3111,"children":3112},{"style":105},[3113],{"type":60,"value":388},{"type":54,"tag":82,"props":3115,"children":3116},{"style":297},[3117],{"type":60,"value":2966},{"type":54,"tag":82,"props":3119,"children":3120},{"style":105},[3121],{"type":60,"value":305},{"type":54,"tag":82,"props":3123,"children":3124},{"style":111},[3125],{"type":60,"value":2215},{"type":54,"tag":82,"props":3127,"children":3128},{"style":229},[3129],{"type":60,"value":2220},{"type":54,"tag":82,"props":3131,"children":3132},{"style":111},[3133],{"type":60,"value":285},{"type":54,"tag":82,"props":3135,"children":3136},{"style":105},[3137],{"type":60,"value":388},{"type":54,"tag":82,"props":3139,"children":3140},{"style":111},[3141],{"type":60,"value":2991},{"type":54,"tag":82,"props":3143,"children":3144},{"style":105},[3145],{"type":60,"value":420},{"type":54,"tag":82,"props":3147,"children":3148},{"style":111},[3149],{"type":60,"value":3000},{"type":54,"tag":82,"props":3151,"children":3152},{"style":105},[3153],{"type":60,"value":420},{"type":54,"tag":82,"props":3155,"children":3156},{"style":111},[3157],{"type":60,"value":725},{"type":54,"tag":82,"props":3159,"children":3160},{"style":105},[3161],{"type":60,"value":145},{"type":54,"tag":1726,"props":3163,"children":3164},{},[3165,3167,3173],{"type":60,"value":3166},"Without the type parameter, all procedure calls return ",{"type":54,"tag":78,"props":3168,"children":3170},{"className":3169},[],[3171],{"type":60,"value":3172},"any",{"type":60,"value":3174}," and type safety is completely lost.",{"type":54,"tag":1726,"props":3176,"children":3177},{},[3178],{"type":60,"value":3179},"Source: www\u002Fdocs\u002Fclient\u002Fvanilla\u002Fsetup.mdx",{"type":54,"tag":1253,"props":3181,"children":3183},{"id":3182},"critical-transformer-goes-on-individual-links-not-createtrpcclient",[3184,3188],{"type":54,"tag":82,"props":3185,"children":3186},{},[3187],{"type":60,"value":2920},{"type":60,"value":3189}," Transformer goes on individual links, not createTRPCClient",{"type":54,"tag":1726,"props":3191,"children":3192},{},[3193,3195,3201],{"type":60,"value":3194},"In v11, the ",{"type":54,"tag":78,"props":3196,"children":3198},{"className":3197},[],[3199],{"type":60,"value":3200},"transformer",{"type":60,"value":3202}," option is on individual terminating links, not the client constructor:",{"type":54,"tag":70,"props":3204,"children":3206},{"className":72,"code":3205,"language":74,"meta":75,"style":75},"import superjson from 'superjson';\n\ncreateTRPCClient\u003CAppRouter>({\n  links: [\n    httpBatchLink({\n      url: 'http:\u002F\u002Flocalhost:3000',\n      transformer: superjson,\n    }),\n  ],\n});\n",[3207],{"type":54,"tag":78,"props":3208,"children":3209},{"__ignoreMap":75},[3210,3244,3251,3279,3294,3309,3337,3358,3373,3384],{"type":54,"tag":82,"props":3211,"children":3212},{"class":84,"line":85},[3213,3217,3222,3227,3231,3236,3240],{"type":54,"tag":82,"props":3214,"children":3215},{"style":99},[3216],{"type":60,"value":102},{"type":54,"tag":82,"props":3218,"children":3219},{"style":111},[3220],{"type":60,"value":3221}," superjson ",{"type":54,"tag":82,"props":3223,"children":3224},{"style":99},[3225],{"type":60,"value":3226},"from",{"type":54,"tag":82,"props":3228,"children":3229},{"style":105},[3230],{"type":60,"value":129},{"type":54,"tag":82,"props":3232,"children":3233},{"style":132},[3234],{"type":60,"value":3235},"superjson",{"type":54,"tag":82,"props":3237,"children":3238},{"style":105},[3239],{"type":60,"value":140},{"type":54,"tag":82,"props":3241,"children":3242},{"style":105},[3243],{"type":60,"value":145},{"type":54,"tag":82,"props":3245,"children":3246},{"class":84,"line":95},[3247],{"type":54,"tag":82,"props":3248,"children":3249},{"emptyLinePlaceholder":194},[3250],{"type":60,"value":197},{"type":54,"tag":82,"props":3252,"children":3253},{"class":84,"line":148},[3254,3259,3263,3267,3271,3275],{"type":54,"tag":82,"props":3255,"children":3256},{"style":229},[3257],{"type":60,"value":3258},"createTRPCClient",{"type":54,"tag":82,"props":3260,"children":3261},{"style":105},[3262],{"type":60,"value":933},{"type":54,"tag":82,"props":3264,"children":3265},{"style":770},[3266],{"type":60,"value":938},{"type":54,"tag":82,"props":3268,"children":3269},{"style":105},[3270],{"type":60,"value":943},{"type":54,"tag":82,"props":3272,"children":3273},{"style":111},[3274],{"type":60,"value":285},{"type":54,"tag":82,"props":3276,"children":3277},{"style":105},[3278],{"type":60,"value":290},{"type":54,"tag":82,"props":3280,"children":3281},{"class":84,"line":190},[3282,3286,3290],{"type":54,"tag":82,"props":3283,"children":3284},{"style":297},[3285],{"type":60,"value":959},{"type":54,"tag":82,"props":3287,"children":3288},{"style":105},[3289],{"type":60,"value":305},{"type":54,"tag":82,"props":3291,"children":3292},{"style":111},[3293],{"type":60,"value":968},{"type":54,"tag":82,"props":3295,"children":3296},{"class":84,"line":200},[3297,3301,3305],{"type":54,"tag":82,"props":3298,"children":3299},{"style":229},[3300],{"type":60,"value":976},{"type":54,"tag":82,"props":3302,"children":3303},{"style":111},[3304],{"type":60,"value":285},{"type":54,"tag":82,"props":3306,"children":3307},{"style":105},[3308],{"type":60,"value":290},{"type":54,"tag":82,"props":3310,"children":3311},{"class":84,"line":244},[3312,3316,3320,3324,3329,3333],{"type":54,"tag":82,"props":3313,"children":3314},{"style":297},[3315],{"type":60,"value":992},{"type":54,"tag":82,"props":3317,"children":3318},{"style":105},[3319],{"type":60,"value":305},{"type":54,"tag":82,"props":3321,"children":3322},{"style":105},[3323],{"type":60,"value":129},{"type":54,"tag":82,"props":3325,"children":3326},{"style":132},[3327],{"type":60,"value":3328},"http:\u002F\u002Flocalhost:3000",{"type":54,"tag":82,"props":3330,"children":3331},{"style":105},[3332],{"type":60,"value":140},{"type":54,"tag":82,"props":3334,"children":3335},{"style":105},[3336],{"type":60,"value":534},{"type":54,"tag":82,"props":3338,"children":3339},{"class":84,"line":252},[3340,3345,3349,3354],{"type":54,"tag":82,"props":3341,"children":3342},{"style":297},[3343],{"type":60,"value":3344},"      transformer",{"type":54,"tag":82,"props":3346,"children":3347},{"style":105},[3348],{"type":60,"value":305},{"type":54,"tag":82,"props":3350,"children":3351},{"style":111},[3352],{"type":60,"value":3353}," superjson",{"type":54,"tag":82,"props":3355,"children":3356},{"style":105},[3357],{"type":60,"value":534},{"type":54,"tag":82,"props":3359,"children":3360},{"class":84,"line":293},[3361,3365,3369],{"type":54,"tag":82,"props":3362,"children":3363},{"style":105},[3364],{"type":60,"value":1021},{"type":54,"tag":82,"props":3366,"children":3367},{"style":111},[3368],{"type":60,"value":725},{"type":54,"tag":82,"props":3370,"children":3371},{"style":105},[3372],{"type":60,"value":534},{"type":54,"tag":82,"props":3374,"children":3375},{"class":84,"line":328},[3376,3380],{"type":54,"tag":82,"props":3377,"children":3378},{"style":111},[3379],{"type":60,"value":1037},{"type":54,"tag":82,"props":3381,"children":3382},{"style":105},[3383],{"type":60,"value":534},{"type":54,"tag":82,"props":3385,"children":3386},{"class":84,"line":354},[3387,3391,3395],{"type":54,"tag":82,"props":3388,"children":3389},{"style":105},[3390],{"type":60,"value":420},{"type":54,"tag":82,"props":3392,"children":3393},{"style":111},[3394],{"type":60,"value":725},{"type":54,"tag":82,"props":3396,"children":3397},{"style":105},[3398],{"type":60,"value":145},{"type":54,"tag":1726,"props":3400,"children":3401},{},[3402,3403,3408,3410,3415],{"type":60,"value":3194},{"type":54,"tag":78,"props":3404,"children":3406},{"className":3405},[],[3407],{"type":60,"value":3200},{"type":60,"value":3409}," option was moved from the client constructor to individual terminating links. Passing it to ",{"type":54,"tag":78,"props":3411,"children":3413},{"className":3412},[],[3414],{"type":60,"value":3258},{"type":60,"value":3416}," throws a TypeError.",{"type":54,"tag":1726,"props":3418,"children":3419},{},[3420],{"type":60,"value":3421},"Source: packages\u002Fclient\u002Fsrc\u002Finternals\u002FTRPCUntypedClient.ts",{"type":54,"tag":1253,"props":3423,"children":3425},{"id":3424},"critical-transformer-on-server-but-not-on-client-links",[3426,3430],{"type":54,"tag":82,"props":3427,"children":3428},{},[3429],{"type":60,"value":2920},{"type":60,"value":3431}," Transformer on server but not on client links",{"type":54,"tag":1726,"props":3433,"children":3434},{},[3435],{"type":60,"value":2927},{"type":54,"tag":70,"props":3437,"children":3439},{"className":72,"code":3438,"language":74,"meta":75,"style":75},"\u002F\u002F Server: initTRPC.create({ transformer: superjson })\n\u002F\u002F Client:\nhttpBatchLink({ url: 'http:\u002F\u002Flocalhost:3000' });\n",[3440],{"type":54,"tag":78,"props":3441,"children":3442},{"__ignoreMap":75},[3443,3451,3459],{"type":54,"tag":82,"props":3444,"children":3445},{"class":84,"line":85},[3446],{"type":54,"tag":82,"props":3447,"children":3448},{"style":89},[3449],{"type":60,"value":3450},"\u002F\u002F Server: initTRPC.create({ transformer: superjson })\n",{"type":54,"tag":82,"props":3452,"children":3453},{"class":84,"line":95},[3454],{"type":54,"tag":82,"props":3455,"children":3456},{"style":89},[3457],{"type":60,"value":3458},"\u002F\u002F Client:\n",{"type":54,"tag":82,"props":3460,"children":3461},{"class":84,"line":148},[3462,3466,3470,3474,3478,3482,3486,3490,3494,3498,3502],{"type":54,"tag":82,"props":3463,"children":3464},{"style":229},[3465],{"type":60,"value":2220},{"type":54,"tag":82,"props":3467,"children":3468},{"style":111},[3469],{"type":60,"value":285},{"type":54,"tag":82,"props":3471,"children":3472},{"style":105},[3473],{"type":60,"value":388},{"type":54,"tag":82,"props":3475,"children":3476},{"style":297},[3477],{"type":60,"value":2233},{"type":54,"tag":82,"props":3479,"children":3480},{"style":105},[3481],{"type":60,"value":305},{"type":54,"tag":82,"props":3483,"children":3484},{"style":105},[3485],{"type":60,"value":129},{"type":54,"tag":82,"props":3487,"children":3488},{"style":132},[3489],{"type":60,"value":3328},{"type":54,"tag":82,"props":3491,"children":3492},{"style":105},[3493],{"type":60,"value":140},{"type":54,"tag":82,"props":3495,"children":3496},{"style":105},[3497],{"type":60,"value":119},{"type":54,"tag":82,"props":3499,"children":3500},{"style":111},[3501],{"type":60,"value":725},{"type":54,"tag":82,"props":3503,"children":3504},{"style":105},[3505],{"type":60,"value":145},{"type":54,"tag":1726,"props":3507,"children":3508},{},[3509],{"type":60,"value":3017},{"type":54,"tag":70,"props":3511,"children":3513},{"className":72,"code":3512,"language":74,"meta":75,"style":75},"\u002F\u002F Server: initTRPC.create({ transformer: superjson })\n\u002F\u002F Client:\nhttpBatchLink({ url: 'http:\u002F\u002Flocalhost:3000', transformer: superjson });\n",[3514],{"type":54,"tag":78,"props":3515,"children":3516},{"__ignoreMap":75},[3517,3524,3531],{"type":54,"tag":82,"props":3518,"children":3519},{"class":84,"line":85},[3520],{"type":54,"tag":82,"props":3521,"children":3522},{"style":89},[3523],{"type":60,"value":3450},{"type":54,"tag":82,"props":3525,"children":3526},{"class":84,"line":95},[3527],{"type":54,"tag":82,"props":3528,"children":3529},{"style":89},[3530],{"type":60,"value":3458},{"type":54,"tag":82,"props":3532,"children":3533},{"class":84,"line":148},[3534,3538,3542,3546,3550,3554,3558,3562,3566,3570,3575,3579,3583,3587,3591],{"type":54,"tag":82,"props":3535,"children":3536},{"style":229},[3537],{"type":60,"value":2220},{"type":54,"tag":82,"props":3539,"children":3540},{"style":111},[3541],{"type":60,"value":285},{"type":54,"tag":82,"props":3543,"children":3544},{"style":105},[3545],{"type":60,"value":388},{"type":54,"tag":82,"props":3547,"children":3548},{"style":297},[3549],{"type":60,"value":2233},{"type":54,"tag":82,"props":3551,"children":3552},{"style":105},[3553],{"type":60,"value":305},{"type":54,"tag":82,"props":3555,"children":3556},{"style":105},[3557],{"type":60,"value":129},{"type":54,"tag":82,"props":3559,"children":3560},{"style":132},[3561],{"type":60,"value":3328},{"type":54,"tag":82,"props":3563,"children":3564},{"style":105},[3565],{"type":60,"value":140},{"type":54,"tag":82,"props":3567,"children":3568},{"style":105},[3569],{"type":60,"value":498},{"type":54,"tag":82,"props":3571,"children":3572},{"style":297},[3573],{"type":60,"value":3574}," transformer",{"type":54,"tag":82,"props":3576,"children":3577},{"style":105},[3578],{"type":60,"value":305},{"type":54,"tag":82,"props":3580,"children":3581},{"style":111},[3582],{"type":60,"value":3221},{"type":54,"tag":82,"props":3584,"children":3585},{"style":105},[3586],{"type":60,"value":420},{"type":54,"tag":82,"props":3588,"children":3589},{"style":111},[3590],{"type":60,"value":725},{"type":54,"tag":82,"props":3592,"children":3593},{"style":105},[3594],{"type":60,"value":145},{"type":54,"tag":1726,"props":3596,"children":3597},{},[3598],{"type":60,"value":3599},"If the server uses a transformer, every terminating link on the client must also specify that transformer. Mismatch causes \"Unable to transform response\" errors.",{"type":54,"tag":1726,"props":3601,"children":3602},{},[3603,3605],{"type":60,"value":3604},"Source: ",{"type":54,"tag":3606,"props":3607,"children":3611},"a",{"href":3608,"rel":3609},"https:\u002F\u002Fgithub.com\u002Ftrpc\u002Ftrpc\u002Fissues\u002F7083",[3610],"nofollow",[3612],{"type":60,"value":3608},{"type":54,"tag":1253,"props":3614,"children":3616},{"id":3615},"critical-using-import-instead-of-import-type-for-approuter",[3617,3621],{"type":54,"tag":82,"props":3618,"children":3619},{},[3620],{"type":60,"value":2920},{"type":60,"value":3622}," Using import instead of import type for AppRouter",{"type":54,"tag":1726,"props":3624,"children":3625},{},[3626],{"type":60,"value":2927},{"type":54,"tag":70,"props":3628,"children":3630},{"className":72,"code":3629,"language":74,"meta":75,"style":75},"import { AppRouter } from '..\u002Fserver\u002Frouter';\n",[3631],{"type":54,"tag":78,"props":3632,"children":3633},{"__ignoreMap":75},[3634],{"type":54,"tag":82,"props":3635,"children":3636},{"class":84,"line":85},[3637,3641,3645,3649,3653,3657,3661,3666,3670],{"type":54,"tag":82,"props":3638,"children":3639},{"style":99},[3640],{"type":60,"value":102},{"type":54,"tag":82,"props":3642,"children":3643},{"style":105},[3644],{"type":60,"value":108},{"type":54,"tag":82,"props":3646,"children":3647},{"style":111},[3648],{"type":60,"value":773},{"type":54,"tag":82,"props":3650,"children":3651},{"style":105},[3652],{"type":60,"value":119},{"type":54,"tag":82,"props":3654,"children":3655},{"style":99},[3656],{"type":60,"value":124},{"type":54,"tag":82,"props":3658,"children":3659},{"style":105},[3660],{"type":60,"value":129},{"type":54,"tag":82,"props":3662,"children":3663},{"style":132},[3664],{"type":60,"value":3665},"..\u002Fserver\u002Frouter",{"type":54,"tag":82,"props":3667,"children":3668},{"style":105},[3669],{"type":60,"value":140},{"type":54,"tag":82,"props":3671,"children":3672},{"style":105},[3673],{"type":60,"value":145},{"type":54,"tag":1726,"props":3675,"children":3676},{},[3677],{"type":60,"value":3017},{"type":54,"tag":70,"props":3679,"children":3681},{"className":72,"code":3680,"language":74,"meta":75,"style":75},"import type { AppRouter } from '..\u002Fserver\u002Frouter';\n",[3682],{"type":54,"tag":78,"props":3683,"children":3684},{"__ignoreMap":75},[3685],{"type":54,"tag":82,"props":3686,"children":3687},{"class":84,"line":85},[3688,3692,3696,3700,3704,3708,3712,3716,3720,3724],{"type":54,"tag":82,"props":3689,"children":3690},{"style":99},[3691],{"type":60,"value":102},{"type":54,"tag":82,"props":3693,"children":3694},{"style":99},[3695],{"type":60,"value":767},{"type":54,"tag":82,"props":3697,"children":3698},{"style":105},[3699],{"type":60,"value":108},{"type":54,"tag":82,"props":3701,"children":3702},{"style":111},[3703],{"type":60,"value":773},{"type":54,"tag":82,"props":3705,"children":3706},{"style":105},[3707],{"type":60,"value":119},{"type":54,"tag":82,"props":3709,"children":3710},{"style":99},[3711],{"type":60,"value":124},{"type":54,"tag":82,"props":3713,"children":3714},{"style":105},[3715],{"type":60,"value":129},{"type":54,"tag":82,"props":3717,"children":3718},{"style":132},[3719],{"type":60,"value":3665},{"type":54,"tag":82,"props":3721,"children":3722},{"style":105},[3723],{"type":60,"value":140},{"type":54,"tag":82,"props":3725,"children":3726},{"style":105},[3727],{"type":60,"value":145},{"type":54,"tag":1726,"props":3729,"children":3730},{},[3731,3733,3739],{"type":60,"value":3732},"A non-type import pulls the entire server bundle into the client. Use ",{"type":54,"tag":78,"props":3734,"children":3736},{"className":3735},[],[3737],{"type":60,"value":3738},"import type",{"type":60,"value":3740}," so it is erased at build time.",{"type":54,"tag":1726,"props":3742,"children":3743},{},[3744],{"type":60,"value":3179},{"type":54,"tag":1253,"props":3746,"children":3748},{"id":3747},"critical-importing-approuter-value-to-derive-type-in-client",[3749,3753],{"type":54,"tag":82,"props":3750,"children":3751},{},[3752],{"type":60,"value":2920},{"type":60,"value":3754}," Importing appRouter value to derive type in client",{"type":54,"tag":1726,"props":3756,"children":3757},{},[3758],{"type":60,"value":2927},{"type":54,"tag":70,"props":3760,"children":3762},{"className":72,"code":3761,"language":74,"meta":75,"style":75},"import { appRouter } from '..\u002Fserver\u002Frouter';\n\ntype AppRouter = typeof appRouter;\n",[3763],{"type":54,"tag":78,"props":3764,"children":3765},{"__ignoreMap":75},[3766,3805,3812],{"type":54,"tag":82,"props":3767,"children":3768},{"class":84,"line":85},[3769,3773,3777,3781,3785,3789,3793,3797,3801],{"type":54,"tag":82,"props":3770,"children":3771},{"style":99},[3772],{"type":60,"value":102},{"type":54,"tag":82,"props":3774,"children":3775},{"style":105},[3776],{"type":60,"value":108},{"type":54,"tag":82,"props":3778,"children":3779},{"style":111},[3780],{"type":60,"value":788},{"type":54,"tag":82,"props":3782,"children":3783},{"style":105},[3784],{"type":60,"value":119},{"type":54,"tag":82,"props":3786,"children":3787},{"style":99},[3788],{"type":60,"value":124},{"type":54,"tag":82,"props":3790,"children":3791},{"style":105},[3792],{"type":60,"value":129},{"type":54,"tag":82,"props":3794,"children":3795},{"style":132},[3796],{"type":60,"value":3665},{"type":54,"tag":82,"props":3798,"children":3799},{"style":105},[3800],{"type":60,"value":140},{"type":54,"tag":82,"props":3802,"children":3803},{"style":105},[3804],{"type":60,"value":145},{"type":54,"tag":82,"props":3806,"children":3807},{"class":84,"line":95},[3808],{"type":54,"tag":82,"props":3809,"children":3810},{"emptyLinePlaceholder":194},[3811],{"type":60,"value":197},{"type":54,"tag":82,"props":3813,"children":3814},{"class":84,"line":148},[3815,3819,3823,3827,3831,3835],{"type":54,"tag":82,"props":3816,"children":3817},{"style":204},[3818],{"type":60,"value":1862},{"type":54,"tag":82,"props":3820,"children":3821},{"style":770},[3822],{"type":60,"value":773},{"type":54,"tag":82,"props":3824,"children":3825},{"style":105},[3826],{"type":60,"value":778},{"type":54,"tag":82,"props":3828,"children":3829},{"style":105},[3830],{"type":60,"value":783},{"type":54,"tag":82,"props":3832,"children":3833},{"style":111},[3834],{"type":60,"value":788},{"type":54,"tag":82,"props":3836,"children":3837},{"style":105},[3838],{"type":60,"value":145},{"type":54,"tag":1726,"props":3840,"children":3841},{},[3842],{"type":60,"value":3017},{"type":54,"tag":70,"props":3844,"children":3846},{"className":72,"code":3845,"language":74,"meta":75,"style":75},"\u002F\u002F In server: export type AppRouter = typeof appRouter;\n\u002F\u002F In client:\nimport type { AppRouter } from '..\u002Fserver\u002Frouter';\n",[3847],{"type":54,"tag":78,"props":3848,"children":3849},{"__ignoreMap":75},[3850,3858,3866],{"type":54,"tag":82,"props":3851,"children":3852},{"class":84,"line":85},[3853],{"type":54,"tag":82,"props":3854,"children":3855},{"style":89},[3856],{"type":60,"value":3857},"\u002F\u002F In server: export type AppRouter = typeof appRouter;\n",{"type":54,"tag":82,"props":3859,"children":3860},{"class":84,"line":95},[3861],{"type":54,"tag":82,"props":3862,"children":3863},{"style":89},[3864],{"type":60,"value":3865},"\u002F\u002F In client:\n",{"type":54,"tag":82,"props":3867,"children":3868},{"class":84,"line":148},[3869,3873,3877,3881,3885,3889,3893,3897,3901,3905],{"type":54,"tag":82,"props":3870,"children":3871},{"style":99},[3872],{"type":60,"value":102},{"type":54,"tag":82,"props":3874,"children":3875},{"style":99},[3876],{"type":60,"value":767},{"type":54,"tag":82,"props":3878,"children":3879},{"style":105},[3880],{"type":60,"value":108},{"type":54,"tag":82,"props":3882,"children":3883},{"style":111},[3884],{"type":60,"value":773},{"type":54,"tag":82,"props":3886,"children":3887},{"style":105},[3888],{"type":60,"value":119},{"type":54,"tag":82,"props":3890,"children":3891},{"style":99},[3892],{"type":60,"value":124},{"type":54,"tag":82,"props":3894,"children":3895},{"style":105},[3896],{"type":60,"value":129},{"type":54,"tag":82,"props":3898,"children":3899},{"style":132},[3900],{"type":60,"value":3665},{"type":54,"tag":82,"props":3902,"children":3903},{"style":105},[3904],{"type":60,"value":140},{"type":54,"tag":82,"props":3906,"children":3907},{"style":105},[3908],{"type":60,"value":145},{"type":54,"tag":1726,"props":3910,"children":3911},{},[3912,3914,3920],{"type":60,"value":3913},"Importing the ",{"type":54,"tag":78,"props":3915,"children":3917},{"className":3916},[],[3918],{"type":60,"value":3919},"appRouter",{"type":60,"value":3921}," value (not just the type) bundles the entire server into the client, shipping server code to the browser.",{"type":54,"tag":1726,"props":3923,"children":3924},{},[3925],{"type":60,"value":3926},"Source: www\u002Fdocs\u002Fserver\u002Frouters.md",{"type":54,"tag":1253,"props":3928,"children":3930},{"id":3929},"critical-using-type-assertions-to-bypass-approuter-import-errors",[3931,3935],{"type":54,"tag":82,"props":3932,"children":3933},{},[3934],{"type":60,"value":2920},{"type":60,"value":3936}," Using type assertions to bypass AppRouter import errors",{"type":54,"tag":1726,"props":3938,"children":3939},{},[3940],{"type":60,"value":2927},{"type":54,"tag":70,"props":3942,"children":3944},{"className":72,"code":3943,"language":74,"meta":75,"style":75},"const client = createTRPCClient\u003Cany>({ links: [httpBatchLink({ url })] });\n",[3945],{"type":54,"tag":78,"props":3946,"children":3947},{"__ignoreMap":75},[3948],{"type":54,"tag":82,"props":3949,"children":3950},{"class":84,"line":85},[3951,3955,3959,3963,3967,3971,3975,3979,3983,3987,3991,3995,3999,4003,4007,4011,4015,4019,4023,4027,4031],{"type":54,"tag":82,"props":3952,"children":3953},{"style":204},[3954],{"type":60,"value":207},{"type":54,"tag":82,"props":3956,"children":3957},{"style":111},[3958],{"type":60,"value":920},{"type":54,"tag":82,"props":3960,"children":3961},{"style":105},[3962],{"type":60,"value":217},{"type":54,"tag":82,"props":3964,"children":3965},{"style":229},[3966],{"type":60,"value":823},{"type":54,"tag":82,"props":3968,"children":3969},{"style":105},[3970],{"type":60,"value":933},{"type":54,"tag":82,"props":3972,"children":3973},{"style":770},[3974],{"type":60,"value":3172},{"type":54,"tag":82,"props":3976,"children":3977},{"style":105},[3978],{"type":60,"value":943},{"type":54,"tag":82,"props":3980,"children":3981},{"style":111},[3982],{"type":60,"value":285},{"type":54,"tag":82,"props":3984,"children":3985},{"style":105},[3986],{"type":60,"value":388},{"type":54,"tag":82,"props":3988,"children":3989},{"style":297},[3990],{"type":60,"value":2966},{"type":54,"tag":82,"props":3992,"children":3993},{"style":105},[3994],{"type":60,"value":305},{"type":54,"tag":82,"props":3996,"children":3997},{"style":111},[3998],{"type":60,"value":2215},{"type":54,"tag":82,"props":4000,"children":4001},{"style":229},[4002],{"type":60,"value":2220},{"type":54,"tag":82,"props":4004,"children":4005},{"style":111},[4006],{"type":60,"value":285},{"type":54,"tag":82,"props":4008,"children":4009},{"style":105},[4010],{"type":60,"value":388},{"type":54,"tag":82,"props":4012,"children":4013},{"style":111},[4014],{"type":60,"value":2991},{"type":54,"tag":82,"props":4016,"children":4017},{"style":105},[4018],{"type":60,"value":420},{"type":54,"tag":82,"props":4020,"children":4021},{"style":111},[4022],{"type":60,"value":3000},{"type":54,"tag":82,"props":4024,"children":4025},{"style":105},[4026],{"type":60,"value":420},{"type":54,"tag":82,"props":4028,"children":4029},{"style":111},[4030],{"type":60,"value":725},{"type":54,"tag":82,"props":4032,"children":4033},{"style":105},[4034],{"type":60,"value":145},{"type":54,"tag":1726,"props":4036,"children":4037},{},[4038],{"type":60,"value":3017},{"type":54,"tag":70,"props":4040,"children":4042},{"className":72,"code":4041,"language":74,"meta":75,"style":75},"\u002F\u002F Fix the import path or monorepo configuration\nimport type { AppRouter } from '@myorg\u002Fapi-types';\n\nconst client = createTRPCClient\u003CAppRouter>({ links: [httpBatchLink({ url })] });\n",[4043],{"type":54,"tag":78,"props":4044,"children":4045},{"__ignoreMap":75},[4046,4054,4098,4105],{"type":54,"tag":82,"props":4047,"children":4048},{"class":84,"line":85},[4049],{"type":54,"tag":82,"props":4050,"children":4051},{"style":89},[4052],{"type":60,"value":4053},"\u002F\u002F Fix the import path or monorepo configuration\n",{"type":54,"tag":82,"props":4055,"children":4056},{"class":84,"line":95},[4057,4061,4065,4069,4073,4077,4081,4085,4090,4094],{"type":54,"tag":82,"props":4058,"children":4059},{"style":99},[4060],{"type":60,"value":102},{"type":54,"tag":82,"props":4062,"children":4063},{"style":99},[4064],{"type":60,"value":767},{"type":54,"tag":82,"props":4066,"children":4067},{"style":105},[4068],{"type":60,"value":108},{"type":54,"tag":82,"props":4070,"children":4071},{"style":111},[4072],{"type":60,"value":773},{"type":54,"tag":82,"props":4074,"children":4075},{"style":105},[4076],{"type":60,"value":119},{"type":54,"tag":82,"props":4078,"children":4079},{"style":99},[4080],{"type":60,"value":124},{"type":54,"tag":82,"props":4082,"children":4083},{"style":105},[4084],{"type":60,"value":129},{"type":54,"tag":82,"props":4086,"children":4087},{"style":132},[4088],{"type":60,"value":4089},"@myorg\u002Fapi-types",{"type":54,"tag":82,"props":4091,"children":4092},{"style":105},[4093],{"type":60,"value":140},{"type":54,"tag":82,"props":4095,"children":4096},{"style":105},[4097],{"type":60,"value":145},{"type":54,"tag":82,"props":4099,"children":4100},{"class":84,"line":148},[4101],{"type":54,"tag":82,"props":4102,"children":4103},{"emptyLinePlaceholder":194},[4104],{"type":60,"value":197},{"type":54,"tag":82,"props":4106,"children":4107},{"class":84,"line":190},[4108,4112,4116,4120,4124,4128,4132,4136,4140,4144,4148,4152,4156,4160,4164,4168,4172,4176,4180,4184,4188],{"type":54,"tag":82,"props":4109,"children":4110},{"style":204},[4111],{"type":60,"value":207},{"type":54,"tag":82,"props":4113,"children":4114},{"style":111},[4115],{"type":60,"value":920},{"type":54,"tag":82,"props":4117,"children":4118},{"style":105},[4119],{"type":60,"value":217},{"type":54,"tag":82,"props":4121,"children":4122},{"style":229},[4123],{"type":60,"value":823},{"type":54,"tag":82,"props":4125,"children":4126},{"style":105},[4127],{"type":60,"value":933},{"type":54,"tag":82,"props":4129,"children":4130},{"style":770},[4131],{"type":60,"value":938},{"type":54,"tag":82,"props":4133,"children":4134},{"style":105},[4135],{"type":60,"value":943},{"type":54,"tag":82,"props":4137,"children":4138},{"style":111},[4139],{"type":60,"value":285},{"type":54,"tag":82,"props":4141,"children":4142},{"style":105},[4143],{"type":60,"value":388},{"type":54,"tag":82,"props":4145,"children":4146},{"style":297},[4147],{"type":60,"value":2966},{"type":54,"tag":82,"props":4149,"children":4150},{"style":105},[4151],{"type":60,"value":305},{"type":54,"tag":82,"props":4153,"children":4154},{"style":111},[4155],{"type":60,"value":2215},{"type":54,"tag":82,"props":4157,"children":4158},{"style":229},[4159],{"type":60,"value":2220},{"type":54,"tag":82,"props":4161,"children":4162},{"style":111},[4163],{"type":60,"value":285},{"type":54,"tag":82,"props":4165,"children":4166},{"style":105},[4167],{"type":60,"value":388},{"type":54,"tag":82,"props":4169,"children":4170},{"style":111},[4171],{"type":60,"value":2991},{"type":54,"tag":82,"props":4173,"children":4174},{"style":105},[4175],{"type":60,"value":420},{"type":54,"tag":82,"props":4177,"children":4178},{"style":111},[4179],{"type":60,"value":3000},{"type":54,"tag":82,"props":4181,"children":4182},{"style":105},[4183],{"type":60,"value":420},{"type":54,"tag":82,"props":4185,"children":4186},{"style":111},[4187],{"type":60,"value":725},{"type":54,"tag":82,"props":4189,"children":4190},{"style":105},[4191],{"type":60,"value":145},{"type":54,"tag":1726,"props":4193,"children":4194},{},[4195,4197,4202],{"type":60,"value":4196},"Casting to ",{"type":54,"tag":78,"props":4198,"children":4200},{"className":4199},[],[4201],{"type":60,"value":3172},{"type":60,"value":4203}," or manually recreating the router type destroys end-to-end type safety. Fix the import path or monorepo config instead.",{"type":54,"tag":1726,"props":4205,"children":4206},{},[4207],{"type":60,"value":3179},{"type":54,"tag":1253,"props":4209,"children":4211},{"id":4210},"critical-using-createtrpcproxyclient-renamed-in-v11",[4212,4216],{"type":54,"tag":82,"props":4213,"children":4214},{},[4215],{"type":60,"value":2920},{"type":60,"value":4217}," Using createTRPCProxyClient (renamed in v11)",{"type":54,"tag":1726,"props":4219,"children":4220},{},[4221],{"type":60,"value":2927},{"type":54,"tag":70,"props":4223,"children":4225},{"className":72,"code":4224,"language":74,"meta":75,"style":75},"import { createTRPCProxyClient } from '@trpc\u002Fclient';\n",[4226],{"type":54,"tag":78,"props":4227,"children":4228},{"__ignoreMap":75},[4229],{"type":54,"tag":82,"props":4230,"children":4231},{"class":84,"line":85},[4232,4236,4240,4245,4249,4253,4257,4261,4265],{"type":54,"tag":82,"props":4233,"children":4234},{"style":99},[4235],{"type":60,"value":102},{"type":54,"tag":82,"props":4237,"children":4238},{"style":105},[4239],{"type":60,"value":108},{"type":54,"tag":82,"props":4241,"children":4242},{"style":111},[4243],{"type":60,"value":4244}," createTRPCProxyClient",{"type":54,"tag":82,"props":4246,"children":4247},{"style":105},[4248],{"type":60,"value":119},{"type":54,"tag":82,"props":4250,"children":4251},{"style":99},[4252],{"type":60,"value":124},{"type":54,"tag":82,"props":4254,"children":4255},{"style":105},[4256],{"type":60,"value":129},{"type":54,"tag":82,"props":4258,"children":4259},{"style":132},[4260],{"type":60,"value":849},{"type":54,"tag":82,"props":4262,"children":4263},{"style":105},[4264],{"type":60,"value":140},{"type":54,"tag":82,"props":4266,"children":4267},{"style":105},[4268],{"type":60,"value":145},{"type":54,"tag":1726,"props":4270,"children":4271},{},[4272],{"type":60,"value":3017},{"type":54,"tag":70,"props":4274,"children":4276},{"className":72,"code":4275,"language":74,"meta":75,"style":75},"import { createTRPCClient } from '@trpc\u002Fclient';\n",[4277],{"type":54,"tag":78,"props":4278,"children":4279},{"__ignoreMap":75},[4280],{"type":54,"tag":82,"props":4281,"children":4282},{"class":84,"line":85},[4283,4287,4291,4295,4299,4303,4307,4311,4315],{"type":54,"tag":82,"props":4284,"children":4285},{"style":99},[4286],{"type":60,"value":102},{"type":54,"tag":82,"props":4288,"children":4289},{"style":105},[4290],{"type":60,"value":108},{"type":54,"tag":82,"props":4292,"children":4293},{"style":111},[4294],{"type":60,"value":823},{"type":54,"tag":82,"props":4296,"children":4297},{"style":105},[4298],{"type":60,"value":119},{"type":54,"tag":82,"props":4300,"children":4301},{"style":99},[4302],{"type":60,"value":124},{"type":54,"tag":82,"props":4304,"children":4305},{"style":105},[4306],{"type":60,"value":129},{"type":54,"tag":82,"props":4308,"children":4309},{"style":132},[4310],{"type":60,"value":849},{"type":54,"tag":82,"props":4312,"children":4313},{"style":105},[4314],{"type":60,"value":140},{"type":54,"tag":82,"props":4316,"children":4317},{"style":105},[4318],{"type":60,"value":145},{"type":54,"tag":1726,"props":4320,"children":4321},{},[4322,4328,4330,4335],{"type":54,"tag":78,"props":4323,"children":4325},{"className":4324},[],[4326],{"type":60,"value":4327},"createTRPCProxyClient",{"type":60,"value":4329}," was renamed to ",{"type":54,"tag":78,"props":4331,"children":4333},{"className":4332},[],[4334],{"type":60,"value":3258},{"type":60,"value":4336}," in v11.",{"type":54,"tag":1726,"props":4338,"children":4339},{},[4340],{"type":60,"value":3179},{"type":54,"tag":1253,"props":4342,"children":4344},{"id":4343},"critical-treating-trpc-as-a-rest-api",[4345,4349],{"type":54,"tag":82,"props":4346,"children":4347},{},[4348],{"type":60,"value":2920},{"type":60,"value":4350}," Treating tRPC as a REST API",{"type":54,"tag":1726,"props":4352,"children":4353},{},[4354],{"type":60,"value":2927},{"type":54,"tag":70,"props":4356,"children":4358},{"className":72,"code":4357,"language":74,"meta":75,"style":75},"fetch('\u002Fapi\u002Ftrpc\u002Fusers\u002F123', { method: 'GET' });\n",[4359],{"type":54,"tag":78,"props":4360,"children":4361},{"__ignoreMap":75},[4362],{"type":54,"tag":82,"props":4363,"children":4364},{"class":84,"line":85},[4365,4370,4374,4378,4383,4387,4391,4395,4400,4404,4408,4413,4417,4421,4425],{"type":54,"tag":82,"props":4366,"children":4367},{"style":229},[4368],{"type":60,"value":4369},"fetch",{"type":54,"tag":82,"props":4371,"children":4372},{"style":111},[4373],{"type":60,"value":285},{"type":54,"tag":82,"props":4375,"children":4376},{"style":105},[4377],{"type":60,"value":140},{"type":54,"tag":82,"props":4379,"children":4380},{"style":132},[4381],{"type":60,"value":4382},"\u002Fapi\u002Ftrpc\u002Fusers\u002F123",{"type":54,"tag":82,"props":4384,"children":4385},{"style":105},[4386],{"type":60,"value":140},{"type":54,"tag":82,"props":4388,"children":4389},{"style":105},[4390],{"type":60,"value":498},{"type":54,"tag":82,"props":4392,"children":4393},{"style":105},[4394],{"type":60,"value":108},{"type":54,"tag":82,"props":4396,"children":4397},{"style":297},[4398],{"type":60,"value":4399}," method",{"type":54,"tag":82,"props":4401,"children":4402},{"style":105},[4403],{"type":60,"value":305},{"type":54,"tag":82,"props":4405,"children":4406},{"style":105},[4407],{"type":60,"value":129},{"type":54,"tag":82,"props":4409,"children":4410},{"style":132},[4411],{"type":60,"value":4412},"GET",{"type":54,"tag":82,"props":4414,"children":4415},{"style":105},[4416],{"type":60,"value":140},{"type":54,"tag":82,"props":4418,"children":4419},{"style":105},[4420],{"type":60,"value":119},{"type":54,"tag":82,"props":4422,"children":4423},{"style":111},[4424],{"type":60,"value":725},{"type":54,"tag":82,"props":4426,"children":4427},{"style":105},[4428],{"type":60,"value":145},{"type":54,"tag":1726,"props":4430,"children":4431},{},[4432],{"type":60,"value":3017},{"type":54,"tag":70,"props":4434,"children":4436},{"className":72,"code":4435,"language":74,"meta":75,"style":75},"const user = await client.user.byId.query({ id: '123' });\n\u002F\u002F Raw equivalent: GET \u002Fapi\u002Ftrpc\u002Fuser.byId?input={\"id\":\"123\"}\n",[4437],{"type":54,"tag":78,"props":4438,"children":4439},{"__ignoreMap":75},[4440,4528],{"type":54,"tag":82,"props":4441,"children":4442},{"class":84,"line":85},[4443,4447,4451,4455,4459,4463,4467,4471,4475,4479,4483,4487,4491,4495,4499,4503,4507,4512,4516,4520,4524],{"type":54,"tag":82,"props":4444,"children":4445},{"style":204},[4446],{"type":60,"value":207},{"type":54,"tag":82,"props":4448,"children":4449},{"style":111},[4450],{"type":60,"value":1075},{"type":54,"tag":82,"props":4452,"children":4453},{"style":105},[4454],{"type":60,"value":217},{"type":54,"tag":82,"props":4456,"children":4457},{"style":99},[4458],{"type":60,"value":1084},{"type":54,"tag":82,"props":4460,"children":4461},{"style":111},[4462],{"type":60,"value":1089},{"type":54,"tag":82,"props":4464,"children":4465},{"style":105},[4466],{"type":60,"value":226},{"type":54,"tag":82,"props":4468,"children":4469},{"style":111},[4470],{"type":60,"value":1098},{"type":54,"tag":82,"props":4472,"children":4473},{"style":105},[4474],{"type":60,"value":226},{"type":54,"tag":82,"props":4476,"children":4477},{"style":111},[4478],{"type":60,"value":1107},{"type":54,"tag":82,"props":4480,"children":4481},{"style":105},[4482],{"type":60,"value":226},{"type":54,"tag":82,"props":4484,"children":4485},{"style":229},[4486],{"type":60,"value":438},{"type":54,"tag":82,"props":4488,"children":4489},{"style":111},[4490],{"type":60,"value":285},{"type":54,"tag":82,"props":4492,"children":4493},{"style":105},[4494],{"type":60,"value":388},{"type":54,"tag":82,"props":4496,"children":4497},{"style":297},[4498],{"type":60,"value":393},{"type":54,"tag":82,"props":4500,"children":4501},{"style":105},[4502],{"type":60,"value":305},{"type":54,"tag":82,"props":4504,"children":4505},{"style":105},[4506],{"type":60,"value":129},{"type":54,"tag":82,"props":4508,"children":4509},{"style":132},[4510],{"type":60,"value":4511},"123",{"type":54,"tag":82,"props":4513,"children":4514},{"style":105},[4515],{"type":60,"value":140},{"type":54,"tag":82,"props":4517,"children":4518},{"style":105},[4519],{"type":60,"value":119},{"type":54,"tag":82,"props":4521,"children":4522},{"style":111},[4523],{"type":60,"value":725},{"type":54,"tag":82,"props":4525,"children":4526},{"style":105},[4527],{"type":60,"value":145},{"type":54,"tag":82,"props":4529,"children":4530},{"class":84,"line":95},[4531],{"type":54,"tag":82,"props":4532,"children":4533},{"style":89},[4534],{"type":60,"value":4535},"\u002F\u002F Raw equivalent: GET \u002Fapi\u002Ftrpc\u002Fuser.byId?input={\"id\":\"123\"}\n",{"type":54,"tag":1726,"props":4537,"children":4538},{},[4539],{"type":60,"value":4540},"tRPC uses JSON-RPC over HTTP. Procedures are called by dot-separated name with JSON input, not by REST resource paths.",{"type":54,"tag":1726,"props":4542,"children":4543},{},[4544],{"type":60,"value":4545},"Source: www\u002Fdocs\u002Fclient\u002Foverview.md",{"type":54,"tag":1253,"props":4547,"children":4549},{"id":4548},"high-html-error-page-instead-of-json-response",[4550,4555],{"type":54,"tag":82,"props":4551,"children":4552},{},[4553],{"type":60,"value":4554},"HIGH",{"type":60,"value":4556}," HTML error page instead of JSON response",{"type":54,"tag":1726,"props":4558,"children":4559},{},[4560,4562,4568,4570,4576],{"type":60,"value":4561},"If you see ",{"type":54,"tag":78,"props":4563,"children":4565},{"className":4564},[],[4566],{"type":60,"value":4567},"couldn't parse JSON, invalid character '\u003C'",{"type":60,"value":4569},", the tRPC endpoint returned an HTML page (404\u002F503) instead of JSON. This means the ",{"type":54,"tag":78,"props":4571,"children":4573},{"className":4572},[],[4574],{"type":60,"value":4575},"url",{"type":60,"value":4577}," in your link config is wrong or infrastructure routing is misconfigured -- it is not a tRPC bug. Verify the URL matches your adapter's mount point.",{"type":54,"tag":1726,"props":4579,"children":4580},{},[4581],{"type":60,"value":3179},{"type":54,"tag":63,"props":4583,"children":4585},{"id":4584},"see-also",[4586],{"type":60,"value":4587},"See Also",{"type":54,"tag":4589,"props":4590,"children":4591},"ul",{},[4592,4604,4614,4624],{"type":54,"tag":4593,"props":4594,"children":4595},"li",{},[4596,4602],{"type":54,"tag":78,"props":4597,"children":4599},{"className":4598},[],[4600],{"type":60,"value":4601},"links",{"type":60,"value":4603}," -- configure httpBatchLink, httpLink, splitLink, and other link types",{"type":54,"tag":4593,"props":4605,"children":4606},{},[4607,4612],{"type":54,"tag":78,"props":4608,"children":4610},{"className":4609},[],[4611],{"type":60,"value":3235},{"type":60,"value":4613}," -- set up SuperJSON transformer on server and client",{"type":54,"tag":4593,"props":4615,"children":4616},{},[4617,4622],{"type":54,"tag":78,"props":4618,"children":4620},{"className":4619},[],[4621],{"type":60,"value":42},{"type":60,"value":4623}," -- define routers, procedures, context, and export AppRouter type",{"type":54,"tag":4593,"props":4625,"children":4626},{},[4627,4633],{"type":54,"tag":78,"props":4628,"children":4630},{"className":4629},[],[4631],{"type":60,"value":4632},"react-query-setup",{"type":60,"value":4634}," -- use tRPC with TanStack React Query for React applications",{"type":54,"tag":4636,"props":4637,"children":4638},"style",{},[4639],{"type":60,"value":4640},"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":4642,"total":4745},[4643,4658,4671,4684,4704,4717,4731],{"slug":4644,"name":4644,"fn":4645,"description":4646,"org":4647,"tags":4648,"stars":20,"repoUrl":21,"updatedAt":4657},"adapter-aws-lambda","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},[4649,4650,4653,4656],{"name":15,"slug":16,"type":13},{"name":4651,"slug":4652,"type":13},"AWS","aws",{"name":4654,"slug":4655,"type":13},"Backend","backend",{"name":9,"slug":8,"type":13},"2026-07-18T05:47:05.451869",{"slug":4659,"name":4659,"fn":4660,"description":4661,"org":4662,"tags":4663,"stars":20,"repoUrl":21,"updatedAt":4670},"adapter-express","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},[4664,4665,4666,4669],{"name":15,"slug":16,"type":13},{"name":4654,"slug":4655,"type":13},{"name":4667,"slug":4668,"type":13},"Express","express",{"name":9,"slug":8,"type":13},"2026-07-18T05:46:53.274248",{"slug":4672,"name":4672,"fn":4673,"description":4674,"org":4675,"tags":4676,"stars":20,"repoUrl":21,"updatedAt":4683},"adapter-fastify","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},[4677,4678,4679,4682],{"name":15,"slug":16,"type":13},{"name":4654,"slug":4655,"type":13},{"name":4680,"slug":4681,"type":13},"Fastify","fastify",{"name":9,"slug":8,"type":13},"2026-07-18T05:46:53.746621",{"slug":4685,"name":4685,"fn":4686,"description":4687,"org":4688,"tags":4689,"stars":20,"repoUrl":21,"updatedAt":4703},"adapter-fetch","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},[4690,4693,4696,4699,4700],{"name":4691,"slug":4692,"type":13},"Cloudflare","cloudflare",{"name":4694,"slug":4695,"type":13},"Deployment","deployment",{"name":4697,"slug":4698,"type":13},"Edge","edge",{"name":9,"slug":8,"type":13},{"name":4701,"slug":4702,"type":13},"Vercel","vercel","2026-07-18T05:46:50.548228",{"slug":4705,"name":4705,"fn":4706,"description":4707,"org":4708,"tags":4709,"stars":20,"repoUrl":21,"updatedAt":4716},"adapter-standalone","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},[4710,4711,4712,4715],{"name":15,"slug":16,"type":13},{"name":4654,"slug":4655,"type":13},{"name":4713,"slug":4714,"type":13},"Node.js","node-js",{"name":9,"slug":8,"type":13},"2026-07-18T05:46:58.093869",{"slug":4718,"name":4718,"fn":4719,"description":4720,"org":4721,"tags":4722,"stars":20,"repoUrl":21,"updatedAt":4730},"auth","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},[4723,4725,4728,4729],{"name":4724,"slug":4718,"type":13},"Auth",{"name":4726,"slug":4727,"type":13},"Authentication","authentication",{"name":4654,"slug":4655,"type":13},{"name":9,"slug":8,"type":13},"2026-07-18T05:46:45.347628",{"slug":4732,"name":4732,"fn":4733,"description":4734,"org":4735,"tags":4736,"stars":20,"repoUrl":21,"updatedAt":4744},"caching","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},[4737,4738,4740,4743],{"name":4654,"slug":4655,"type":13},{"name":4739,"slug":4732,"type":13},"Caching",{"name":4741,"slug":4742,"type":13},"Performance","performance",{"name":9,"slug":8,"type":13},"2026-07-18T05:46:45.86443",24,{"items":4747,"total":4745},[4748,4755,4762,4769,4777,4784,4791,4798,4804,4818,4827,4839],{"slug":4644,"name":4644,"fn":4645,"description":4646,"org":4749,"tags":4750,"stars":20,"repoUrl":21,"updatedAt":4657},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4751,4752,4753,4754],{"name":15,"slug":16,"type":13},{"name":4651,"slug":4652,"type":13},{"name":4654,"slug":4655,"type":13},{"name":9,"slug":8,"type":13},{"slug":4659,"name":4659,"fn":4660,"description":4661,"org":4756,"tags":4757,"stars":20,"repoUrl":21,"updatedAt":4670},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4758,4759,4760,4761],{"name":15,"slug":16,"type":13},{"name":4654,"slug":4655,"type":13},{"name":4667,"slug":4668,"type":13},{"name":9,"slug":8,"type":13},{"slug":4672,"name":4672,"fn":4673,"description":4674,"org":4763,"tags":4764,"stars":20,"repoUrl":21,"updatedAt":4683},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4765,4766,4767,4768],{"name":15,"slug":16,"type":13},{"name":4654,"slug":4655,"type":13},{"name":4680,"slug":4681,"type":13},{"name":9,"slug":8,"type":13},{"slug":4685,"name":4685,"fn":4686,"description":4687,"org":4770,"tags":4771,"stars":20,"repoUrl":21,"updatedAt":4703},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4772,4773,4774,4775,4776],{"name":4691,"slug":4692,"type":13},{"name":4694,"slug":4695,"type":13},{"name":4697,"slug":4698,"type":13},{"name":9,"slug":8,"type":13},{"name":4701,"slug":4702,"type":13},{"slug":4705,"name":4705,"fn":4706,"description":4707,"org":4778,"tags":4779,"stars":20,"repoUrl":21,"updatedAt":4716},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4780,4781,4782,4783],{"name":15,"slug":16,"type":13},{"name":4654,"slug":4655,"type":13},{"name":4713,"slug":4714,"type":13},{"name":9,"slug":8,"type":13},{"slug":4718,"name":4718,"fn":4719,"description":4720,"org":4785,"tags":4786,"stars":20,"repoUrl":21,"updatedAt":4730},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4787,4788,4789,4790],{"name":4724,"slug":4718,"type":13},{"name":4726,"slug":4727,"type":13},{"name":4654,"slug":4655,"type":13},{"name":9,"slug":8,"type":13},{"slug":4732,"name":4732,"fn":4733,"description":4734,"org":4792,"tags":4793,"stars":20,"repoUrl":21,"updatedAt":4744},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4794,4795,4796,4797],{"name":4654,"slug":4655,"type":13},{"name":4739,"slug":4732,"type":13},{"name":4741,"slug":4742,"type":13},{"name":9,"slug":8,"type":13},{"slug":4,"name":4,"fn":5,"description":6,"org":4799,"tags":4800,"stars":20,"repoUrl":21,"updatedAt":22},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4801,4802,4803],{"name":15,"slug":16,"type":13},{"name":18,"slug":19,"type":13},{"name":9,"slug":8,"type":13},{"slug":4805,"name":4805,"fn":4806,"description":4807,"org":4808,"tags":4809,"stars":20,"repoUrl":21,"updatedAt":4817},"error-handling","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},[4810,4811,4814,4815],{"name":4654,"slug":4655,"type":13},{"name":4812,"slug":4813,"type":13},"Debugging","debugging",{"name":9,"slug":8,"type":13},{"name":4816,"slug":31,"type":13},"TypeScript","2026-07-18T05:46:52.798151",{"slug":4601,"name":4601,"fn":4819,"description":4820,"org":4821,"tags":4822,"stars":20,"repoUrl":21,"updatedAt":4826},"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},[4823,4824,4825],{"name":15,"slug":16,"type":13},{"name":18,"slug":19,"type":13},{"name":9,"slug":8,"type":13},"2026-07-18T05:47:06.847309",{"slug":4828,"name":4828,"fn":4829,"description":4830,"org":4831,"tags":4832,"stars":20,"repoUrl":21,"updatedAt":4838},"middlewares","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},[4833,4834,4837],{"name":4654,"slug":4655,"type":13},{"name":4835,"slug":4836,"type":13},"Middleware","middleware",{"name":9,"slug":8,"type":13},"2026-07-18T05:46:49.132255",{"slug":4840,"name":4840,"fn":4841,"description":4842,"org":4843,"tags":4844,"stars":20,"repoUrl":21,"updatedAt":4852},"nextjs-app-router","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},[4845,4846,4847,4850,4851],{"name":4654,"slug":4655,"type":13},{"name":18,"slug":19,"type":13},{"name":4848,"slug":4849,"type":13},"Next.js","next-js",{"name":9,"slug":8,"type":13},{"name":4816,"slug":31,"type":13},"2026-07-18T05:47:10.468453"]