[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-trpc-server-side-calls":3,"mdc--mq1whc-key":40,"related-org-trpc-server-side-calls":5567,"related-repo-trpc-server-side-calls":5729},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":23,"repoUrl":24,"updatedAt":25,"license":26,"forks":27,"topics":28,"repo":35,"sourceUrl":38,"mdContent":39},"server-side-calls","execute tRPC procedures from server code","Call tRPC procedures directly from server code using t.createCallerFactory() and router.createCaller(context) for integration testing, internal server logic, and custom API endpoints. Catch TRPCError and extract HTTP status with getHTTPStatusCodeFromError(). Error handling via onError option.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"trpc","tRPC","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Ftrpc.png",[12,16,17,20],{"name":13,"slug":14,"type":15},"Backend","backend","tag",{"name":9,"slug":8,"type":15},{"name":18,"slug":19,"type":15},"API Development","api-development",{"name":21,"slug":22,"type":15},"Testing","testing",40424,"https:\u002F\u002Fgithub.com\u002Ftrpc\u002Ftrpc","2026-07-18T05:46:54.282074",null,1636,[29,30,31,32,33,34],"api","next","nextjs","prisma","react","typescript",{"repoUrl":24,"stars":23,"forks":27,"topics":36,"description":37},[29,30,31,32,33,34],"🧙‍♀️  Move Fast and Break Nothing. End-to-end typesafe APIs made easy. ","https:\u002F\u002Fgithub.com\u002Ftrpc\u002Ftrpc\u002Ftree\u002FHEAD\u002Fpackages\u002Fserver\u002Fskills\u002Fserver-side-calls","---\nname: server-side-calls\ndescription: >\n  Call tRPC procedures directly from server code using t.createCallerFactory()\n  and router.createCaller(context) for integration testing, internal server logic,\n  and custom API endpoints. Catch TRPCError and extract HTTP status with\n  getHTTPStatusCodeFromError(). Error handling via onError option.\ntype: core\nlibrary: trpc\nlibrary_version: '11.16.0'\nrequires:\n  - server-setup\nsources:\n  - 'trpc\u002Ftrpc:www\u002Fdocs\u002Fserver\u002Fserver-side-calls.md'\n---\n\n# tRPC -- Server-Side Calls\n\n## Setup\n\n```ts\n\u002F\u002F server\u002Ftrpc.ts\nimport { initTRPC } from '@trpc\u002Fserver';\n\ntype Context = { user?: { id: string } };\n\nconst t = initTRPC.context\u003CContext>().create();\n\nexport const router = t.router;\nexport const publicProcedure = t.procedure;\nexport const createCallerFactory = t.createCallerFactory;\n```\n\n```ts\n\u002F\u002F server\u002FappRouter.ts\nimport { TRPCError } from '@trpc\u002Fserver';\nimport { z } from 'zod';\nimport { createCallerFactory, publicProcedure, router } from '.\u002Ftrpc';\n\ninterface Post {\n  id: string;\n  title: string;\n}\n\nconst posts: Post[] = [{ id: '1', title: 'Hello world' }];\n\nexport const appRouter = router({\n  post: router({\n    add: publicProcedure\n      .input(z.object({ title: z.string().min(2) }))\n      .mutation(({ input }) => {\n        const post: Post = { ...input, id: `${Math.random()}` };\n        posts.push(post);\n        return post;\n      }),\n    byId: publicProcedure\n      .input(z.object({ id: z.string() }))\n      .query(({ input }) => {\n        const post = posts.find((p) => p.id === input.id);\n        if (!post) throw new TRPCError({ code: 'NOT_FOUND' });\n        return post;\n      }),\n    list: publicProcedure.query(() => posts),\n  }),\n});\n\nexport type AppRouter = typeof appRouter;\nexport const createCaller = createCallerFactory(appRouter);\n```\n\n```ts\n\u002F\u002F usage\nimport { createCaller } from '.\u002FappRouter';\n\nconst caller = createCaller({ user: { id: '1' } });\nconst postList = await caller.post.list();\nconst newPost = await caller.post.add({ title: 'New post' });\n```\n\n## Core Patterns\n\n### Integration test with createCallerFactory\n\n```ts\n\u002F\u002F server\u002FappRouter.test.ts\nimport type { inferProcedureInput } from '@trpc\u002Fserver';\nimport { createCaller } from '.\u002FappRouter';\nimport type { AppRouter } from '.\u002FappRouter';\nimport { createContextInner } from '.\u002Fcontext';\n\nasync function testAddAndGetPost() {\n  const ctx = await createContextInner({ user: undefined });\n  const caller = createCaller(ctx);\n\n  const input: inferProcedureInput\u003CAppRouter['post']['add']> = {\n    title: 'Test post',\n  };\n\n  const post = await caller.post.add(input);\n  const allPosts = await caller.post.list();\n\n  console.assert(allPosts.some((p) => p.id === post.id));\n}\n```\n\n### Using router.createCaller() directly\n\n```ts\nimport { initTRPC } from '@trpc\u002Fserver';\nimport { z } from 'zod';\n\nconst t = initTRPC.create();\n\nconst appRouter = t.router({\n  greeting: t.procedure\n    .input(z.object({ name: z.string() }))\n    .query(({ input }) => `Hello ${input.name}`),\n});\n\nconst caller = appRouter.createCaller({});\nconst result = await caller.greeting({ name: 'tRPC' });\n```\n\n### Error handling in a custom API endpoint\n\n```ts\nimport { TRPCError } from '@trpc\u002Fserver';\nimport { getHTTPStatusCodeFromError } from '@trpc\u002Fserver\u002Fhttp';\nimport type { NextApiRequest, NextApiResponse } from 'next';\nimport { appRouter } from '.\u002FappRouter';\n\nexport default async function handler(\n  req: NextApiRequest,\n  res: NextApiResponse,\n) {\n  const caller = appRouter.createCaller({});\n\n  try {\n    const post = await caller.post.byId({ id: req.query.id as string });\n    res.status(200).json({ data: { postTitle: post.title } });\n  } catch (cause) {\n    if (cause instanceof TRPCError) {\n      const httpStatusCode = getHTTPStatusCodeFromError(cause);\n      res.status(httpStatusCode).json({ error: { message: cause.message } });\n      return;\n    }\n    res.status(500).json({ error: { message: 'Internal server error' } });\n  }\n}\n```\n\n### Caller with onError callback\n\n```ts\nimport { initTRPC } from '@trpc\u002Fserver';\nimport { z } from 'zod';\n\nconst t = initTRPC.create();\n\nconst appRouter = t.router({\n  greeting: t.procedure\n    .input(z.object({ name: z.string() }))\n    .query(({ input }) => {\n      if (input.name === 'invalid') {\n        throw new Error('Invalid name');\n      }\n      return `Hello ${input.name}`;\n    }),\n});\n\nconst caller = appRouter.createCaller(\n  {},\n  {\n    onError: (opts) => {\n      console.error('An error occurred:', opts.error);\n    },\n  },\n);\n```\n\n## Common Mistakes\n\n### [HIGH] Using createCaller inside another procedure\n\nWrong:\n\n```ts\nimport { appRouter } from '.\u002FappRouter';\nimport { createCallerFactory, publicProcedure } from '.\u002Ftrpc';\n\nconst createCaller = createCallerFactory(appRouter);\n\nconst proc = publicProcedure.query(async () => {\n  const caller = createCaller({});\n  return caller.post.list();\n});\n```\n\nCorrect:\n\n```ts\nimport type { Context } from '.\u002Fcontext';\nimport { publicProcedure } from '.\u002Ftrpc';\n\nasync function listPosts(ctx: Context) {\n  return ctx.db.post.findMany();\n}\n\nconst proc = publicProcedure.query(async ({ ctx }) => {\n  return listPosts(ctx);\n});\n```\n\nCalling createCaller from within a procedure re-creates context, re-runs all middleware, and re-validates input; extract shared logic into a plain function instead.\n\nSource: www\u002Fdocs\u002Fserver\u002Fserver-side-calls.md\n\n### [MEDIUM] Not providing context to createCaller\n\nWrong:\n\n```ts\nimport { appRouter } from '.\u002FappRouter';\n\nconst caller = appRouter.createCaller({});\nawait caller.protectedRoute();\n\u002F\u002F middleware throws UNAUTHORIZED because ctx.user is undefined\n```\n\nCorrect:\n\n```ts\nimport { appRouter } from '.\u002FappRouter';\nimport { createContextInner } from '.\u002Fcontext';\n\nconst ctx = await createContextInner({ user: { id: '1' } });\nconst caller = appRouter.createCaller(ctx);\nawait caller.protectedRoute();\n```\n\n`createCaller` requires a context object matching what procedures and middleware expect; passing an empty object when procedures require auth context causes runtime errors.\n\nSource: www\u002Fdocs\u002Fserver\u002Fserver-side-calls.md\n\n## See Also\n\n- `server-setup` -- initTRPC, routers, context configuration\n- `middlewares` -- auth middleware that callers must satisfy\n- `error-handling` -- TRPCError and getHTTPStatusCodeFromError\n",{"data":41,"body":48},{"name":4,"description":6,"type":42,"library":8,"library_version":43,"requires":44,"sources":46},"core","11.16.0",[45],"server-setup",[47],"trpc\u002Ftrpc:www\u002Fdocs\u002Fserver\u002Fserver-side-calls.md",{"type":49,"children":50},"root",[51,60,67,422,1615,1887,1893,1900,2547,2553,3023,3029,3880,3886,4518,4524,4535,4540,4809,4814,5107,5112,5117,5128,5132,5265,5269,5504,5514,5518,5524,5561],{"type":52,"tag":53,"props":54,"children":56},"element","h1",{"id":55},"trpc-server-side-calls",[57],{"type":58,"value":59},"text","tRPC -- Server-Side Calls",{"type":52,"tag":61,"props":62,"children":64},"h2",{"id":63},"setup",[65],{"type":58,"value":66},"Setup",{"type":52,"tag":68,"props":69,"children":74},"pre",{"className":70,"code":71,"language":72,"meta":73,"style":73},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F server\u002Ftrpc.ts\nimport { initTRPC } from '@trpc\u002Fserver';\n\ntype Context = { user?: { id: string } };\n\nconst t = initTRPC.context\u003CContext>().create();\n\nexport const router = t.router;\nexport const publicProcedure = t.procedure;\nexport const createCallerFactory = t.createCallerFactory;\n","ts","",[75],{"type":52,"tag":76,"props":77,"children":78},"code",{"__ignoreMap":73},[79,91,144,154,218,226,297,305,346,384],{"type":52,"tag":80,"props":81,"children":84},"span",{"class":82,"line":83},"line",1,[85],{"type":52,"tag":80,"props":86,"children":88},{"style":87},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[89],{"type":58,"value":90},"\u002F\u002F server\u002Ftrpc.ts\n",{"type":52,"tag":80,"props":92,"children":94},{"class":82,"line":93},2,[95,101,107,113,118,123,128,134,139],{"type":52,"tag":80,"props":96,"children":98},{"style":97},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[99],{"type":58,"value":100},"import",{"type":52,"tag":80,"props":102,"children":104},{"style":103},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[105],{"type":58,"value":106}," {",{"type":52,"tag":80,"props":108,"children":110},{"style":109},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[111],{"type":58,"value":112}," initTRPC",{"type":52,"tag":80,"props":114,"children":115},{"style":103},[116],{"type":58,"value":117}," }",{"type":52,"tag":80,"props":119,"children":120},{"style":97},[121],{"type":58,"value":122}," from",{"type":52,"tag":80,"props":124,"children":125},{"style":103},[126],{"type":58,"value":127}," '",{"type":52,"tag":80,"props":129,"children":131},{"style":130},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[132],{"type":58,"value":133},"@trpc\u002Fserver",{"type":52,"tag":80,"props":135,"children":136},{"style":103},[137],{"type":58,"value":138},"'",{"type":52,"tag":80,"props":140,"children":141},{"style":103},[142],{"type":58,"value":143},";\n",{"type":52,"tag":80,"props":145,"children":147},{"class":82,"line":146},3,[148],{"type":52,"tag":80,"props":149,"children":151},{"emptyLinePlaceholder":150},true,[152],{"type":58,"value":153},"\n",{"type":52,"tag":80,"props":155,"children":157},{"class":82,"line":156},4,[158,164,170,175,179,185,190,194,199,204,209,213],{"type":52,"tag":80,"props":159,"children":161},{"style":160},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[162],{"type":58,"value":163},"type",{"type":52,"tag":80,"props":165,"children":167},{"style":166},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[168],{"type":58,"value":169}," Context",{"type":52,"tag":80,"props":171,"children":172},{"style":103},[173],{"type":58,"value":174}," =",{"type":52,"tag":80,"props":176,"children":177},{"style":103},[178],{"type":58,"value":106},{"type":52,"tag":80,"props":180,"children":182},{"style":181},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[183],{"type":58,"value":184}," user",{"type":52,"tag":80,"props":186,"children":187},{"style":103},[188],{"type":58,"value":189},"?:",{"type":52,"tag":80,"props":191,"children":192},{"style":103},[193],{"type":58,"value":106},{"type":52,"tag":80,"props":195,"children":196},{"style":181},[197],{"type":58,"value":198}," id",{"type":52,"tag":80,"props":200,"children":201},{"style":103},[202],{"type":58,"value":203},":",{"type":52,"tag":80,"props":205,"children":206},{"style":166},[207],{"type":58,"value":208}," string",{"type":52,"tag":80,"props":210,"children":211},{"style":103},[212],{"type":58,"value":117},{"type":52,"tag":80,"props":214,"children":215},{"style":103},[216],{"type":58,"value":217}," };\n",{"type":52,"tag":80,"props":219,"children":221},{"class":82,"line":220},5,[222],{"type":52,"tag":80,"props":223,"children":224},{"emptyLinePlaceholder":150},[225],{"type":58,"value":153},{"type":52,"tag":80,"props":227,"children":229},{"class":82,"line":228},6,[230,235,240,245,249,254,260,265,270,275,280,284,289,293],{"type":52,"tag":80,"props":231,"children":232},{"style":160},[233],{"type":58,"value":234},"const",{"type":52,"tag":80,"props":236,"children":237},{"style":109},[238],{"type":58,"value":239}," t ",{"type":52,"tag":80,"props":241,"children":242},{"style":103},[243],{"type":58,"value":244},"=",{"type":52,"tag":80,"props":246,"children":247},{"style":109},[248],{"type":58,"value":112},{"type":52,"tag":80,"props":250,"children":251},{"style":103},[252],{"type":58,"value":253},".",{"type":52,"tag":80,"props":255,"children":257},{"style":256},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[258],{"type":58,"value":259},"context",{"type":52,"tag":80,"props":261,"children":262},{"style":103},[263],{"type":58,"value":264},"\u003C",{"type":52,"tag":80,"props":266,"children":267},{"style":166},[268],{"type":58,"value":269},"Context",{"type":52,"tag":80,"props":271,"children":272},{"style":103},[273],{"type":58,"value":274},">",{"type":52,"tag":80,"props":276,"children":277},{"style":109},[278],{"type":58,"value":279},"()",{"type":52,"tag":80,"props":281,"children":282},{"style":103},[283],{"type":58,"value":253},{"type":52,"tag":80,"props":285,"children":286},{"style":256},[287],{"type":58,"value":288},"create",{"type":52,"tag":80,"props":290,"children":291},{"style":109},[292],{"type":58,"value":279},{"type":52,"tag":80,"props":294,"children":295},{"style":103},[296],{"type":58,"value":143},{"type":52,"tag":80,"props":298,"children":300},{"class":82,"line":299},7,[301],{"type":52,"tag":80,"props":302,"children":303},{"emptyLinePlaceholder":150},[304],{"type":58,"value":153},{"type":52,"tag":80,"props":306,"children":308},{"class":82,"line":307},8,[309,314,319,324,328,333,337,342],{"type":52,"tag":80,"props":310,"children":311},{"style":97},[312],{"type":58,"value":313},"export",{"type":52,"tag":80,"props":315,"children":316},{"style":160},[317],{"type":58,"value":318}," const",{"type":52,"tag":80,"props":320,"children":321},{"style":109},[322],{"type":58,"value":323}," router ",{"type":52,"tag":80,"props":325,"children":326},{"style":103},[327],{"type":58,"value":244},{"type":52,"tag":80,"props":329,"children":330},{"style":109},[331],{"type":58,"value":332}," t",{"type":52,"tag":80,"props":334,"children":335},{"style":103},[336],{"type":58,"value":253},{"type":52,"tag":80,"props":338,"children":339},{"style":109},[340],{"type":58,"value":341},"router",{"type":52,"tag":80,"props":343,"children":344},{"style":103},[345],{"type":58,"value":143},{"type":52,"tag":80,"props":347,"children":349},{"class":82,"line":348},9,[350,354,358,363,367,371,375,380],{"type":52,"tag":80,"props":351,"children":352},{"style":97},[353],{"type":58,"value":313},{"type":52,"tag":80,"props":355,"children":356},{"style":160},[357],{"type":58,"value":318},{"type":52,"tag":80,"props":359,"children":360},{"style":109},[361],{"type":58,"value":362}," publicProcedure ",{"type":52,"tag":80,"props":364,"children":365},{"style":103},[366],{"type":58,"value":244},{"type":52,"tag":80,"props":368,"children":369},{"style":109},[370],{"type":58,"value":332},{"type":52,"tag":80,"props":372,"children":373},{"style":103},[374],{"type":58,"value":253},{"type":52,"tag":80,"props":376,"children":377},{"style":109},[378],{"type":58,"value":379},"procedure",{"type":52,"tag":80,"props":381,"children":382},{"style":103},[383],{"type":58,"value":143},{"type":52,"tag":80,"props":385,"children":387},{"class":82,"line":386},10,[388,392,396,401,405,409,413,418],{"type":52,"tag":80,"props":389,"children":390},{"style":97},[391],{"type":58,"value":313},{"type":52,"tag":80,"props":393,"children":394},{"style":160},[395],{"type":58,"value":318},{"type":52,"tag":80,"props":397,"children":398},{"style":109},[399],{"type":58,"value":400}," createCallerFactory ",{"type":52,"tag":80,"props":402,"children":403},{"style":103},[404],{"type":58,"value":244},{"type":52,"tag":80,"props":406,"children":407},{"style":109},[408],{"type":58,"value":332},{"type":52,"tag":80,"props":410,"children":411},{"style":103},[412],{"type":58,"value":253},{"type":52,"tag":80,"props":414,"children":415},{"style":109},[416],{"type":58,"value":417},"createCallerFactory",{"type":52,"tag":80,"props":419,"children":420},{"style":103},[421],{"type":58,"value":143},{"type":52,"tag":68,"props":423,"children":425},{"className":70,"code":424,"language":72,"meta":73,"style":73},"\u002F\u002F server\u002FappRouter.ts\nimport { TRPCError } from '@trpc\u002Fserver';\nimport { z } from 'zod';\nimport { createCallerFactory, publicProcedure, router } from '.\u002Ftrpc';\n\ninterface Post {\n  id: string;\n  title: string;\n}\n\nconst posts: Post[] = [{ id: '1', title: 'Hello world' }];\n\nexport const appRouter = router({\n  post: router({\n    add: publicProcedure\n      .input(z.object({ title: z.string().min(2) }))\n      .mutation(({ input }) => {\n        const post: Post = { ...input, id: `${Math.random()}` };\n        posts.push(post);\n        return post;\n      }),\n    byId: publicProcedure\n      .input(z.object({ id: z.string() }))\n      .query(({ input }) => {\n        const post = posts.find((p) => p.id === input.id);\n        if (!post) throw new TRPCError({ code: 'NOT_FOUND' });\n        return post;\n      }),\n    list: publicProcedure.query(() => posts),\n  }),\n});\n\nexport type AppRouter = typeof appRouter;\nexport const createCaller = createCallerFactory(appRouter);\n",[426],{"type":52,"tag":76,"props":427,"children":428},{"__ignoreMap":73},[429,437,477,518,578,585,603,623,643,651,658,758,766,801,826,844,939,981,1064,1100,1117,1135,1152,1217,1254,1343,1426,1442,1458,1504,1521,1537,1545,1581],{"type":52,"tag":80,"props":430,"children":431},{"class":82,"line":83},[432],{"type":52,"tag":80,"props":433,"children":434},{"style":87},[435],{"type":58,"value":436},"\u002F\u002F server\u002FappRouter.ts\n",{"type":52,"tag":80,"props":438,"children":439},{"class":82,"line":93},[440,444,448,453,457,461,465,469,473],{"type":52,"tag":80,"props":441,"children":442},{"style":97},[443],{"type":58,"value":100},{"type":52,"tag":80,"props":445,"children":446},{"style":103},[447],{"type":58,"value":106},{"type":52,"tag":80,"props":449,"children":450},{"style":109},[451],{"type":58,"value":452}," TRPCError",{"type":52,"tag":80,"props":454,"children":455},{"style":103},[456],{"type":58,"value":117},{"type":52,"tag":80,"props":458,"children":459},{"style":97},[460],{"type":58,"value":122},{"type":52,"tag":80,"props":462,"children":463},{"style":103},[464],{"type":58,"value":127},{"type":52,"tag":80,"props":466,"children":467},{"style":130},[468],{"type":58,"value":133},{"type":52,"tag":80,"props":470,"children":471},{"style":103},[472],{"type":58,"value":138},{"type":52,"tag":80,"props":474,"children":475},{"style":103},[476],{"type":58,"value":143},{"type":52,"tag":80,"props":478,"children":479},{"class":82,"line":146},[480,484,488,493,497,501,505,510,514],{"type":52,"tag":80,"props":481,"children":482},{"style":97},[483],{"type":58,"value":100},{"type":52,"tag":80,"props":485,"children":486},{"style":103},[487],{"type":58,"value":106},{"type":52,"tag":80,"props":489,"children":490},{"style":109},[491],{"type":58,"value":492}," z",{"type":52,"tag":80,"props":494,"children":495},{"style":103},[496],{"type":58,"value":117},{"type":52,"tag":80,"props":498,"children":499},{"style":97},[500],{"type":58,"value":122},{"type":52,"tag":80,"props":502,"children":503},{"style":103},[504],{"type":58,"value":127},{"type":52,"tag":80,"props":506,"children":507},{"style":130},[508],{"type":58,"value":509},"zod",{"type":52,"tag":80,"props":511,"children":512},{"style":103},[513],{"type":58,"value":138},{"type":52,"tag":80,"props":515,"children":516},{"style":103},[517],{"type":58,"value":143},{"type":52,"tag":80,"props":519,"children":520},{"class":82,"line":156},[521,525,529,534,539,544,548,553,557,561,565,570,574],{"type":52,"tag":80,"props":522,"children":523},{"style":97},[524],{"type":58,"value":100},{"type":52,"tag":80,"props":526,"children":527},{"style":103},[528],{"type":58,"value":106},{"type":52,"tag":80,"props":530,"children":531},{"style":109},[532],{"type":58,"value":533}," createCallerFactory",{"type":52,"tag":80,"props":535,"children":536},{"style":103},[537],{"type":58,"value":538},",",{"type":52,"tag":80,"props":540,"children":541},{"style":109},[542],{"type":58,"value":543}," publicProcedure",{"type":52,"tag":80,"props":545,"children":546},{"style":103},[547],{"type":58,"value":538},{"type":52,"tag":80,"props":549,"children":550},{"style":109},[551],{"type":58,"value":552}," router",{"type":52,"tag":80,"props":554,"children":555},{"style":103},[556],{"type":58,"value":117},{"type":52,"tag":80,"props":558,"children":559},{"style":97},[560],{"type":58,"value":122},{"type":52,"tag":80,"props":562,"children":563},{"style":103},[564],{"type":58,"value":127},{"type":52,"tag":80,"props":566,"children":567},{"style":130},[568],{"type":58,"value":569},".\u002Ftrpc",{"type":52,"tag":80,"props":571,"children":572},{"style":103},[573],{"type":58,"value":138},{"type":52,"tag":80,"props":575,"children":576},{"style":103},[577],{"type":58,"value":143},{"type":52,"tag":80,"props":579,"children":580},{"class":82,"line":220},[581],{"type":52,"tag":80,"props":582,"children":583},{"emptyLinePlaceholder":150},[584],{"type":58,"value":153},{"type":52,"tag":80,"props":586,"children":587},{"class":82,"line":228},[588,593,598],{"type":52,"tag":80,"props":589,"children":590},{"style":160},[591],{"type":58,"value":592},"interface",{"type":52,"tag":80,"props":594,"children":595},{"style":166},[596],{"type":58,"value":597}," Post",{"type":52,"tag":80,"props":599,"children":600},{"style":103},[601],{"type":58,"value":602}," {\n",{"type":52,"tag":80,"props":604,"children":605},{"class":82,"line":299},[606,611,615,619],{"type":52,"tag":80,"props":607,"children":608},{"style":181},[609],{"type":58,"value":610},"  id",{"type":52,"tag":80,"props":612,"children":613},{"style":103},[614],{"type":58,"value":203},{"type":52,"tag":80,"props":616,"children":617},{"style":166},[618],{"type":58,"value":208},{"type":52,"tag":80,"props":620,"children":621},{"style":103},[622],{"type":58,"value":143},{"type":52,"tag":80,"props":624,"children":625},{"class":82,"line":307},[626,631,635,639],{"type":52,"tag":80,"props":627,"children":628},{"style":181},[629],{"type":58,"value":630},"  title",{"type":52,"tag":80,"props":632,"children":633},{"style":103},[634],{"type":58,"value":203},{"type":52,"tag":80,"props":636,"children":637},{"style":166},[638],{"type":58,"value":208},{"type":52,"tag":80,"props":640,"children":641},{"style":103},[642],{"type":58,"value":143},{"type":52,"tag":80,"props":644,"children":645},{"class":82,"line":348},[646],{"type":52,"tag":80,"props":647,"children":648},{"style":103},[649],{"type":58,"value":650},"}\n",{"type":52,"tag":80,"props":652,"children":653},{"class":82,"line":386},[654],{"type":52,"tag":80,"props":655,"children":656},{"emptyLinePlaceholder":150},[657],{"type":58,"value":153},{"type":52,"tag":80,"props":659,"children":661},{"class":82,"line":660},11,[662,666,671,675,679,684,688,693,698,702,706,710,715,719,723,728,732,736,741,745,749,754],{"type":52,"tag":80,"props":663,"children":664},{"style":160},[665],{"type":58,"value":234},{"type":52,"tag":80,"props":667,"children":668},{"style":109},[669],{"type":58,"value":670}," posts",{"type":52,"tag":80,"props":672,"children":673},{"style":103},[674],{"type":58,"value":203},{"type":52,"tag":80,"props":676,"children":677},{"style":166},[678],{"type":58,"value":597},{"type":52,"tag":80,"props":680,"children":681},{"style":109},[682],{"type":58,"value":683},"[] ",{"type":52,"tag":80,"props":685,"children":686},{"style":103},[687],{"type":58,"value":244},{"type":52,"tag":80,"props":689,"children":690},{"style":109},[691],{"type":58,"value":692}," [",{"type":52,"tag":80,"props":694,"children":695},{"style":103},[696],{"type":58,"value":697},"{",{"type":52,"tag":80,"props":699,"children":700},{"style":181},[701],{"type":58,"value":198},{"type":52,"tag":80,"props":703,"children":704},{"style":103},[705],{"type":58,"value":203},{"type":52,"tag":80,"props":707,"children":708},{"style":103},[709],{"type":58,"value":127},{"type":52,"tag":80,"props":711,"children":712},{"style":130},[713],{"type":58,"value":714},"1",{"type":52,"tag":80,"props":716,"children":717},{"style":103},[718],{"type":58,"value":138},{"type":52,"tag":80,"props":720,"children":721},{"style":103},[722],{"type":58,"value":538},{"type":52,"tag":80,"props":724,"children":725},{"style":181},[726],{"type":58,"value":727}," title",{"type":52,"tag":80,"props":729,"children":730},{"style":103},[731],{"type":58,"value":203},{"type":52,"tag":80,"props":733,"children":734},{"style":103},[735],{"type":58,"value":127},{"type":52,"tag":80,"props":737,"children":738},{"style":130},[739],{"type":58,"value":740},"Hello world",{"type":52,"tag":80,"props":742,"children":743},{"style":103},[744],{"type":58,"value":138},{"type":52,"tag":80,"props":746,"children":747},{"style":103},[748],{"type":58,"value":117},{"type":52,"tag":80,"props":750,"children":751},{"style":109},[752],{"type":58,"value":753},"]",{"type":52,"tag":80,"props":755,"children":756},{"style":103},[757],{"type":58,"value":143},{"type":52,"tag":80,"props":759,"children":761},{"class":82,"line":760},12,[762],{"type":52,"tag":80,"props":763,"children":764},{"emptyLinePlaceholder":150},[765],{"type":58,"value":153},{"type":52,"tag":80,"props":767,"children":769},{"class":82,"line":768},13,[770,774,778,783,787,791,796],{"type":52,"tag":80,"props":771,"children":772},{"style":97},[773],{"type":58,"value":313},{"type":52,"tag":80,"props":775,"children":776},{"style":160},[777],{"type":58,"value":318},{"type":52,"tag":80,"props":779,"children":780},{"style":109},[781],{"type":58,"value":782}," appRouter ",{"type":52,"tag":80,"props":784,"children":785},{"style":103},[786],{"type":58,"value":244},{"type":52,"tag":80,"props":788,"children":789},{"style":256},[790],{"type":58,"value":552},{"type":52,"tag":80,"props":792,"children":793},{"style":109},[794],{"type":58,"value":795},"(",{"type":52,"tag":80,"props":797,"children":798},{"style":103},[799],{"type":58,"value":800},"{\n",{"type":52,"tag":80,"props":802,"children":804},{"class":82,"line":803},14,[805,810,814,818,822],{"type":52,"tag":80,"props":806,"children":807},{"style":181},[808],{"type":58,"value":809},"  post",{"type":52,"tag":80,"props":811,"children":812},{"style":103},[813],{"type":58,"value":203},{"type":52,"tag":80,"props":815,"children":816},{"style":256},[817],{"type":58,"value":552},{"type":52,"tag":80,"props":819,"children":820},{"style":109},[821],{"type":58,"value":795},{"type":52,"tag":80,"props":823,"children":824},{"style":103},[825],{"type":58,"value":800},{"type":52,"tag":80,"props":827,"children":829},{"class":82,"line":828},15,[830,835,839],{"type":52,"tag":80,"props":831,"children":832},{"style":181},[833],{"type":58,"value":834},"    add",{"type":52,"tag":80,"props":836,"children":837},{"style":103},[838],{"type":58,"value":203},{"type":52,"tag":80,"props":840,"children":841},{"style":109},[842],{"type":58,"value":843}," publicProcedure\n",{"type":52,"tag":80,"props":845,"children":847},{"class":82,"line":846},16,[848,853,858,863,867,872,876,880,884,888,892,896,901,905,909,914,918,924,929,934],{"type":52,"tag":80,"props":849,"children":850},{"style":103},[851],{"type":58,"value":852},"      .",{"type":52,"tag":80,"props":854,"children":855},{"style":256},[856],{"type":58,"value":857},"input",{"type":52,"tag":80,"props":859,"children":860},{"style":109},[861],{"type":58,"value":862},"(z",{"type":52,"tag":80,"props":864,"children":865},{"style":103},[866],{"type":58,"value":253},{"type":52,"tag":80,"props":868,"children":869},{"style":256},[870],{"type":58,"value":871},"object",{"type":52,"tag":80,"props":873,"children":874},{"style":109},[875],{"type":58,"value":795},{"type":52,"tag":80,"props":877,"children":878},{"style":103},[879],{"type":58,"value":697},{"type":52,"tag":80,"props":881,"children":882},{"style":181},[883],{"type":58,"value":727},{"type":52,"tag":80,"props":885,"children":886},{"style":103},[887],{"type":58,"value":203},{"type":52,"tag":80,"props":889,"children":890},{"style":109},[891],{"type":58,"value":492},{"type":52,"tag":80,"props":893,"children":894},{"style":103},[895],{"type":58,"value":253},{"type":52,"tag":80,"props":897,"children":898},{"style":256},[899],{"type":58,"value":900},"string",{"type":52,"tag":80,"props":902,"children":903},{"style":109},[904],{"type":58,"value":279},{"type":52,"tag":80,"props":906,"children":907},{"style":103},[908],{"type":58,"value":253},{"type":52,"tag":80,"props":910,"children":911},{"style":256},[912],{"type":58,"value":913},"min",{"type":52,"tag":80,"props":915,"children":916},{"style":109},[917],{"type":58,"value":795},{"type":52,"tag":80,"props":919,"children":921},{"style":920},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[922],{"type":58,"value":923},"2",{"type":52,"tag":80,"props":925,"children":926},{"style":109},[927],{"type":58,"value":928},") ",{"type":52,"tag":80,"props":930,"children":931},{"style":103},[932],{"type":58,"value":933},"}",{"type":52,"tag":80,"props":935,"children":936},{"style":109},[937],{"type":58,"value":938},"))\n",{"type":52,"tag":80,"props":940,"children":942},{"class":82,"line":941},17,[943,947,952,956,961,967,972,977],{"type":52,"tag":80,"props":944,"children":945},{"style":103},[946],{"type":58,"value":852},{"type":52,"tag":80,"props":948,"children":949},{"style":256},[950],{"type":58,"value":951},"mutation",{"type":52,"tag":80,"props":953,"children":954},{"style":109},[955],{"type":58,"value":795},{"type":52,"tag":80,"props":957,"children":958},{"style":103},[959],{"type":58,"value":960},"({",{"type":52,"tag":80,"props":962,"children":964},{"style":963},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[965],{"type":58,"value":966}," input",{"type":52,"tag":80,"props":968,"children":969},{"style":103},[970],{"type":58,"value":971}," })",{"type":52,"tag":80,"props":973,"children":974},{"style":160},[975],{"type":58,"value":976}," =>",{"type":52,"tag":80,"props":978,"children":979},{"style":103},[980],{"type":58,"value":602},{"type":52,"tag":80,"props":982,"children":984},{"class":82,"line":983},18,[985,990,995,999,1003,1007,1011,1016,1020,1024,1028,1032,1037,1042,1046,1051,1055,1060],{"type":52,"tag":80,"props":986,"children":987},{"style":160},[988],{"type":58,"value":989},"        const",{"type":52,"tag":80,"props":991,"children":992},{"style":109},[993],{"type":58,"value":994}," post",{"type":52,"tag":80,"props":996,"children":997},{"style":103},[998],{"type":58,"value":203},{"type":52,"tag":80,"props":1000,"children":1001},{"style":166},[1002],{"type":58,"value":597},{"type":52,"tag":80,"props":1004,"children":1005},{"style":103},[1006],{"type":58,"value":174},{"type":52,"tag":80,"props":1008,"children":1009},{"style":103},[1010],{"type":58,"value":106},{"type":52,"tag":80,"props":1012,"children":1013},{"style":103},[1014],{"type":58,"value":1015}," ...",{"type":52,"tag":80,"props":1017,"children":1018},{"style":109},[1019],{"type":58,"value":857},{"type":52,"tag":80,"props":1021,"children":1022},{"style":103},[1023],{"type":58,"value":538},{"type":52,"tag":80,"props":1025,"children":1026},{"style":181},[1027],{"type":58,"value":198},{"type":52,"tag":80,"props":1029,"children":1030},{"style":103},[1031],{"type":58,"value":203},{"type":52,"tag":80,"props":1033,"children":1034},{"style":103},[1035],{"type":58,"value":1036}," `${",{"type":52,"tag":80,"props":1038,"children":1039},{"style":109},[1040],{"type":58,"value":1041},"Math",{"type":52,"tag":80,"props":1043,"children":1044},{"style":103},[1045],{"type":58,"value":253},{"type":52,"tag":80,"props":1047,"children":1048},{"style":256},[1049],{"type":58,"value":1050},"random",{"type":52,"tag":80,"props":1052,"children":1053},{"style":109},[1054],{"type":58,"value":279},{"type":52,"tag":80,"props":1056,"children":1057},{"style":103},[1058],{"type":58,"value":1059},"}`",{"type":52,"tag":80,"props":1061,"children":1062},{"style":103},[1063],{"type":58,"value":217},{"type":52,"tag":80,"props":1065,"children":1067},{"class":82,"line":1066},19,[1068,1073,1077,1082,1086,1091,1096],{"type":52,"tag":80,"props":1069,"children":1070},{"style":109},[1071],{"type":58,"value":1072},"        posts",{"type":52,"tag":80,"props":1074,"children":1075},{"style":103},[1076],{"type":58,"value":253},{"type":52,"tag":80,"props":1078,"children":1079},{"style":256},[1080],{"type":58,"value":1081},"push",{"type":52,"tag":80,"props":1083,"children":1084},{"style":181},[1085],{"type":58,"value":795},{"type":52,"tag":80,"props":1087,"children":1088},{"style":109},[1089],{"type":58,"value":1090},"post",{"type":52,"tag":80,"props":1092,"children":1093},{"style":181},[1094],{"type":58,"value":1095},")",{"type":52,"tag":80,"props":1097,"children":1098},{"style":103},[1099],{"type":58,"value":143},{"type":52,"tag":80,"props":1101,"children":1103},{"class":82,"line":1102},20,[1104,1109,1113],{"type":52,"tag":80,"props":1105,"children":1106},{"style":97},[1107],{"type":58,"value":1108},"        return",{"type":52,"tag":80,"props":1110,"children":1111},{"style":109},[1112],{"type":58,"value":994},{"type":52,"tag":80,"props":1114,"children":1115},{"style":103},[1116],{"type":58,"value":143},{"type":52,"tag":80,"props":1118,"children":1120},{"class":82,"line":1119},21,[1121,1126,1130],{"type":52,"tag":80,"props":1122,"children":1123},{"style":103},[1124],{"type":58,"value":1125},"      }",{"type":52,"tag":80,"props":1127,"children":1128},{"style":109},[1129],{"type":58,"value":1095},{"type":52,"tag":80,"props":1131,"children":1132},{"style":103},[1133],{"type":58,"value":1134},",\n",{"type":52,"tag":80,"props":1136,"children":1138},{"class":82,"line":1137},22,[1139,1144,1148],{"type":52,"tag":80,"props":1140,"children":1141},{"style":181},[1142],{"type":58,"value":1143},"    byId",{"type":52,"tag":80,"props":1145,"children":1146},{"style":103},[1147],{"type":58,"value":203},{"type":52,"tag":80,"props":1149,"children":1150},{"style":109},[1151],{"type":58,"value":843},{"type":52,"tag":80,"props":1153,"children":1155},{"class":82,"line":1154},23,[1156,1160,1164,1168,1172,1176,1180,1184,1188,1192,1196,1200,1204,1209,1213],{"type":52,"tag":80,"props":1157,"children":1158},{"style":103},[1159],{"type":58,"value":852},{"type":52,"tag":80,"props":1161,"children":1162},{"style":256},[1163],{"type":58,"value":857},{"type":52,"tag":80,"props":1165,"children":1166},{"style":109},[1167],{"type":58,"value":862},{"type":52,"tag":80,"props":1169,"children":1170},{"style":103},[1171],{"type":58,"value":253},{"type":52,"tag":80,"props":1173,"children":1174},{"style":256},[1175],{"type":58,"value":871},{"type":52,"tag":80,"props":1177,"children":1178},{"style":109},[1179],{"type":58,"value":795},{"type":52,"tag":80,"props":1181,"children":1182},{"style":103},[1183],{"type":58,"value":697},{"type":52,"tag":80,"props":1185,"children":1186},{"style":181},[1187],{"type":58,"value":198},{"type":52,"tag":80,"props":1189,"children":1190},{"style":103},[1191],{"type":58,"value":203},{"type":52,"tag":80,"props":1193,"children":1194},{"style":109},[1195],{"type":58,"value":492},{"type":52,"tag":80,"props":1197,"children":1198},{"style":103},[1199],{"type":58,"value":253},{"type":52,"tag":80,"props":1201,"children":1202},{"style":256},[1203],{"type":58,"value":900},{"type":52,"tag":80,"props":1205,"children":1206},{"style":109},[1207],{"type":58,"value":1208},"() ",{"type":52,"tag":80,"props":1210,"children":1211},{"style":103},[1212],{"type":58,"value":933},{"type":52,"tag":80,"props":1214,"children":1215},{"style":109},[1216],{"type":58,"value":938},{"type":52,"tag":80,"props":1218,"children":1220},{"class":82,"line":1219},24,[1221,1225,1230,1234,1238,1242,1246,1250],{"type":52,"tag":80,"props":1222,"children":1223},{"style":103},[1224],{"type":58,"value":852},{"type":52,"tag":80,"props":1226,"children":1227},{"style":256},[1228],{"type":58,"value":1229},"query",{"type":52,"tag":80,"props":1231,"children":1232},{"style":109},[1233],{"type":58,"value":795},{"type":52,"tag":80,"props":1235,"children":1236},{"style":103},[1237],{"type":58,"value":960},{"type":52,"tag":80,"props":1239,"children":1240},{"style":963},[1241],{"type":58,"value":966},{"type":52,"tag":80,"props":1243,"children":1244},{"style":103},[1245],{"type":58,"value":971},{"type":52,"tag":80,"props":1247,"children":1248},{"style":160},[1249],{"type":58,"value":976},{"type":52,"tag":80,"props":1251,"children":1252},{"style":103},[1253],{"type":58,"value":602},{"type":52,"tag":80,"props":1255,"children":1257},{"class":82,"line":1256},25,[1258,1262,1266,1270,1274,1278,1283,1287,1291,1296,1300,1304,1309,1313,1318,1323,1327,1331,1335,1339],{"type":52,"tag":80,"props":1259,"children":1260},{"style":160},[1261],{"type":58,"value":989},{"type":52,"tag":80,"props":1263,"children":1264},{"style":109},[1265],{"type":58,"value":994},{"type":52,"tag":80,"props":1267,"children":1268},{"style":103},[1269],{"type":58,"value":174},{"type":52,"tag":80,"props":1271,"children":1272},{"style":109},[1273],{"type":58,"value":670},{"type":52,"tag":80,"props":1275,"children":1276},{"style":103},[1277],{"type":58,"value":253},{"type":52,"tag":80,"props":1279,"children":1280},{"style":256},[1281],{"type":58,"value":1282},"find",{"type":52,"tag":80,"props":1284,"children":1285},{"style":181},[1286],{"type":58,"value":795},{"type":52,"tag":80,"props":1288,"children":1289},{"style":103},[1290],{"type":58,"value":795},{"type":52,"tag":80,"props":1292,"children":1293},{"style":963},[1294],{"type":58,"value":1295},"p",{"type":52,"tag":80,"props":1297,"children":1298},{"style":103},[1299],{"type":58,"value":1095},{"type":52,"tag":80,"props":1301,"children":1302},{"style":160},[1303],{"type":58,"value":976},{"type":52,"tag":80,"props":1305,"children":1306},{"style":109},[1307],{"type":58,"value":1308}," p",{"type":52,"tag":80,"props":1310,"children":1311},{"style":103},[1312],{"type":58,"value":253},{"type":52,"tag":80,"props":1314,"children":1315},{"style":109},[1316],{"type":58,"value":1317},"id",{"type":52,"tag":80,"props":1319,"children":1320},{"style":103},[1321],{"type":58,"value":1322}," ===",{"type":52,"tag":80,"props":1324,"children":1325},{"style":109},[1326],{"type":58,"value":966},{"type":52,"tag":80,"props":1328,"children":1329},{"style":103},[1330],{"type":58,"value":253},{"type":52,"tag":80,"props":1332,"children":1333},{"style":109},[1334],{"type":58,"value":1317},{"type":52,"tag":80,"props":1336,"children":1337},{"style":181},[1338],{"type":58,"value":1095},{"type":52,"tag":80,"props":1340,"children":1341},{"style":103},[1342],{"type":58,"value":143},{"type":52,"tag":80,"props":1344,"children":1346},{"class":82,"line":1345},26,[1347,1352,1357,1362,1366,1370,1375,1380,1384,1388,1392,1397,1401,1405,1410,1414,1418,1422],{"type":52,"tag":80,"props":1348,"children":1349},{"style":97},[1350],{"type":58,"value":1351},"        if",{"type":52,"tag":80,"props":1353,"children":1354},{"style":181},[1355],{"type":58,"value":1356}," (",{"type":52,"tag":80,"props":1358,"children":1359},{"style":103},[1360],{"type":58,"value":1361},"!",{"type":52,"tag":80,"props":1363,"children":1364},{"style":109},[1365],{"type":58,"value":1090},{"type":52,"tag":80,"props":1367,"children":1368},{"style":181},[1369],{"type":58,"value":928},{"type":52,"tag":80,"props":1371,"children":1372},{"style":97},[1373],{"type":58,"value":1374},"throw",{"type":52,"tag":80,"props":1376,"children":1377},{"style":103},[1378],{"type":58,"value":1379}," new",{"type":52,"tag":80,"props":1381,"children":1382},{"style":256},[1383],{"type":58,"value":452},{"type":52,"tag":80,"props":1385,"children":1386},{"style":181},[1387],{"type":58,"value":795},{"type":52,"tag":80,"props":1389,"children":1390},{"style":103},[1391],{"type":58,"value":697},{"type":52,"tag":80,"props":1393,"children":1394},{"style":181},[1395],{"type":58,"value":1396}," code",{"type":52,"tag":80,"props":1398,"children":1399},{"style":103},[1400],{"type":58,"value":203},{"type":52,"tag":80,"props":1402,"children":1403},{"style":103},[1404],{"type":58,"value":127},{"type":52,"tag":80,"props":1406,"children":1407},{"style":130},[1408],{"type":58,"value":1409},"NOT_FOUND",{"type":52,"tag":80,"props":1411,"children":1412},{"style":103},[1413],{"type":58,"value":138},{"type":52,"tag":80,"props":1415,"children":1416},{"style":103},[1417],{"type":58,"value":117},{"type":52,"tag":80,"props":1419,"children":1420},{"style":181},[1421],{"type":58,"value":1095},{"type":52,"tag":80,"props":1423,"children":1424},{"style":103},[1425],{"type":58,"value":143},{"type":52,"tag":80,"props":1427,"children":1429},{"class":82,"line":1428},27,[1430,1434,1438],{"type":52,"tag":80,"props":1431,"children":1432},{"style":97},[1433],{"type":58,"value":1108},{"type":52,"tag":80,"props":1435,"children":1436},{"style":109},[1437],{"type":58,"value":994},{"type":52,"tag":80,"props":1439,"children":1440},{"style":103},[1441],{"type":58,"value":143},{"type":52,"tag":80,"props":1443,"children":1445},{"class":82,"line":1444},28,[1446,1450,1454],{"type":52,"tag":80,"props":1447,"children":1448},{"style":103},[1449],{"type":58,"value":1125},{"type":52,"tag":80,"props":1451,"children":1452},{"style":109},[1453],{"type":58,"value":1095},{"type":52,"tag":80,"props":1455,"children":1456},{"style":103},[1457],{"type":58,"value":1134},{"type":52,"tag":80,"props":1459,"children":1461},{"class":82,"line":1460},29,[1462,1467,1471,1475,1479,1483,1487,1491,1495,1500],{"type":52,"tag":80,"props":1463,"children":1464},{"style":181},[1465],{"type":58,"value":1466},"    list",{"type":52,"tag":80,"props":1468,"children":1469},{"style":103},[1470],{"type":58,"value":203},{"type":52,"tag":80,"props":1472,"children":1473},{"style":109},[1474],{"type":58,"value":543},{"type":52,"tag":80,"props":1476,"children":1477},{"style":103},[1478],{"type":58,"value":253},{"type":52,"tag":80,"props":1480,"children":1481},{"style":256},[1482],{"type":58,"value":1229},{"type":52,"tag":80,"props":1484,"children":1485},{"style":109},[1486],{"type":58,"value":795},{"type":52,"tag":80,"props":1488,"children":1489},{"style":103},[1490],{"type":58,"value":279},{"type":52,"tag":80,"props":1492,"children":1493},{"style":160},[1494],{"type":58,"value":976},{"type":52,"tag":80,"props":1496,"children":1497},{"style":109},[1498],{"type":58,"value":1499}," posts)",{"type":52,"tag":80,"props":1501,"children":1502},{"style":103},[1503],{"type":58,"value":1134},{"type":52,"tag":80,"props":1505,"children":1507},{"class":82,"line":1506},30,[1508,1513,1517],{"type":52,"tag":80,"props":1509,"children":1510},{"style":103},[1511],{"type":58,"value":1512},"  }",{"type":52,"tag":80,"props":1514,"children":1515},{"style":109},[1516],{"type":58,"value":1095},{"type":52,"tag":80,"props":1518,"children":1519},{"style":103},[1520],{"type":58,"value":1134},{"type":52,"tag":80,"props":1522,"children":1524},{"class":82,"line":1523},31,[1525,1529,1533],{"type":52,"tag":80,"props":1526,"children":1527},{"style":103},[1528],{"type":58,"value":933},{"type":52,"tag":80,"props":1530,"children":1531},{"style":109},[1532],{"type":58,"value":1095},{"type":52,"tag":80,"props":1534,"children":1535},{"style":103},[1536],{"type":58,"value":143},{"type":52,"tag":80,"props":1538,"children":1540},{"class":82,"line":1539},32,[1541],{"type":52,"tag":80,"props":1542,"children":1543},{"emptyLinePlaceholder":150},[1544],{"type":58,"value":153},{"type":52,"tag":80,"props":1546,"children":1548},{"class":82,"line":1547},33,[1549,1553,1558,1563,1567,1572,1577],{"type":52,"tag":80,"props":1550,"children":1551},{"style":97},[1552],{"type":58,"value":313},{"type":52,"tag":80,"props":1554,"children":1555},{"style":160},[1556],{"type":58,"value":1557}," type",{"type":52,"tag":80,"props":1559,"children":1560},{"style":166},[1561],{"type":58,"value":1562}," AppRouter",{"type":52,"tag":80,"props":1564,"children":1565},{"style":103},[1566],{"type":58,"value":174},{"type":52,"tag":80,"props":1568,"children":1569},{"style":103},[1570],{"type":58,"value":1571}," typeof",{"type":52,"tag":80,"props":1573,"children":1574},{"style":109},[1575],{"type":58,"value":1576}," appRouter",{"type":52,"tag":80,"props":1578,"children":1579},{"style":103},[1580],{"type":58,"value":143},{"type":52,"tag":80,"props":1582,"children":1584},{"class":82,"line":1583},34,[1585,1589,1593,1598,1602,1606,1611],{"type":52,"tag":80,"props":1586,"children":1587},{"style":97},[1588],{"type":58,"value":313},{"type":52,"tag":80,"props":1590,"children":1591},{"style":160},[1592],{"type":58,"value":318},{"type":52,"tag":80,"props":1594,"children":1595},{"style":109},[1596],{"type":58,"value":1597}," createCaller ",{"type":52,"tag":80,"props":1599,"children":1600},{"style":103},[1601],{"type":58,"value":244},{"type":52,"tag":80,"props":1603,"children":1604},{"style":256},[1605],{"type":58,"value":533},{"type":52,"tag":80,"props":1607,"children":1608},{"style":109},[1609],{"type":58,"value":1610},"(appRouter)",{"type":52,"tag":80,"props":1612,"children":1613},{"style":103},[1614],{"type":58,"value":143},{"type":52,"tag":68,"props":1616,"children":1618},{"className":70,"code":1617,"language":72,"meta":73,"style":73},"\u002F\u002F usage\nimport { createCaller } from '.\u002FappRouter';\n\nconst caller = createCaller({ user: { id: '1' } });\nconst postList = await caller.post.list();\nconst newPost = await caller.post.add({ title: 'New post' });\n",[1619],{"type":52,"tag":76,"props":1620,"children":1621},{"__ignoreMap":73},[1622,1630,1671,1678,1754,1805],{"type":52,"tag":80,"props":1623,"children":1624},{"class":82,"line":83},[1625],{"type":52,"tag":80,"props":1626,"children":1627},{"style":87},[1628],{"type":58,"value":1629},"\u002F\u002F usage\n",{"type":52,"tag":80,"props":1631,"children":1632},{"class":82,"line":93},[1633,1637,1641,1646,1650,1654,1658,1663,1667],{"type":52,"tag":80,"props":1634,"children":1635},{"style":97},[1636],{"type":58,"value":100},{"type":52,"tag":80,"props":1638,"children":1639},{"style":103},[1640],{"type":58,"value":106},{"type":52,"tag":80,"props":1642,"children":1643},{"style":109},[1644],{"type":58,"value":1645}," createCaller",{"type":52,"tag":80,"props":1647,"children":1648},{"style":103},[1649],{"type":58,"value":117},{"type":52,"tag":80,"props":1651,"children":1652},{"style":97},[1653],{"type":58,"value":122},{"type":52,"tag":80,"props":1655,"children":1656},{"style":103},[1657],{"type":58,"value":127},{"type":52,"tag":80,"props":1659,"children":1660},{"style":130},[1661],{"type":58,"value":1662},".\u002FappRouter",{"type":52,"tag":80,"props":1664,"children":1665},{"style":103},[1666],{"type":58,"value":138},{"type":52,"tag":80,"props":1668,"children":1669},{"style":103},[1670],{"type":58,"value":143},{"type":52,"tag":80,"props":1672,"children":1673},{"class":82,"line":146},[1674],{"type":52,"tag":80,"props":1675,"children":1676},{"emptyLinePlaceholder":150},[1677],{"type":58,"value":153},{"type":52,"tag":80,"props":1679,"children":1680},{"class":82,"line":156},[1681,1685,1690,1694,1698,1702,1706,1710,1714,1718,1722,1726,1730,1734,1738,1742,1746,1750],{"type":52,"tag":80,"props":1682,"children":1683},{"style":160},[1684],{"type":58,"value":234},{"type":52,"tag":80,"props":1686,"children":1687},{"style":109},[1688],{"type":58,"value":1689}," caller ",{"type":52,"tag":80,"props":1691,"children":1692},{"style":103},[1693],{"type":58,"value":244},{"type":52,"tag":80,"props":1695,"children":1696},{"style":256},[1697],{"type":58,"value":1645},{"type":52,"tag":80,"props":1699,"children":1700},{"style":109},[1701],{"type":58,"value":795},{"type":52,"tag":80,"props":1703,"children":1704},{"style":103},[1705],{"type":58,"value":697},{"type":52,"tag":80,"props":1707,"children":1708},{"style":181},[1709],{"type":58,"value":184},{"type":52,"tag":80,"props":1711,"children":1712},{"style":103},[1713],{"type":58,"value":203},{"type":52,"tag":80,"props":1715,"children":1716},{"style":103},[1717],{"type":58,"value":106},{"type":52,"tag":80,"props":1719,"children":1720},{"style":181},[1721],{"type":58,"value":198},{"type":52,"tag":80,"props":1723,"children":1724},{"style":103},[1725],{"type":58,"value":203},{"type":52,"tag":80,"props":1727,"children":1728},{"style":103},[1729],{"type":58,"value":127},{"type":52,"tag":80,"props":1731,"children":1732},{"style":130},[1733],{"type":58,"value":714},{"type":52,"tag":80,"props":1735,"children":1736},{"style":103},[1737],{"type":58,"value":138},{"type":52,"tag":80,"props":1739,"children":1740},{"style":103},[1741],{"type":58,"value":117},{"type":52,"tag":80,"props":1743,"children":1744},{"style":103},[1745],{"type":58,"value":117},{"type":52,"tag":80,"props":1747,"children":1748},{"style":109},[1749],{"type":58,"value":1095},{"type":52,"tag":80,"props":1751,"children":1752},{"style":103},[1753],{"type":58,"value":143},{"type":52,"tag":80,"props":1755,"children":1756},{"class":82,"line":220},[1757,1761,1766,1770,1775,1780,1784,1788,1792,1797,1801],{"type":52,"tag":80,"props":1758,"children":1759},{"style":160},[1760],{"type":58,"value":234},{"type":52,"tag":80,"props":1762,"children":1763},{"style":109},[1764],{"type":58,"value":1765}," postList ",{"type":52,"tag":80,"props":1767,"children":1768},{"style":103},[1769],{"type":58,"value":244},{"type":52,"tag":80,"props":1771,"children":1772},{"style":97},[1773],{"type":58,"value":1774}," await",{"type":52,"tag":80,"props":1776,"children":1777},{"style":109},[1778],{"type":58,"value":1779}," caller",{"type":52,"tag":80,"props":1781,"children":1782},{"style":103},[1783],{"type":58,"value":253},{"type":52,"tag":80,"props":1785,"children":1786},{"style":109},[1787],{"type":58,"value":1090},{"type":52,"tag":80,"props":1789,"children":1790},{"style":103},[1791],{"type":58,"value":253},{"type":52,"tag":80,"props":1793,"children":1794},{"style":256},[1795],{"type":58,"value":1796},"list",{"type":52,"tag":80,"props":1798,"children":1799},{"style":109},[1800],{"type":58,"value":279},{"type":52,"tag":80,"props":1802,"children":1803},{"style":103},[1804],{"type":58,"value":143},{"type":52,"tag":80,"props":1806,"children":1807},{"class":82,"line":228},[1808,1812,1817,1821,1825,1829,1833,1837,1841,1846,1850,1854,1858,1862,1866,1871,1875,1879,1883],{"type":52,"tag":80,"props":1809,"children":1810},{"style":160},[1811],{"type":58,"value":234},{"type":52,"tag":80,"props":1813,"children":1814},{"style":109},[1815],{"type":58,"value":1816}," newPost ",{"type":52,"tag":80,"props":1818,"children":1819},{"style":103},[1820],{"type":58,"value":244},{"type":52,"tag":80,"props":1822,"children":1823},{"style":97},[1824],{"type":58,"value":1774},{"type":52,"tag":80,"props":1826,"children":1827},{"style":109},[1828],{"type":58,"value":1779},{"type":52,"tag":80,"props":1830,"children":1831},{"style":103},[1832],{"type":58,"value":253},{"type":52,"tag":80,"props":1834,"children":1835},{"style":109},[1836],{"type":58,"value":1090},{"type":52,"tag":80,"props":1838,"children":1839},{"style":103},[1840],{"type":58,"value":253},{"type":52,"tag":80,"props":1842,"children":1843},{"style":256},[1844],{"type":58,"value":1845},"add",{"type":52,"tag":80,"props":1847,"children":1848},{"style":109},[1849],{"type":58,"value":795},{"type":52,"tag":80,"props":1851,"children":1852},{"style":103},[1853],{"type":58,"value":697},{"type":52,"tag":80,"props":1855,"children":1856},{"style":181},[1857],{"type":58,"value":727},{"type":52,"tag":80,"props":1859,"children":1860},{"style":103},[1861],{"type":58,"value":203},{"type":52,"tag":80,"props":1863,"children":1864},{"style":103},[1865],{"type":58,"value":127},{"type":52,"tag":80,"props":1867,"children":1868},{"style":130},[1869],{"type":58,"value":1870},"New post",{"type":52,"tag":80,"props":1872,"children":1873},{"style":103},[1874],{"type":58,"value":138},{"type":52,"tag":80,"props":1876,"children":1877},{"style":103},[1878],{"type":58,"value":117},{"type":52,"tag":80,"props":1880,"children":1881},{"style":109},[1882],{"type":58,"value":1095},{"type":52,"tag":80,"props":1884,"children":1885},{"style":103},[1886],{"type":58,"value":143},{"type":52,"tag":61,"props":1888,"children":1890},{"id":1889},"core-patterns",[1891],{"type":58,"value":1892},"Core Patterns",{"type":52,"tag":1894,"props":1895,"children":1897},"h3",{"id":1896},"integration-test-with-createcallerfactory",[1898],{"type":58,"value":1899},"Integration test with createCallerFactory",{"type":52,"tag":68,"props":1901,"children":1903},{"className":70,"code":1902,"language":72,"meta":73,"style":73},"\u002F\u002F server\u002FappRouter.test.ts\nimport type { inferProcedureInput } from '@trpc\u002Fserver';\nimport { createCaller } from '.\u002FappRouter';\nimport type { AppRouter } from '.\u002FappRouter';\nimport { createContextInner } from '.\u002Fcontext';\n\nasync function testAddAndGetPost() {\n  const ctx = await createContextInner({ user: undefined });\n  const caller = createCaller(ctx);\n\n  const input: inferProcedureInput\u003CAppRouter['post']['add']> = {\n    title: 'Test post',\n  };\n\n  const post = await caller.post.add(input);\n  const allPosts = await caller.post.list();\n\n  console.assert(allPosts.some((p) => p.id === post.id));\n}\n",[1904],{"type":52,"tag":76,"props":1905,"children":1906},{"__ignoreMap":73},[1907,1915,1959,1998,2041,2082,2089,2115,2173,2209,2216,2294,2323,2331,2338,2393,2441,2448,2540],{"type":52,"tag":80,"props":1908,"children":1909},{"class":82,"line":83},[1910],{"type":52,"tag":80,"props":1911,"children":1912},{"style":87},[1913],{"type":58,"value":1914},"\u002F\u002F server\u002FappRouter.test.ts\n",{"type":52,"tag":80,"props":1916,"children":1917},{"class":82,"line":93},[1918,1922,1926,1930,1935,1939,1943,1947,1951,1955],{"type":52,"tag":80,"props":1919,"children":1920},{"style":97},[1921],{"type":58,"value":100},{"type":52,"tag":80,"props":1923,"children":1924},{"style":97},[1925],{"type":58,"value":1557},{"type":52,"tag":80,"props":1927,"children":1928},{"style":103},[1929],{"type":58,"value":106},{"type":52,"tag":80,"props":1931,"children":1932},{"style":109},[1933],{"type":58,"value":1934}," inferProcedureInput",{"type":52,"tag":80,"props":1936,"children":1937},{"style":103},[1938],{"type":58,"value":117},{"type":52,"tag":80,"props":1940,"children":1941},{"style":97},[1942],{"type":58,"value":122},{"type":52,"tag":80,"props":1944,"children":1945},{"style":103},[1946],{"type":58,"value":127},{"type":52,"tag":80,"props":1948,"children":1949},{"style":130},[1950],{"type":58,"value":133},{"type":52,"tag":80,"props":1952,"children":1953},{"style":103},[1954],{"type":58,"value":138},{"type":52,"tag":80,"props":1956,"children":1957},{"style":103},[1958],{"type":58,"value":143},{"type":52,"tag":80,"props":1960,"children":1961},{"class":82,"line":146},[1962,1966,1970,1974,1978,1982,1986,1990,1994],{"type":52,"tag":80,"props":1963,"children":1964},{"style":97},[1965],{"type":58,"value":100},{"type":52,"tag":80,"props":1967,"children":1968},{"style":103},[1969],{"type":58,"value":106},{"type":52,"tag":80,"props":1971,"children":1972},{"style":109},[1973],{"type":58,"value":1645},{"type":52,"tag":80,"props":1975,"children":1976},{"style":103},[1977],{"type":58,"value":117},{"type":52,"tag":80,"props":1979,"children":1980},{"style":97},[1981],{"type":58,"value":122},{"type":52,"tag":80,"props":1983,"children":1984},{"style":103},[1985],{"type":58,"value":127},{"type":52,"tag":80,"props":1987,"children":1988},{"style":130},[1989],{"type":58,"value":1662},{"type":52,"tag":80,"props":1991,"children":1992},{"style":103},[1993],{"type":58,"value":138},{"type":52,"tag":80,"props":1995,"children":1996},{"style":103},[1997],{"type":58,"value":143},{"type":52,"tag":80,"props":1999,"children":2000},{"class":82,"line":156},[2001,2005,2009,2013,2017,2021,2025,2029,2033,2037],{"type":52,"tag":80,"props":2002,"children":2003},{"style":97},[2004],{"type":58,"value":100},{"type":52,"tag":80,"props":2006,"children":2007},{"style":97},[2008],{"type":58,"value":1557},{"type":52,"tag":80,"props":2010,"children":2011},{"style":103},[2012],{"type":58,"value":106},{"type":52,"tag":80,"props":2014,"children":2015},{"style":109},[2016],{"type":58,"value":1562},{"type":52,"tag":80,"props":2018,"children":2019},{"style":103},[2020],{"type":58,"value":117},{"type":52,"tag":80,"props":2022,"children":2023},{"style":97},[2024],{"type":58,"value":122},{"type":52,"tag":80,"props":2026,"children":2027},{"style":103},[2028],{"type":58,"value":127},{"type":52,"tag":80,"props":2030,"children":2031},{"style":130},[2032],{"type":58,"value":1662},{"type":52,"tag":80,"props":2034,"children":2035},{"style":103},[2036],{"type":58,"value":138},{"type":52,"tag":80,"props":2038,"children":2039},{"style":103},[2040],{"type":58,"value":143},{"type":52,"tag":80,"props":2042,"children":2043},{"class":82,"line":220},[2044,2048,2052,2057,2061,2065,2069,2074,2078],{"type":52,"tag":80,"props":2045,"children":2046},{"style":97},[2047],{"type":58,"value":100},{"type":52,"tag":80,"props":2049,"children":2050},{"style":103},[2051],{"type":58,"value":106},{"type":52,"tag":80,"props":2053,"children":2054},{"style":109},[2055],{"type":58,"value":2056}," createContextInner",{"type":52,"tag":80,"props":2058,"children":2059},{"style":103},[2060],{"type":58,"value":117},{"type":52,"tag":80,"props":2062,"children":2063},{"style":97},[2064],{"type":58,"value":122},{"type":52,"tag":80,"props":2066,"children":2067},{"style":103},[2068],{"type":58,"value":127},{"type":52,"tag":80,"props":2070,"children":2071},{"style":130},[2072],{"type":58,"value":2073},".\u002Fcontext",{"type":52,"tag":80,"props":2075,"children":2076},{"style":103},[2077],{"type":58,"value":138},{"type":52,"tag":80,"props":2079,"children":2080},{"style":103},[2081],{"type":58,"value":143},{"type":52,"tag":80,"props":2083,"children":2084},{"class":82,"line":228},[2085],{"type":52,"tag":80,"props":2086,"children":2087},{"emptyLinePlaceholder":150},[2088],{"type":58,"value":153},{"type":52,"tag":80,"props":2090,"children":2091},{"class":82,"line":299},[2092,2097,2102,2107,2111],{"type":52,"tag":80,"props":2093,"children":2094},{"style":160},[2095],{"type":58,"value":2096},"async",{"type":52,"tag":80,"props":2098,"children":2099},{"style":160},[2100],{"type":58,"value":2101}," function",{"type":52,"tag":80,"props":2103,"children":2104},{"style":256},[2105],{"type":58,"value":2106}," testAddAndGetPost",{"type":52,"tag":80,"props":2108,"children":2109},{"style":103},[2110],{"type":58,"value":279},{"type":52,"tag":80,"props":2112,"children":2113},{"style":103},[2114],{"type":58,"value":602},{"type":52,"tag":80,"props":2116,"children":2117},{"class":82,"line":307},[2118,2123,2128,2132,2136,2140,2144,2148,2152,2156,2161,2165,2169],{"type":52,"tag":80,"props":2119,"children":2120},{"style":160},[2121],{"type":58,"value":2122},"  const",{"type":52,"tag":80,"props":2124,"children":2125},{"style":109},[2126],{"type":58,"value":2127}," ctx",{"type":52,"tag":80,"props":2129,"children":2130},{"style":103},[2131],{"type":58,"value":174},{"type":52,"tag":80,"props":2133,"children":2134},{"style":97},[2135],{"type":58,"value":1774},{"type":52,"tag":80,"props":2137,"children":2138},{"style":256},[2139],{"type":58,"value":2056},{"type":52,"tag":80,"props":2141,"children":2142},{"style":181},[2143],{"type":58,"value":795},{"type":52,"tag":80,"props":2145,"children":2146},{"style":103},[2147],{"type":58,"value":697},{"type":52,"tag":80,"props":2149,"children":2150},{"style":181},[2151],{"type":58,"value":184},{"type":52,"tag":80,"props":2153,"children":2154},{"style":103},[2155],{"type":58,"value":203},{"type":52,"tag":80,"props":2157,"children":2158},{"style":103},[2159],{"type":58,"value":2160}," undefined",{"type":52,"tag":80,"props":2162,"children":2163},{"style":103},[2164],{"type":58,"value":117},{"type":52,"tag":80,"props":2166,"children":2167},{"style":181},[2168],{"type":58,"value":1095},{"type":52,"tag":80,"props":2170,"children":2171},{"style":103},[2172],{"type":58,"value":143},{"type":52,"tag":80,"props":2174,"children":2175},{"class":82,"line":348},[2176,2180,2184,2188,2192,2196,2201,2205],{"type":52,"tag":80,"props":2177,"children":2178},{"style":160},[2179],{"type":58,"value":2122},{"type":52,"tag":80,"props":2181,"children":2182},{"style":109},[2183],{"type":58,"value":1779},{"type":52,"tag":80,"props":2185,"children":2186},{"style":103},[2187],{"type":58,"value":174},{"type":52,"tag":80,"props":2189,"children":2190},{"style":256},[2191],{"type":58,"value":1645},{"type":52,"tag":80,"props":2193,"children":2194},{"style":181},[2195],{"type":58,"value":795},{"type":52,"tag":80,"props":2197,"children":2198},{"style":109},[2199],{"type":58,"value":2200},"ctx",{"type":52,"tag":80,"props":2202,"children":2203},{"style":181},[2204],{"type":58,"value":1095},{"type":52,"tag":80,"props":2206,"children":2207},{"style":103},[2208],{"type":58,"value":143},{"type":52,"tag":80,"props":2210,"children":2211},{"class":82,"line":386},[2212],{"type":52,"tag":80,"props":2213,"children":2214},{"emptyLinePlaceholder":150},[2215],{"type":58,"value":153},{"type":52,"tag":80,"props":2217,"children":2218},{"class":82,"line":660},[2219,2223,2227,2231,2235,2239,2244,2249,2253,2257,2261,2266,2270,2274,2278,2282,2286,2290],{"type":52,"tag":80,"props":2220,"children":2221},{"style":160},[2222],{"type":58,"value":2122},{"type":52,"tag":80,"props":2224,"children":2225},{"style":109},[2226],{"type":58,"value":966},{"type":52,"tag":80,"props":2228,"children":2229},{"style":103},[2230],{"type":58,"value":203},{"type":52,"tag":80,"props":2232,"children":2233},{"style":166},[2234],{"type":58,"value":1934},{"type":52,"tag":80,"props":2236,"children":2237},{"style":103},[2238],{"type":58,"value":264},{"type":52,"tag":80,"props":2240,"children":2241},{"style":166},[2242],{"type":58,"value":2243},"AppRouter",{"type":52,"tag":80,"props":2245,"children":2246},{"style":181},[2247],{"type":58,"value":2248},"[",{"type":52,"tag":80,"props":2250,"children":2251},{"style":103},[2252],{"type":58,"value":138},{"type":52,"tag":80,"props":2254,"children":2255},{"style":130},[2256],{"type":58,"value":1090},{"type":52,"tag":80,"props":2258,"children":2259},{"style":103},[2260],{"type":58,"value":138},{"type":52,"tag":80,"props":2262,"children":2263},{"style":181},[2264],{"type":58,"value":2265},"][",{"type":52,"tag":80,"props":2267,"children":2268},{"style":103},[2269],{"type":58,"value":138},{"type":52,"tag":80,"props":2271,"children":2272},{"style":130},[2273],{"type":58,"value":1845},{"type":52,"tag":80,"props":2275,"children":2276},{"style":103},[2277],{"type":58,"value":138},{"type":52,"tag":80,"props":2279,"children":2280},{"style":181},[2281],{"type":58,"value":753},{"type":52,"tag":80,"props":2283,"children":2284},{"style":103},[2285],{"type":58,"value":274},{"type":52,"tag":80,"props":2287,"children":2288},{"style":103},[2289],{"type":58,"value":174},{"type":52,"tag":80,"props":2291,"children":2292},{"style":103},[2293],{"type":58,"value":602},{"type":52,"tag":80,"props":2295,"children":2296},{"class":82,"line":760},[2297,2302,2306,2310,2315,2319],{"type":52,"tag":80,"props":2298,"children":2299},{"style":181},[2300],{"type":58,"value":2301},"    title",{"type":52,"tag":80,"props":2303,"children":2304},{"style":103},[2305],{"type":58,"value":203},{"type":52,"tag":80,"props":2307,"children":2308},{"style":103},[2309],{"type":58,"value":127},{"type":52,"tag":80,"props":2311,"children":2312},{"style":130},[2313],{"type":58,"value":2314},"Test post",{"type":52,"tag":80,"props":2316,"children":2317},{"style":103},[2318],{"type":58,"value":138},{"type":52,"tag":80,"props":2320,"children":2321},{"style":103},[2322],{"type":58,"value":1134},{"type":52,"tag":80,"props":2324,"children":2325},{"class":82,"line":768},[2326],{"type":52,"tag":80,"props":2327,"children":2328},{"style":103},[2329],{"type":58,"value":2330},"  };\n",{"type":52,"tag":80,"props":2332,"children":2333},{"class":82,"line":803},[2334],{"type":52,"tag":80,"props":2335,"children":2336},{"emptyLinePlaceholder":150},[2337],{"type":58,"value":153},{"type":52,"tag":80,"props":2339,"children":2340},{"class":82,"line":828},[2341,2345,2349,2353,2357,2361,2365,2369,2373,2377,2381,2385,2389],{"type":52,"tag":80,"props":2342,"children":2343},{"style":160},[2344],{"type":58,"value":2122},{"type":52,"tag":80,"props":2346,"children":2347},{"style":109},[2348],{"type":58,"value":994},{"type":52,"tag":80,"props":2350,"children":2351},{"style":103},[2352],{"type":58,"value":174},{"type":52,"tag":80,"props":2354,"children":2355},{"style":97},[2356],{"type":58,"value":1774},{"type":52,"tag":80,"props":2358,"children":2359},{"style":109},[2360],{"type":58,"value":1779},{"type":52,"tag":80,"props":2362,"children":2363},{"style":103},[2364],{"type":58,"value":253},{"type":52,"tag":80,"props":2366,"children":2367},{"style":109},[2368],{"type":58,"value":1090},{"type":52,"tag":80,"props":2370,"children":2371},{"style":103},[2372],{"type":58,"value":253},{"type":52,"tag":80,"props":2374,"children":2375},{"style":256},[2376],{"type":58,"value":1845},{"type":52,"tag":80,"props":2378,"children":2379},{"style":181},[2380],{"type":58,"value":795},{"type":52,"tag":80,"props":2382,"children":2383},{"style":109},[2384],{"type":58,"value":857},{"type":52,"tag":80,"props":2386,"children":2387},{"style":181},[2388],{"type":58,"value":1095},{"type":52,"tag":80,"props":2390,"children":2391},{"style":103},[2392],{"type":58,"value":143},{"type":52,"tag":80,"props":2394,"children":2395},{"class":82,"line":846},[2396,2400,2405,2409,2413,2417,2421,2425,2429,2433,2437],{"type":52,"tag":80,"props":2397,"children":2398},{"style":160},[2399],{"type":58,"value":2122},{"type":52,"tag":80,"props":2401,"children":2402},{"style":109},[2403],{"type":58,"value":2404}," allPosts",{"type":52,"tag":80,"props":2406,"children":2407},{"style":103},[2408],{"type":58,"value":174},{"type":52,"tag":80,"props":2410,"children":2411},{"style":97},[2412],{"type":58,"value":1774},{"type":52,"tag":80,"props":2414,"children":2415},{"style":109},[2416],{"type":58,"value":1779},{"type":52,"tag":80,"props":2418,"children":2419},{"style":103},[2420],{"type":58,"value":253},{"type":52,"tag":80,"props":2422,"children":2423},{"style":109},[2424],{"type":58,"value":1090},{"type":52,"tag":80,"props":2426,"children":2427},{"style":103},[2428],{"type":58,"value":253},{"type":52,"tag":80,"props":2430,"children":2431},{"style":256},[2432],{"type":58,"value":1796},{"type":52,"tag":80,"props":2434,"children":2435},{"style":181},[2436],{"type":58,"value":279},{"type":52,"tag":80,"props":2438,"children":2439},{"style":103},[2440],{"type":58,"value":143},{"type":52,"tag":80,"props":2442,"children":2443},{"class":82,"line":941},[2444],{"type":52,"tag":80,"props":2445,"children":2446},{"emptyLinePlaceholder":150},[2447],{"type":58,"value":153},{"type":52,"tag":80,"props":2449,"children":2450},{"class":82,"line":983},[2451,2456,2460,2465,2469,2474,2478,2483,2487,2491,2495,2499,2503,2507,2511,2515,2519,2523,2527,2531,2536],{"type":52,"tag":80,"props":2452,"children":2453},{"style":109},[2454],{"type":58,"value":2455},"  console",{"type":52,"tag":80,"props":2457,"children":2458},{"style":103},[2459],{"type":58,"value":253},{"type":52,"tag":80,"props":2461,"children":2462},{"style":256},[2463],{"type":58,"value":2464},"assert",{"type":52,"tag":80,"props":2466,"children":2467},{"style":181},[2468],{"type":58,"value":795},{"type":52,"tag":80,"props":2470,"children":2471},{"style":109},[2472],{"type":58,"value":2473},"allPosts",{"type":52,"tag":80,"props":2475,"children":2476},{"style":103},[2477],{"type":58,"value":253},{"type":52,"tag":80,"props":2479,"children":2480},{"style":256},[2481],{"type":58,"value":2482},"some",{"type":52,"tag":80,"props":2484,"children":2485},{"style":181},[2486],{"type":58,"value":795},{"type":52,"tag":80,"props":2488,"children":2489},{"style":103},[2490],{"type":58,"value":795},{"type":52,"tag":80,"props":2492,"children":2493},{"style":963},[2494],{"type":58,"value":1295},{"type":52,"tag":80,"props":2496,"children":2497},{"style":103},[2498],{"type":58,"value":1095},{"type":52,"tag":80,"props":2500,"children":2501},{"style":160},[2502],{"type":58,"value":976},{"type":52,"tag":80,"props":2504,"children":2505},{"style":109},[2506],{"type":58,"value":1308},{"type":52,"tag":80,"props":2508,"children":2509},{"style":103},[2510],{"type":58,"value":253},{"type":52,"tag":80,"props":2512,"children":2513},{"style":109},[2514],{"type":58,"value":1317},{"type":52,"tag":80,"props":2516,"children":2517},{"style":103},[2518],{"type":58,"value":1322},{"type":52,"tag":80,"props":2520,"children":2521},{"style":109},[2522],{"type":58,"value":994},{"type":52,"tag":80,"props":2524,"children":2525},{"style":103},[2526],{"type":58,"value":253},{"type":52,"tag":80,"props":2528,"children":2529},{"style":109},[2530],{"type":58,"value":1317},{"type":52,"tag":80,"props":2532,"children":2533},{"style":181},[2534],{"type":58,"value":2535},"))",{"type":52,"tag":80,"props":2537,"children":2538},{"style":103},[2539],{"type":58,"value":143},{"type":52,"tag":80,"props":2541,"children":2542},{"class":82,"line":1066},[2543],{"type":52,"tag":80,"props":2544,"children":2545},{"style":103},[2546],{"type":58,"value":650},{"type":52,"tag":1894,"props":2548,"children":2550},{"id":2549},"using-routercreatecaller-directly",[2551],{"type":58,"value":2552},"Using router.createCaller() directly",{"type":52,"tag":68,"props":2554,"children":2556},{"className":70,"code":2555,"language":72,"meta":73,"style":73},"import { initTRPC } from '@trpc\u002Fserver';\nimport { z } from 'zod';\n\nconst t = initTRPC.create();\n\nconst appRouter = t.router({\n  greeting: t.procedure\n    .input(z.object({ name: z.string() }))\n    .query(({ input }) => `Hello ${input.name}`),\n});\n\nconst caller = appRouter.createCaller({});\nconst result = await caller.greeting({ name: 'tRPC' });\n",[2557],{"type":52,"tag":76,"props":2558,"children":2559},{"__ignoreMap":73},[2560,2599,2638,2645,2680,2687,2722,2747,2812,2883,2898,2905,2950],{"type":52,"tag":80,"props":2561,"children":2562},{"class":82,"line":83},[2563,2567,2571,2575,2579,2583,2587,2591,2595],{"type":52,"tag":80,"props":2564,"children":2565},{"style":97},[2566],{"type":58,"value":100},{"type":52,"tag":80,"props":2568,"children":2569},{"style":103},[2570],{"type":58,"value":106},{"type":52,"tag":80,"props":2572,"children":2573},{"style":109},[2574],{"type":58,"value":112},{"type":52,"tag":80,"props":2576,"children":2577},{"style":103},[2578],{"type":58,"value":117},{"type":52,"tag":80,"props":2580,"children":2581},{"style":97},[2582],{"type":58,"value":122},{"type":52,"tag":80,"props":2584,"children":2585},{"style":103},[2586],{"type":58,"value":127},{"type":52,"tag":80,"props":2588,"children":2589},{"style":130},[2590],{"type":58,"value":133},{"type":52,"tag":80,"props":2592,"children":2593},{"style":103},[2594],{"type":58,"value":138},{"type":52,"tag":80,"props":2596,"children":2597},{"style":103},[2598],{"type":58,"value":143},{"type":52,"tag":80,"props":2600,"children":2601},{"class":82,"line":93},[2602,2606,2610,2614,2618,2622,2626,2630,2634],{"type":52,"tag":80,"props":2603,"children":2604},{"style":97},[2605],{"type":58,"value":100},{"type":52,"tag":80,"props":2607,"children":2608},{"style":103},[2609],{"type":58,"value":106},{"type":52,"tag":80,"props":2611,"children":2612},{"style":109},[2613],{"type":58,"value":492},{"type":52,"tag":80,"props":2615,"children":2616},{"style":103},[2617],{"type":58,"value":117},{"type":52,"tag":80,"props":2619,"children":2620},{"style":97},[2621],{"type":58,"value":122},{"type":52,"tag":80,"props":2623,"children":2624},{"style":103},[2625],{"type":58,"value":127},{"type":52,"tag":80,"props":2627,"children":2628},{"style":130},[2629],{"type":58,"value":509},{"type":52,"tag":80,"props":2631,"children":2632},{"style":103},[2633],{"type":58,"value":138},{"type":52,"tag":80,"props":2635,"children":2636},{"style":103},[2637],{"type":58,"value":143},{"type":52,"tag":80,"props":2639,"children":2640},{"class":82,"line":146},[2641],{"type":52,"tag":80,"props":2642,"children":2643},{"emptyLinePlaceholder":150},[2644],{"type":58,"value":153},{"type":52,"tag":80,"props":2646,"children":2647},{"class":82,"line":156},[2648,2652,2656,2660,2664,2668,2672,2676],{"type":52,"tag":80,"props":2649,"children":2650},{"style":160},[2651],{"type":58,"value":234},{"type":52,"tag":80,"props":2653,"children":2654},{"style":109},[2655],{"type":58,"value":239},{"type":52,"tag":80,"props":2657,"children":2658},{"style":103},[2659],{"type":58,"value":244},{"type":52,"tag":80,"props":2661,"children":2662},{"style":109},[2663],{"type":58,"value":112},{"type":52,"tag":80,"props":2665,"children":2666},{"style":103},[2667],{"type":58,"value":253},{"type":52,"tag":80,"props":2669,"children":2670},{"style":256},[2671],{"type":58,"value":288},{"type":52,"tag":80,"props":2673,"children":2674},{"style":109},[2675],{"type":58,"value":279},{"type":52,"tag":80,"props":2677,"children":2678},{"style":103},[2679],{"type":58,"value":143},{"type":52,"tag":80,"props":2681,"children":2682},{"class":82,"line":220},[2683],{"type":52,"tag":80,"props":2684,"children":2685},{"emptyLinePlaceholder":150},[2686],{"type":58,"value":153},{"type":52,"tag":80,"props":2688,"children":2689},{"class":82,"line":228},[2690,2694,2698,2702,2706,2710,2714,2718],{"type":52,"tag":80,"props":2691,"children":2692},{"style":160},[2693],{"type":58,"value":234},{"type":52,"tag":80,"props":2695,"children":2696},{"style":109},[2697],{"type":58,"value":782},{"type":52,"tag":80,"props":2699,"children":2700},{"style":103},[2701],{"type":58,"value":244},{"type":52,"tag":80,"props":2703,"children":2704},{"style":109},[2705],{"type":58,"value":332},{"type":52,"tag":80,"props":2707,"children":2708},{"style":103},[2709],{"type":58,"value":253},{"type":52,"tag":80,"props":2711,"children":2712},{"style":256},[2713],{"type":58,"value":341},{"type":52,"tag":80,"props":2715,"children":2716},{"style":109},[2717],{"type":58,"value":795},{"type":52,"tag":80,"props":2719,"children":2720},{"style":103},[2721],{"type":58,"value":800},{"type":52,"tag":80,"props":2723,"children":2724},{"class":82,"line":299},[2725,2730,2734,2738,2742],{"type":52,"tag":80,"props":2726,"children":2727},{"style":181},[2728],{"type":58,"value":2729},"  greeting",{"type":52,"tag":80,"props":2731,"children":2732},{"style":103},[2733],{"type":58,"value":203},{"type":52,"tag":80,"props":2735,"children":2736},{"style":109},[2737],{"type":58,"value":332},{"type":52,"tag":80,"props":2739,"children":2740},{"style":103},[2741],{"type":58,"value":253},{"type":52,"tag":80,"props":2743,"children":2744},{"style":109},[2745],{"type":58,"value":2746},"procedure\n",{"type":52,"tag":80,"props":2748,"children":2749},{"class":82,"line":307},[2750,2755,2759,2763,2767,2771,2775,2779,2784,2788,2792,2796,2800,2804,2808],{"type":52,"tag":80,"props":2751,"children":2752},{"style":103},[2753],{"type":58,"value":2754},"    .",{"type":52,"tag":80,"props":2756,"children":2757},{"style":256},[2758],{"type":58,"value":857},{"type":52,"tag":80,"props":2760,"children":2761},{"style":109},[2762],{"type":58,"value":862},{"type":52,"tag":80,"props":2764,"children":2765},{"style":103},[2766],{"type":58,"value":253},{"type":52,"tag":80,"props":2768,"children":2769},{"style":256},[2770],{"type":58,"value":871},{"type":52,"tag":80,"props":2772,"children":2773},{"style":109},[2774],{"type":58,"value":795},{"type":52,"tag":80,"props":2776,"children":2777},{"style":103},[2778],{"type":58,"value":697},{"type":52,"tag":80,"props":2780,"children":2781},{"style":181},[2782],{"type":58,"value":2783}," name",{"type":52,"tag":80,"props":2785,"children":2786},{"style":103},[2787],{"type":58,"value":203},{"type":52,"tag":80,"props":2789,"children":2790},{"style":109},[2791],{"type":58,"value":492},{"type":52,"tag":80,"props":2793,"children":2794},{"style":103},[2795],{"type":58,"value":253},{"type":52,"tag":80,"props":2797,"children":2798},{"style":256},[2799],{"type":58,"value":900},{"type":52,"tag":80,"props":2801,"children":2802},{"style":109},[2803],{"type":58,"value":1208},{"type":52,"tag":80,"props":2805,"children":2806},{"style":103},[2807],{"type":58,"value":933},{"type":52,"tag":80,"props":2809,"children":2810},{"style":109},[2811],{"type":58,"value":938},{"type":52,"tag":80,"props":2813,"children":2814},{"class":82,"line":348},[2815,2819,2823,2827,2831,2835,2839,2843,2848,2853,2858,2862,2866,2871,2875,2879],{"type":52,"tag":80,"props":2816,"children":2817},{"style":103},[2818],{"type":58,"value":2754},{"type":52,"tag":80,"props":2820,"children":2821},{"style":256},[2822],{"type":58,"value":1229},{"type":52,"tag":80,"props":2824,"children":2825},{"style":109},[2826],{"type":58,"value":795},{"type":52,"tag":80,"props":2828,"children":2829},{"style":103},[2830],{"type":58,"value":960},{"type":52,"tag":80,"props":2832,"children":2833},{"style":963},[2834],{"type":58,"value":966},{"type":52,"tag":80,"props":2836,"children":2837},{"style":103},[2838],{"type":58,"value":971},{"type":52,"tag":80,"props":2840,"children":2841},{"style":160},[2842],{"type":58,"value":976},{"type":52,"tag":80,"props":2844,"children":2845},{"style":103},[2846],{"type":58,"value":2847}," `",{"type":52,"tag":80,"props":2849,"children":2850},{"style":130},[2851],{"type":58,"value":2852},"Hello ",{"type":52,"tag":80,"props":2854,"children":2855},{"style":103},[2856],{"type":58,"value":2857},"${",{"type":52,"tag":80,"props":2859,"children":2860},{"style":109},[2861],{"type":58,"value":857},{"type":52,"tag":80,"props":2863,"children":2864},{"style":103},[2865],{"type":58,"value":253},{"type":52,"tag":80,"props":2867,"children":2868},{"style":109},[2869],{"type":58,"value":2870},"name",{"type":52,"tag":80,"props":2872,"children":2873},{"style":103},[2874],{"type":58,"value":1059},{"type":52,"tag":80,"props":2876,"children":2877},{"style":109},[2878],{"type":58,"value":1095},{"type":52,"tag":80,"props":2880,"children":2881},{"style":103},[2882],{"type":58,"value":1134},{"type":52,"tag":80,"props":2884,"children":2885},{"class":82,"line":386},[2886,2890,2894],{"type":52,"tag":80,"props":2887,"children":2888},{"style":103},[2889],{"type":58,"value":933},{"type":52,"tag":80,"props":2891,"children":2892},{"style":109},[2893],{"type":58,"value":1095},{"type":52,"tag":80,"props":2895,"children":2896},{"style":103},[2897],{"type":58,"value":143},{"type":52,"tag":80,"props":2899,"children":2900},{"class":82,"line":660},[2901],{"type":52,"tag":80,"props":2902,"children":2903},{"emptyLinePlaceholder":150},[2904],{"type":58,"value":153},{"type":52,"tag":80,"props":2906,"children":2907},{"class":82,"line":760},[2908,2912,2916,2920,2924,2928,2933,2937,2942,2946],{"type":52,"tag":80,"props":2909,"children":2910},{"style":160},[2911],{"type":58,"value":234},{"type":52,"tag":80,"props":2913,"children":2914},{"style":109},[2915],{"type":58,"value":1689},{"type":52,"tag":80,"props":2917,"children":2918},{"style":103},[2919],{"type":58,"value":244},{"type":52,"tag":80,"props":2921,"children":2922},{"style":109},[2923],{"type":58,"value":1576},{"type":52,"tag":80,"props":2925,"children":2926},{"style":103},[2927],{"type":58,"value":253},{"type":52,"tag":80,"props":2929,"children":2930},{"style":256},[2931],{"type":58,"value":2932},"createCaller",{"type":52,"tag":80,"props":2934,"children":2935},{"style":109},[2936],{"type":58,"value":795},{"type":52,"tag":80,"props":2938,"children":2939},{"style":103},[2940],{"type":58,"value":2941},"{}",{"type":52,"tag":80,"props":2943,"children":2944},{"style":109},[2945],{"type":58,"value":1095},{"type":52,"tag":80,"props":2947,"children":2948},{"style":103},[2949],{"type":58,"value":143},{"type":52,"tag":80,"props":2951,"children":2952},{"class":82,"line":768},[2953,2957,2962,2966,2970,2974,2978,2983,2987,2991,2995,2999,3003,3007,3011,3015,3019],{"type":52,"tag":80,"props":2954,"children":2955},{"style":160},[2956],{"type":58,"value":234},{"type":52,"tag":80,"props":2958,"children":2959},{"style":109},[2960],{"type":58,"value":2961}," result ",{"type":52,"tag":80,"props":2963,"children":2964},{"style":103},[2965],{"type":58,"value":244},{"type":52,"tag":80,"props":2967,"children":2968},{"style":97},[2969],{"type":58,"value":1774},{"type":52,"tag":80,"props":2971,"children":2972},{"style":109},[2973],{"type":58,"value":1779},{"type":52,"tag":80,"props":2975,"children":2976},{"style":103},[2977],{"type":58,"value":253},{"type":52,"tag":80,"props":2979,"children":2980},{"style":256},[2981],{"type":58,"value":2982},"greeting",{"type":52,"tag":80,"props":2984,"children":2985},{"style":109},[2986],{"type":58,"value":795},{"type":52,"tag":80,"props":2988,"children":2989},{"style":103},[2990],{"type":58,"value":697},{"type":52,"tag":80,"props":2992,"children":2993},{"style":181},[2994],{"type":58,"value":2783},{"type":52,"tag":80,"props":2996,"children":2997},{"style":103},[2998],{"type":58,"value":203},{"type":52,"tag":80,"props":3000,"children":3001},{"style":103},[3002],{"type":58,"value":127},{"type":52,"tag":80,"props":3004,"children":3005},{"style":130},[3006],{"type":58,"value":9},{"type":52,"tag":80,"props":3008,"children":3009},{"style":103},[3010],{"type":58,"value":138},{"type":52,"tag":80,"props":3012,"children":3013},{"style":103},[3014],{"type":58,"value":117},{"type":52,"tag":80,"props":3016,"children":3017},{"style":109},[3018],{"type":58,"value":1095},{"type":52,"tag":80,"props":3020,"children":3021},{"style":103},[3022],{"type":58,"value":143},{"type":52,"tag":1894,"props":3024,"children":3026},{"id":3025},"error-handling-in-a-custom-api-endpoint",[3027],{"type":58,"value":3028},"Error handling in a custom API endpoint",{"type":52,"tag":68,"props":3030,"children":3032},{"className":70,"code":3031,"language":72,"meta":73,"style":73},"import { TRPCError } from '@trpc\u002Fserver';\nimport { getHTTPStatusCodeFromError } from '@trpc\u002Fserver\u002Fhttp';\nimport type { NextApiRequest, NextApiResponse } from 'next';\nimport { appRouter } from '.\u002FappRouter';\n\nexport default async function handler(\n  req: NextApiRequest,\n  res: NextApiResponse,\n) {\n  const caller = appRouter.createCaller({});\n\n  try {\n    const post = await caller.post.byId({ id: req.query.id as string });\n    res.status(200).json({ data: { postTitle: post.title } });\n  } catch (cause) {\n    if (cause instanceof TRPCError) {\n      const httpStatusCode = getHTTPStatusCodeFromError(cause);\n      res.status(httpStatusCode).json({ error: { message: cause.message } });\n      return;\n    }\n    res.status(500).json({ error: { message: 'Internal server error' } });\n  }\n}\n",[3033],{"type":52,"tag":76,"props":3034,"children":3035},{"__ignoreMap":73},[3036,3075,3116,3169,3208,3215,3246,3266,3286,3297,3340,3347,3359,3458,3556,3585,3618,3655,3752,3764,3772,3865,3873],{"type":52,"tag":80,"props":3037,"children":3038},{"class":82,"line":83},[3039,3043,3047,3051,3055,3059,3063,3067,3071],{"type":52,"tag":80,"props":3040,"children":3041},{"style":97},[3042],{"type":58,"value":100},{"type":52,"tag":80,"props":3044,"children":3045},{"style":103},[3046],{"type":58,"value":106},{"type":52,"tag":80,"props":3048,"children":3049},{"style":109},[3050],{"type":58,"value":452},{"type":52,"tag":80,"props":3052,"children":3053},{"style":103},[3054],{"type":58,"value":117},{"type":52,"tag":80,"props":3056,"children":3057},{"style":97},[3058],{"type":58,"value":122},{"type":52,"tag":80,"props":3060,"children":3061},{"style":103},[3062],{"type":58,"value":127},{"type":52,"tag":80,"props":3064,"children":3065},{"style":130},[3066],{"type":58,"value":133},{"type":52,"tag":80,"props":3068,"children":3069},{"style":103},[3070],{"type":58,"value":138},{"type":52,"tag":80,"props":3072,"children":3073},{"style":103},[3074],{"type":58,"value":143},{"type":52,"tag":80,"props":3076,"children":3077},{"class":82,"line":93},[3078,3082,3086,3091,3095,3099,3103,3108,3112],{"type":52,"tag":80,"props":3079,"children":3080},{"style":97},[3081],{"type":58,"value":100},{"type":52,"tag":80,"props":3083,"children":3084},{"style":103},[3085],{"type":58,"value":106},{"type":52,"tag":80,"props":3087,"children":3088},{"style":109},[3089],{"type":58,"value":3090}," getHTTPStatusCodeFromError",{"type":52,"tag":80,"props":3092,"children":3093},{"style":103},[3094],{"type":58,"value":117},{"type":52,"tag":80,"props":3096,"children":3097},{"style":97},[3098],{"type":58,"value":122},{"type":52,"tag":80,"props":3100,"children":3101},{"style":103},[3102],{"type":58,"value":127},{"type":52,"tag":80,"props":3104,"children":3105},{"style":130},[3106],{"type":58,"value":3107},"@trpc\u002Fserver\u002Fhttp",{"type":52,"tag":80,"props":3109,"children":3110},{"style":103},[3111],{"type":58,"value":138},{"type":52,"tag":80,"props":3113,"children":3114},{"style":103},[3115],{"type":58,"value":143},{"type":52,"tag":80,"props":3117,"children":3118},{"class":82,"line":146},[3119,3123,3127,3131,3136,3140,3145,3149,3153,3157,3161,3165],{"type":52,"tag":80,"props":3120,"children":3121},{"style":97},[3122],{"type":58,"value":100},{"type":52,"tag":80,"props":3124,"children":3125},{"style":97},[3126],{"type":58,"value":1557},{"type":52,"tag":80,"props":3128,"children":3129},{"style":103},[3130],{"type":58,"value":106},{"type":52,"tag":80,"props":3132,"children":3133},{"style":109},[3134],{"type":58,"value":3135}," NextApiRequest",{"type":52,"tag":80,"props":3137,"children":3138},{"style":103},[3139],{"type":58,"value":538},{"type":52,"tag":80,"props":3141,"children":3142},{"style":109},[3143],{"type":58,"value":3144}," NextApiResponse",{"type":52,"tag":80,"props":3146,"children":3147},{"style":103},[3148],{"type":58,"value":117},{"type":52,"tag":80,"props":3150,"children":3151},{"style":97},[3152],{"type":58,"value":122},{"type":52,"tag":80,"props":3154,"children":3155},{"style":103},[3156],{"type":58,"value":127},{"type":52,"tag":80,"props":3158,"children":3159},{"style":130},[3160],{"type":58,"value":30},{"type":52,"tag":80,"props":3162,"children":3163},{"style":103},[3164],{"type":58,"value":138},{"type":52,"tag":80,"props":3166,"children":3167},{"style":103},[3168],{"type":58,"value":143},{"type":52,"tag":80,"props":3170,"children":3171},{"class":82,"line":156},[3172,3176,3180,3184,3188,3192,3196,3200,3204],{"type":52,"tag":80,"props":3173,"children":3174},{"style":97},[3175],{"type":58,"value":100},{"type":52,"tag":80,"props":3177,"children":3178},{"style":103},[3179],{"type":58,"value":106},{"type":52,"tag":80,"props":3181,"children":3182},{"style":109},[3183],{"type":58,"value":1576},{"type":52,"tag":80,"props":3185,"children":3186},{"style":103},[3187],{"type":58,"value":117},{"type":52,"tag":80,"props":3189,"children":3190},{"style":97},[3191],{"type":58,"value":122},{"type":52,"tag":80,"props":3193,"children":3194},{"style":103},[3195],{"type":58,"value":127},{"type":52,"tag":80,"props":3197,"children":3198},{"style":130},[3199],{"type":58,"value":1662},{"type":52,"tag":80,"props":3201,"children":3202},{"style":103},[3203],{"type":58,"value":138},{"type":52,"tag":80,"props":3205,"children":3206},{"style":103},[3207],{"type":58,"value":143},{"type":52,"tag":80,"props":3209,"children":3210},{"class":82,"line":220},[3211],{"type":52,"tag":80,"props":3212,"children":3213},{"emptyLinePlaceholder":150},[3214],{"type":58,"value":153},{"type":52,"tag":80,"props":3216,"children":3217},{"class":82,"line":228},[3218,3222,3227,3232,3236,3241],{"type":52,"tag":80,"props":3219,"children":3220},{"style":97},[3221],{"type":58,"value":313},{"type":52,"tag":80,"props":3223,"children":3224},{"style":97},[3225],{"type":58,"value":3226}," default",{"type":52,"tag":80,"props":3228,"children":3229},{"style":160},[3230],{"type":58,"value":3231}," async",{"type":52,"tag":80,"props":3233,"children":3234},{"style":160},[3235],{"type":58,"value":2101},{"type":52,"tag":80,"props":3237,"children":3238},{"style":256},[3239],{"type":58,"value":3240}," handler",{"type":52,"tag":80,"props":3242,"children":3243},{"style":103},[3244],{"type":58,"value":3245},"(\n",{"type":52,"tag":80,"props":3247,"children":3248},{"class":82,"line":299},[3249,3254,3258,3262],{"type":52,"tag":80,"props":3250,"children":3251},{"style":963},[3252],{"type":58,"value":3253},"  req",{"type":52,"tag":80,"props":3255,"children":3256},{"style":103},[3257],{"type":58,"value":203},{"type":52,"tag":80,"props":3259,"children":3260},{"style":166},[3261],{"type":58,"value":3135},{"type":52,"tag":80,"props":3263,"children":3264},{"style":103},[3265],{"type":58,"value":1134},{"type":52,"tag":80,"props":3267,"children":3268},{"class":82,"line":307},[3269,3274,3278,3282],{"type":52,"tag":80,"props":3270,"children":3271},{"style":963},[3272],{"type":58,"value":3273},"  res",{"type":52,"tag":80,"props":3275,"children":3276},{"style":103},[3277],{"type":58,"value":203},{"type":52,"tag":80,"props":3279,"children":3280},{"style":166},[3281],{"type":58,"value":3144},{"type":52,"tag":80,"props":3283,"children":3284},{"style":103},[3285],{"type":58,"value":1134},{"type":52,"tag":80,"props":3287,"children":3288},{"class":82,"line":348},[3289,3293],{"type":52,"tag":80,"props":3290,"children":3291},{"style":103},[3292],{"type":58,"value":1095},{"type":52,"tag":80,"props":3294,"children":3295},{"style":103},[3296],{"type":58,"value":602},{"type":52,"tag":80,"props":3298,"children":3299},{"class":82,"line":386},[3300,3304,3308,3312,3316,3320,3324,3328,3332,3336],{"type":52,"tag":80,"props":3301,"children":3302},{"style":160},[3303],{"type":58,"value":2122},{"type":52,"tag":80,"props":3305,"children":3306},{"style":109},[3307],{"type":58,"value":1779},{"type":52,"tag":80,"props":3309,"children":3310},{"style":103},[3311],{"type":58,"value":174},{"type":52,"tag":80,"props":3313,"children":3314},{"style":109},[3315],{"type":58,"value":1576},{"type":52,"tag":80,"props":3317,"children":3318},{"style":103},[3319],{"type":58,"value":253},{"type":52,"tag":80,"props":3321,"children":3322},{"style":256},[3323],{"type":58,"value":2932},{"type":52,"tag":80,"props":3325,"children":3326},{"style":181},[3327],{"type":58,"value":795},{"type":52,"tag":80,"props":3329,"children":3330},{"style":103},[3331],{"type":58,"value":2941},{"type":52,"tag":80,"props":3333,"children":3334},{"style":181},[3335],{"type":58,"value":1095},{"type":52,"tag":80,"props":3337,"children":3338},{"style":103},[3339],{"type":58,"value":143},{"type":52,"tag":80,"props":3341,"children":3342},{"class":82,"line":660},[3343],{"type":52,"tag":80,"props":3344,"children":3345},{"emptyLinePlaceholder":150},[3346],{"type":58,"value":153},{"type":52,"tag":80,"props":3348,"children":3349},{"class":82,"line":760},[3350,3355],{"type":52,"tag":80,"props":3351,"children":3352},{"style":97},[3353],{"type":58,"value":3354},"  try",{"type":52,"tag":80,"props":3356,"children":3357},{"style":103},[3358],{"type":58,"value":602},{"type":52,"tag":80,"props":3360,"children":3361},{"class":82,"line":768},[3362,3367,3371,3375,3379,3383,3387,3391,3395,3400,3404,3408,3412,3416,3421,3425,3429,3433,3437,3442,3446,3450,3454],{"type":52,"tag":80,"props":3363,"children":3364},{"style":160},[3365],{"type":58,"value":3366},"    const",{"type":52,"tag":80,"props":3368,"children":3369},{"style":109},[3370],{"type":58,"value":994},{"type":52,"tag":80,"props":3372,"children":3373},{"style":103},[3374],{"type":58,"value":174},{"type":52,"tag":80,"props":3376,"children":3377},{"style":97},[3378],{"type":58,"value":1774},{"type":52,"tag":80,"props":3380,"children":3381},{"style":109},[3382],{"type":58,"value":1779},{"type":52,"tag":80,"props":3384,"children":3385},{"style":103},[3386],{"type":58,"value":253},{"type":52,"tag":80,"props":3388,"children":3389},{"style":109},[3390],{"type":58,"value":1090},{"type":52,"tag":80,"props":3392,"children":3393},{"style":103},[3394],{"type":58,"value":253},{"type":52,"tag":80,"props":3396,"children":3397},{"style":256},[3398],{"type":58,"value":3399},"byId",{"type":52,"tag":80,"props":3401,"children":3402},{"style":181},[3403],{"type":58,"value":795},{"type":52,"tag":80,"props":3405,"children":3406},{"style":103},[3407],{"type":58,"value":697},{"type":52,"tag":80,"props":3409,"children":3410},{"style":181},[3411],{"type":58,"value":198},{"type":52,"tag":80,"props":3413,"children":3414},{"style":103},[3415],{"type":58,"value":203},{"type":52,"tag":80,"props":3417,"children":3418},{"style":109},[3419],{"type":58,"value":3420}," req",{"type":52,"tag":80,"props":3422,"children":3423},{"style":103},[3424],{"type":58,"value":253},{"type":52,"tag":80,"props":3426,"children":3427},{"style":109},[3428],{"type":58,"value":1229},{"type":52,"tag":80,"props":3430,"children":3431},{"style":103},[3432],{"type":58,"value":253},{"type":52,"tag":80,"props":3434,"children":3435},{"style":109},[3436],{"type":58,"value":1317},{"type":52,"tag":80,"props":3438,"children":3439},{"style":97},[3440],{"type":58,"value":3441}," as",{"type":52,"tag":80,"props":3443,"children":3444},{"style":166},[3445],{"type":58,"value":208},{"type":52,"tag":80,"props":3447,"children":3448},{"style":103},[3449],{"type":58,"value":117},{"type":52,"tag":80,"props":3451,"children":3452},{"style":181},[3453],{"type":58,"value":1095},{"type":52,"tag":80,"props":3455,"children":3456},{"style":103},[3457],{"type":58,"value":143},{"type":52,"tag":80,"props":3459,"children":3460},{"class":82,"line":803},[3461,3466,3470,3475,3479,3484,3488,3492,3497,3501,3505,3510,3514,3518,3523,3527,3531,3535,3540,3544,3548,3552],{"type":52,"tag":80,"props":3462,"children":3463},{"style":109},[3464],{"type":58,"value":3465},"    res",{"type":52,"tag":80,"props":3467,"children":3468},{"style":103},[3469],{"type":58,"value":253},{"type":52,"tag":80,"props":3471,"children":3472},{"style":256},[3473],{"type":58,"value":3474},"status",{"type":52,"tag":80,"props":3476,"children":3477},{"style":181},[3478],{"type":58,"value":795},{"type":52,"tag":80,"props":3480,"children":3481},{"style":920},[3482],{"type":58,"value":3483},"200",{"type":52,"tag":80,"props":3485,"children":3486},{"style":181},[3487],{"type":58,"value":1095},{"type":52,"tag":80,"props":3489,"children":3490},{"style":103},[3491],{"type":58,"value":253},{"type":52,"tag":80,"props":3493,"children":3494},{"style":256},[3495],{"type":58,"value":3496},"json",{"type":52,"tag":80,"props":3498,"children":3499},{"style":181},[3500],{"type":58,"value":795},{"type":52,"tag":80,"props":3502,"children":3503},{"style":103},[3504],{"type":58,"value":697},{"type":52,"tag":80,"props":3506,"children":3507},{"style":181},[3508],{"type":58,"value":3509}," data",{"type":52,"tag":80,"props":3511,"children":3512},{"style":103},[3513],{"type":58,"value":203},{"type":52,"tag":80,"props":3515,"children":3516},{"style":103},[3517],{"type":58,"value":106},{"type":52,"tag":80,"props":3519,"children":3520},{"style":181},[3521],{"type":58,"value":3522}," postTitle",{"type":52,"tag":80,"props":3524,"children":3525},{"style":103},[3526],{"type":58,"value":203},{"type":52,"tag":80,"props":3528,"children":3529},{"style":109},[3530],{"type":58,"value":994},{"type":52,"tag":80,"props":3532,"children":3533},{"style":103},[3534],{"type":58,"value":253},{"type":52,"tag":80,"props":3536,"children":3537},{"style":109},[3538],{"type":58,"value":3539},"title",{"type":52,"tag":80,"props":3541,"children":3542},{"style":103},[3543],{"type":58,"value":117},{"type":52,"tag":80,"props":3545,"children":3546},{"style":103},[3547],{"type":58,"value":117},{"type":52,"tag":80,"props":3549,"children":3550},{"style":181},[3551],{"type":58,"value":1095},{"type":52,"tag":80,"props":3553,"children":3554},{"style":103},[3555],{"type":58,"value":143},{"type":52,"tag":80,"props":3557,"children":3558},{"class":82,"line":828},[3559,3563,3568,3572,3577,3581],{"type":52,"tag":80,"props":3560,"children":3561},{"style":103},[3562],{"type":58,"value":1512},{"type":52,"tag":80,"props":3564,"children":3565},{"style":97},[3566],{"type":58,"value":3567}," catch",{"type":52,"tag":80,"props":3569,"children":3570},{"style":181},[3571],{"type":58,"value":1356},{"type":52,"tag":80,"props":3573,"children":3574},{"style":109},[3575],{"type":58,"value":3576},"cause",{"type":52,"tag":80,"props":3578,"children":3579},{"style":181},[3580],{"type":58,"value":928},{"type":52,"tag":80,"props":3582,"children":3583},{"style":103},[3584],{"type":58,"value":800},{"type":52,"tag":80,"props":3586,"children":3587},{"class":82,"line":846},[3588,3593,3597,3601,3606,3610,3614],{"type":52,"tag":80,"props":3589,"children":3590},{"style":97},[3591],{"type":58,"value":3592},"    if",{"type":52,"tag":80,"props":3594,"children":3595},{"style":181},[3596],{"type":58,"value":1356},{"type":52,"tag":80,"props":3598,"children":3599},{"style":109},[3600],{"type":58,"value":3576},{"type":52,"tag":80,"props":3602,"children":3603},{"style":103},[3604],{"type":58,"value":3605}," instanceof",{"type":52,"tag":80,"props":3607,"children":3608},{"style":166},[3609],{"type":58,"value":452},{"type":52,"tag":80,"props":3611,"children":3612},{"style":181},[3613],{"type":58,"value":928},{"type":52,"tag":80,"props":3615,"children":3616},{"style":103},[3617],{"type":58,"value":800},{"type":52,"tag":80,"props":3619,"children":3620},{"class":82,"line":941},[3621,3626,3631,3635,3639,3643,3647,3651],{"type":52,"tag":80,"props":3622,"children":3623},{"style":160},[3624],{"type":58,"value":3625},"      const",{"type":52,"tag":80,"props":3627,"children":3628},{"style":109},[3629],{"type":58,"value":3630}," httpStatusCode",{"type":52,"tag":80,"props":3632,"children":3633},{"style":103},[3634],{"type":58,"value":174},{"type":52,"tag":80,"props":3636,"children":3637},{"style":256},[3638],{"type":58,"value":3090},{"type":52,"tag":80,"props":3640,"children":3641},{"style":181},[3642],{"type":58,"value":795},{"type":52,"tag":80,"props":3644,"children":3645},{"style":109},[3646],{"type":58,"value":3576},{"type":52,"tag":80,"props":3648,"children":3649},{"style":181},[3650],{"type":58,"value":1095},{"type":52,"tag":80,"props":3652,"children":3653},{"style":103},[3654],{"type":58,"value":143},{"type":52,"tag":80,"props":3656,"children":3657},{"class":82,"line":983},[3658,3663,3667,3671,3675,3680,3684,3688,3692,3696,3700,3705,3709,3713,3718,3722,3727,3731,3736,3740,3744,3748],{"type":52,"tag":80,"props":3659,"children":3660},{"style":109},[3661],{"type":58,"value":3662},"      res",{"type":52,"tag":80,"props":3664,"children":3665},{"style":103},[3666],{"type":58,"value":253},{"type":52,"tag":80,"props":3668,"children":3669},{"style":256},[3670],{"type":58,"value":3474},{"type":52,"tag":80,"props":3672,"children":3673},{"style":181},[3674],{"type":58,"value":795},{"type":52,"tag":80,"props":3676,"children":3677},{"style":109},[3678],{"type":58,"value":3679},"httpStatusCode",{"type":52,"tag":80,"props":3681,"children":3682},{"style":181},[3683],{"type":58,"value":1095},{"type":52,"tag":80,"props":3685,"children":3686},{"style":103},[3687],{"type":58,"value":253},{"type":52,"tag":80,"props":3689,"children":3690},{"style":256},[3691],{"type":58,"value":3496},{"type":52,"tag":80,"props":3693,"children":3694},{"style":181},[3695],{"type":58,"value":795},{"type":52,"tag":80,"props":3697,"children":3698},{"style":103},[3699],{"type":58,"value":697},{"type":52,"tag":80,"props":3701,"children":3702},{"style":181},[3703],{"type":58,"value":3704}," error",{"type":52,"tag":80,"props":3706,"children":3707},{"style":103},[3708],{"type":58,"value":203},{"type":52,"tag":80,"props":3710,"children":3711},{"style":103},[3712],{"type":58,"value":106},{"type":52,"tag":80,"props":3714,"children":3715},{"style":181},[3716],{"type":58,"value":3717}," message",{"type":52,"tag":80,"props":3719,"children":3720},{"style":103},[3721],{"type":58,"value":203},{"type":52,"tag":80,"props":3723,"children":3724},{"style":109},[3725],{"type":58,"value":3726}," cause",{"type":52,"tag":80,"props":3728,"children":3729},{"style":103},[3730],{"type":58,"value":253},{"type":52,"tag":80,"props":3732,"children":3733},{"style":109},[3734],{"type":58,"value":3735},"message",{"type":52,"tag":80,"props":3737,"children":3738},{"style":103},[3739],{"type":58,"value":117},{"type":52,"tag":80,"props":3741,"children":3742},{"style":103},[3743],{"type":58,"value":117},{"type":52,"tag":80,"props":3745,"children":3746},{"style":181},[3747],{"type":58,"value":1095},{"type":52,"tag":80,"props":3749,"children":3750},{"style":103},[3751],{"type":58,"value":143},{"type":52,"tag":80,"props":3753,"children":3754},{"class":82,"line":1066},[3755,3760],{"type":52,"tag":80,"props":3756,"children":3757},{"style":97},[3758],{"type":58,"value":3759},"      return",{"type":52,"tag":80,"props":3761,"children":3762},{"style":103},[3763],{"type":58,"value":143},{"type":52,"tag":80,"props":3765,"children":3766},{"class":82,"line":1102},[3767],{"type":52,"tag":80,"props":3768,"children":3769},{"style":103},[3770],{"type":58,"value":3771},"    }\n",{"type":52,"tag":80,"props":3773,"children":3774},{"class":82,"line":1119},[3775,3779,3783,3787,3791,3796,3800,3804,3808,3812,3816,3820,3824,3828,3832,3836,3840,3845,3849,3853,3857,3861],{"type":52,"tag":80,"props":3776,"children":3777},{"style":109},[3778],{"type":58,"value":3465},{"type":52,"tag":80,"props":3780,"children":3781},{"style":103},[3782],{"type":58,"value":253},{"type":52,"tag":80,"props":3784,"children":3785},{"style":256},[3786],{"type":58,"value":3474},{"type":52,"tag":80,"props":3788,"children":3789},{"style":181},[3790],{"type":58,"value":795},{"type":52,"tag":80,"props":3792,"children":3793},{"style":920},[3794],{"type":58,"value":3795},"500",{"type":52,"tag":80,"props":3797,"children":3798},{"style":181},[3799],{"type":58,"value":1095},{"type":52,"tag":80,"props":3801,"children":3802},{"style":103},[3803],{"type":58,"value":253},{"type":52,"tag":80,"props":3805,"children":3806},{"style":256},[3807],{"type":58,"value":3496},{"type":52,"tag":80,"props":3809,"children":3810},{"style":181},[3811],{"type":58,"value":795},{"type":52,"tag":80,"props":3813,"children":3814},{"style":103},[3815],{"type":58,"value":697},{"type":52,"tag":80,"props":3817,"children":3818},{"style":181},[3819],{"type":58,"value":3704},{"type":52,"tag":80,"props":3821,"children":3822},{"style":103},[3823],{"type":58,"value":203},{"type":52,"tag":80,"props":3825,"children":3826},{"style":103},[3827],{"type":58,"value":106},{"type":52,"tag":80,"props":3829,"children":3830},{"style":181},[3831],{"type":58,"value":3717},{"type":52,"tag":80,"props":3833,"children":3834},{"style":103},[3835],{"type":58,"value":203},{"type":52,"tag":80,"props":3837,"children":3838},{"style":103},[3839],{"type":58,"value":127},{"type":52,"tag":80,"props":3841,"children":3842},{"style":130},[3843],{"type":58,"value":3844},"Internal server error",{"type":52,"tag":80,"props":3846,"children":3847},{"style":103},[3848],{"type":58,"value":138},{"type":52,"tag":80,"props":3850,"children":3851},{"style":103},[3852],{"type":58,"value":117},{"type":52,"tag":80,"props":3854,"children":3855},{"style":103},[3856],{"type":58,"value":117},{"type":52,"tag":80,"props":3858,"children":3859},{"style":181},[3860],{"type":58,"value":1095},{"type":52,"tag":80,"props":3862,"children":3863},{"style":103},[3864],{"type":58,"value":143},{"type":52,"tag":80,"props":3866,"children":3867},{"class":82,"line":1137},[3868],{"type":52,"tag":80,"props":3869,"children":3870},{"style":103},[3871],{"type":58,"value":3872},"  }\n",{"type":52,"tag":80,"props":3874,"children":3875},{"class":82,"line":1154},[3876],{"type":52,"tag":80,"props":3877,"children":3878},{"style":103},[3879],{"type":58,"value":650},{"type":52,"tag":1894,"props":3881,"children":3883},{"id":3882},"caller-with-onerror-callback",[3884],{"type":58,"value":3885},"Caller with onError callback",{"type":52,"tag":68,"props":3887,"children":3889},{"className":70,"code":3888,"language":72,"meta":73,"style":73},"import { initTRPC } from '@trpc\u002Fserver';\nimport { z } from 'zod';\n\nconst t = initTRPC.create();\n\nconst appRouter = t.router({\n  greeting: t.procedure\n    .input(z.object({ name: z.string() }))\n    .query(({ input }) => {\n      if (input.name === 'invalid') {\n        throw new Error('Invalid name');\n      }\n      return `Hello ${input.name}`;\n    }),\n});\n\nconst caller = appRouter.createCaller(\n  {},\n  {\n    onError: (opts) => {\n      console.error('An error occurred:', opts.error);\n    },\n  },\n);\n",[3890],{"type":52,"tag":76,"props":3891,"children":3892},{"__ignoreMap":73},[3893,3932,3971,3978,4013,4020,4055,4078,4141,4176,4225,4267,4275,4314,4330,4345,4352,4383,4391,4399,4432,4491,4499,4507],{"type":52,"tag":80,"props":3894,"children":3895},{"class":82,"line":83},[3896,3900,3904,3908,3912,3916,3920,3924,3928],{"type":52,"tag":80,"props":3897,"children":3898},{"style":97},[3899],{"type":58,"value":100},{"type":52,"tag":80,"props":3901,"children":3902},{"style":103},[3903],{"type":58,"value":106},{"type":52,"tag":80,"props":3905,"children":3906},{"style":109},[3907],{"type":58,"value":112},{"type":52,"tag":80,"props":3909,"children":3910},{"style":103},[3911],{"type":58,"value":117},{"type":52,"tag":80,"props":3913,"children":3914},{"style":97},[3915],{"type":58,"value":122},{"type":52,"tag":80,"props":3917,"children":3918},{"style":103},[3919],{"type":58,"value":127},{"type":52,"tag":80,"props":3921,"children":3922},{"style":130},[3923],{"type":58,"value":133},{"type":52,"tag":80,"props":3925,"children":3926},{"style":103},[3927],{"type":58,"value":138},{"type":52,"tag":80,"props":3929,"children":3930},{"style":103},[3931],{"type":58,"value":143},{"type":52,"tag":80,"props":3933,"children":3934},{"class":82,"line":93},[3935,3939,3943,3947,3951,3955,3959,3963,3967],{"type":52,"tag":80,"props":3936,"children":3937},{"style":97},[3938],{"type":58,"value":100},{"type":52,"tag":80,"props":3940,"children":3941},{"style":103},[3942],{"type":58,"value":106},{"type":52,"tag":80,"props":3944,"children":3945},{"style":109},[3946],{"type":58,"value":492},{"type":52,"tag":80,"props":3948,"children":3949},{"style":103},[3950],{"type":58,"value":117},{"type":52,"tag":80,"props":3952,"children":3953},{"style":97},[3954],{"type":58,"value":122},{"type":52,"tag":80,"props":3956,"children":3957},{"style":103},[3958],{"type":58,"value":127},{"type":52,"tag":80,"props":3960,"children":3961},{"style":130},[3962],{"type":58,"value":509},{"type":52,"tag":80,"props":3964,"children":3965},{"style":103},[3966],{"type":58,"value":138},{"type":52,"tag":80,"props":3968,"children":3969},{"style":103},[3970],{"type":58,"value":143},{"type":52,"tag":80,"props":3972,"children":3973},{"class":82,"line":146},[3974],{"type":52,"tag":80,"props":3975,"children":3976},{"emptyLinePlaceholder":150},[3977],{"type":58,"value":153},{"type":52,"tag":80,"props":3979,"children":3980},{"class":82,"line":156},[3981,3985,3989,3993,3997,4001,4005,4009],{"type":52,"tag":80,"props":3982,"children":3983},{"style":160},[3984],{"type":58,"value":234},{"type":52,"tag":80,"props":3986,"children":3987},{"style":109},[3988],{"type":58,"value":239},{"type":52,"tag":80,"props":3990,"children":3991},{"style":103},[3992],{"type":58,"value":244},{"type":52,"tag":80,"props":3994,"children":3995},{"style":109},[3996],{"type":58,"value":112},{"type":52,"tag":80,"props":3998,"children":3999},{"style":103},[4000],{"type":58,"value":253},{"type":52,"tag":80,"props":4002,"children":4003},{"style":256},[4004],{"type":58,"value":288},{"type":52,"tag":80,"props":4006,"children":4007},{"style":109},[4008],{"type":58,"value":279},{"type":52,"tag":80,"props":4010,"children":4011},{"style":103},[4012],{"type":58,"value":143},{"type":52,"tag":80,"props":4014,"children":4015},{"class":82,"line":220},[4016],{"type":52,"tag":80,"props":4017,"children":4018},{"emptyLinePlaceholder":150},[4019],{"type":58,"value":153},{"type":52,"tag":80,"props":4021,"children":4022},{"class":82,"line":228},[4023,4027,4031,4035,4039,4043,4047,4051],{"type":52,"tag":80,"props":4024,"children":4025},{"style":160},[4026],{"type":58,"value":234},{"type":52,"tag":80,"props":4028,"children":4029},{"style":109},[4030],{"type":58,"value":782},{"type":52,"tag":80,"props":4032,"children":4033},{"style":103},[4034],{"type":58,"value":244},{"type":52,"tag":80,"props":4036,"children":4037},{"style":109},[4038],{"type":58,"value":332},{"type":52,"tag":80,"props":4040,"children":4041},{"style":103},[4042],{"type":58,"value":253},{"type":52,"tag":80,"props":4044,"children":4045},{"style":256},[4046],{"type":58,"value":341},{"type":52,"tag":80,"props":4048,"children":4049},{"style":109},[4050],{"type":58,"value":795},{"type":52,"tag":80,"props":4052,"children":4053},{"style":103},[4054],{"type":58,"value":800},{"type":52,"tag":80,"props":4056,"children":4057},{"class":82,"line":299},[4058,4062,4066,4070,4074],{"type":52,"tag":80,"props":4059,"children":4060},{"style":181},[4061],{"type":58,"value":2729},{"type":52,"tag":80,"props":4063,"children":4064},{"style":103},[4065],{"type":58,"value":203},{"type":52,"tag":80,"props":4067,"children":4068},{"style":109},[4069],{"type":58,"value":332},{"type":52,"tag":80,"props":4071,"children":4072},{"style":103},[4073],{"type":58,"value":253},{"type":52,"tag":80,"props":4075,"children":4076},{"style":109},[4077],{"type":58,"value":2746},{"type":52,"tag":80,"props":4079,"children":4080},{"class":82,"line":307},[4081,4085,4089,4093,4097,4101,4105,4109,4113,4117,4121,4125,4129,4133,4137],{"type":52,"tag":80,"props":4082,"children":4083},{"style":103},[4084],{"type":58,"value":2754},{"type":52,"tag":80,"props":4086,"children":4087},{"style":256},[4088],{"type":58,"value":857},{"type":52,"tag":80,"props":4090,"children":4091},{"style":109},[4092],{"type":58,"value":862},{"type":52,"tag":80,"props":4094,"children":4095},{"style":103},[4096],{"type":58,"value":253},{"type":52,"tag":80,"props":4098,"children":4099},{"style":256},[4100],{"type":58,"value":871},{"type":52,"tag":80,"props":4102,"children":4103},{"style":109},[4104],{"type":58,"value":795},{"type":52,"tag":80,"props":4106,"children":4107},{"style":103},[4108],{"type":58,"value":697},{"type":52,"tag":80,"props":4110,"children":4111},{"style":181},[4112],{"type":58,"value":2783},{"type":52,"tag":80,"props":4114,"children":4115},{"style":103},[4116],{"type":58,"value":203},{"type":52,"tag":80,"props":4118,"children":4119},{"style":109},[4120],{"type":58,"value":492},{"type":52,"tag":80,"props":4122,"children":4123},{"style":103},[4124],{"type":58,"value":253},{"type":52,"tag":80,"props":4126,"children":4127},{"style":256},[4128],{"type":58,"value":900},{"type":52,"tag":80,"props":4130,"children":4131},{"style":109},[4132],{"type":58,"value":1208},{"type":52,"tag":80,"props":4134,"children":4135},{"style":103},[4136],{"type":58,"value":933},{"type":52,"tag":80,"props":4138,"children":4139},{"style":109},[4140],{"type":58,"value":938},{"type":52,"tag":80,"props":4142,"children":4143},{"class":82,"line":348},[4144,4148,4152,4156,4160,4164,4168,4172],{"type":52,"tag":80,"props":4145,"children":4146},{"style":103},[4147],{"type":58,"value":2754},{"type":52,"tag":80,"props":4149,"children":4150},{"style":256},[4151],{"type":58,"value":1229},{"type":52,"tag":80,"props":4153,"children":4154},{"style":109},[4155],{"type":58,"value":795},{"type":52,"tag":80,"props":4157,"children":4158},{"style":103},[4159],{"type":58,"value":960},{"type":52,"tag":80,"props":4161,"children":4162},{"style":963},[4163],{"type":58,"value":966},{"type":52,"tag":80,"props":4165,"children":4166},{"style":103},[4167],{"type":58,"value":971},{"type":52,"tag":80,"props":4169,"children":4170},{"style":160},[4171],{"type":58,"value":976},{"type":52,"tag":80,"props":4173,"children":4174},{"style":103},[4175],{"type":58,"value":602},{"type":52,"tag":80,"props":4177,"children":4178},{"class":82,"line":386},[4179,4184,4188,4192,4196,4200,4204,4208,4213,4217,4221],{"type":52,"tag":80,"props":4180,"children":4181},{"style":97},[4182],{"type":58,"value":4183},"      if",{"type":52,"tag":80,"props":4185,"children":4186},{"style":181},[4187],{"type":58,"value":1356},{"type":52,"tag":80,"props":4189,"children":4190},{"style":109},[4191],{"type":58,"value":857},{"type":52,"tag":80,"props":4193,"children":4194},{"style":103},[4195],{"type":58,"value":253},{"type":52,"tag":80,"props":4197,"children":4198},{"style":109},[4199],{"type":58,"value":2870},{"type":52,"tag":80,"props":4201,"children":4202},{"style":103},[4203],{"type":58,"value":1322},{"type":52,"tag":80,"props":4205,"children":4206},{"style":103},[4207],{"type":58,"value":127},{"type":52,"tag":80,"props":4209,"children":4210},{"style":130},[4211],{"type":58,"value":4212},"invalid",{"type":52,"tag":80,"props":4214,"children":4215},{"style":103},[4216],{"type":58,"value":138},{"type":52,"tag":80,"props":4218,"children":4219},{"style":181},[4220],{"type":58,"value":928},{"type":52,"tag":80,"props":4222,"children":4223},{"style":103},[4224],{"type":58,"value":800},{"type":52,"tag":80,"props":4226,"children":4227},{"class":82,"line":660},[4228,4233,4237,4242,4246,4250,4255,4259,4263],{"type":52,"tag":80,"props":4229,"children":4230},{"style":97},[4231],{"type":58,"value":4232},"        throw",{"type":52,"tag":80,"props":4234,"children":4235},{"style":103},[4236],{"type":58,"value":1379},{"type":52,"tag":80,"props":4238,"children":4239},{"style":256},[4240],{"type":58,"value":4241}," Error",{"type":52,"tag":80,"props":4243,"children":4244},{"style":181},[4245],{"type":58,"value":795},{"type":52,"tag":80,"props":4247,"children":4248},{"style":103},[4249],{"type":58,"value":138},{"type":52,"tag":80,"props":4251,"children":4252},{"style":130},[4253],{"type":58,"value":4254},"Invalid name",{"type":52,"tag":80,"props":4256,"children":4257},{"style":103},[4258],{"type":58,"value":138},{"type":52,"tag":80,"props":4260,"children":4261},{"style":181},[4262],{"type":58,"value":1095},{"type":52,"tag":80,"props":4264,"children":4265},{"style":103},[4266],{"type":58,"value":143},{"type":52,"tag":80,"props":4268,"children":4269},{"class":82,"line":760},[4270],{"type":52,"tag":80,"props":4271,"children":4272},{"style":103},[4273],{"type":58,"value":4274},"      }\n",{"type":52,"tag":80,"props":4276,"children":4277},{"class":82,"line":768},[4278,4282,4286,4290,4294,4298,4302,4306,4310],{"type":52,"tag":80,"props":4279,"children":4280},{"style":97},[4281],{"type":58,"value":3759},{"type":52,"tag":80,"props":4283,"children":4284},{"style":103},[4285],{"type":58,"value":2847},{"type":52,"tag":80,"props":4287,"children":4288},{"style":130},[4289],{"type":58,"value":2852},{"type":52,"tag":80,"props":4291,"children":4292},{"style":103},[4293],{"type":58,"value":2857},{"type":52,"tag":80,"props":4295,"children":4296},{"style":109},[4297],{"type":58,"value":857},{"type":52,"tag":80,"props":4299,"children":4300},{"style":103},[4301],{"type":58,"value":253},{"type":52,"tag":80,"props":4303,"children":4304},{"style":109},[4305],{"type":58,"value":2870},{"type":52,"tag":80,"props":4307,"children":4308},{"style":103},[4309],{"type":58,"value":1059},{"type":52,"tag":80,"props":4311,"children":4312},{"style":103},[4313],{"type":58,"value":143},{"type":52,"tag":80,"props":4315,"children":4316},{"class":82,"line":803},[4317,4322,4326],{"type":52,"tag":80,"props":4318,"children":4319},{"style":103},[4320],{"type":58,"value":4321},"    }",{"type":52,"tag":80,"props":4323,"children":4324},{"style":109},[4325],{"type":58,"value":1095},{"type":52,"tag":80,"props":4327,"children":4328},{"style":103},[4329],{"type":58,"value":1134},{"type":52,"tag":80,"props":4331,"children":4332},{"class":82,"line":828},[4333,4337,4341],{"type":52,"tag":80,"props":4334,"children":4335},{"style":103},[4336],{"type":58,"value":933},{"type":52,"tag":80,"props":4338,"children":4339},{"style":109},[4340],{"type":58,"value":1095},{"type":52,"tag":80,"props":4342,"children":4343},{"style":103},[4344],{"type":58,"value":143},{"type":52,"tag":80,"props":4346,"children":4347},{"class":82,"line":846},[4348],{"type":52,"tag":80,"props":4349,"children":4350},{"emptyLinePlaceholder":150},[4351],{"type":58,"value":153},{"type":52,"tag":80,"props":4353,"children":4354},{"class":82,"line":941},[4355,4359,4363,4367,4371,4375,4379],{"type":52,"tag":80,"props":4356,"children":4357},{"style":160},[4358],{"type":58,"value":234},{"type":52,"tag":80,"props":4360,"children":4361},{"style":109},[4362],{"type":58,"value":1689},{"type":52,"tag":80,"props":4364,"children":4365},{"style":103},[4366],{"type":58,"value":244},{"type":52,"tag":80,"props":4368,"children":4369},{"style":109},[4370],{"type":58,"value":1576},{"type":52,"tag":80,"props":4372,"children":4373},{"style":103},[4374],{"type":58,"value":253},{"type":52,"tag":80,"props":4376,"children":4377},{"style":256},[4378],{"type":58,"value":2932},{"type":52,"tag":80,"props":4380,"children":4381},{"style":109},[4382],{"type":58,"value":3245},{"type":52,"tag":80,"props":4384,"children":4385},{"class":82,"line":983},[4386],{"type":52,"tag":80,"props":4387,"children":4388},{"style":103},[4389],{"type":58,"value":4390},"  {},\n",{"type":52,"tag":80,"props":4392,"children":4393},{"class":82,"line":1066},[4394],{"type":52,"tag":80,"props":4395,"children":4396},{"style":103},[4397],{"type":58,"value":4398},"  {\n",{"type":52,"tag":80,"props":4400,"children":4401},{"class":82,"line":1102},[4402,4407,4411,4415,4420,4424,4428],{"type":52,"tag":80,"props":4403,"children":4404},{"style":256},[4405],{"type":58,"value":4406},"    onError",{"type":52,"tag":80,"props":4408,"children":4409},{"style":103},[4410],{"type":58,"value":203},{"type":52,"tag":80,"props":4412,"children":4413},{"style":103},[4414],{"type":58,"value":1356},{"type":52,"tag":80,"props":4416,"children":4417},{"style":963},[4418],{"type":58,"value":4419},"opts",{"type":52,"tag":80,"props":4421,"children":4422},{"style":103},[4423],{"type":58,"value":1095},{"type":52,"tag":80,"props":4425,"children":4426},{"style":160},[4427],{"type":58,"value":976},{"type":52,"tag":80,"props":4429,"children":4430},{"style":103},[4431],{"type":58,"value":602},{"type":52,"tag":80,"props":4433,"children":4434},{"class":82,"line":1119},[4435,4440,4444,4449,4453,4457,4462,4466,4470,4475,4479,4483,4487],{"type":52,"tag":80,"props":4436,"children":4437},{"style":109},[4438],{"type":58,"value":4439},"      console",{"type":52,"tag":80,"props":4441,"children":4442},{"style":103},[4443],{"type":58,"value":253},{"type":52,"tag":80,"props":4445,"children":4446},{"style":256},[4447],{"type":58,"value":4448},"error",{"type":52,"tag":80,"props":4450,"children":4451},{"style":181},[4452],{"type":58,"value":795},{"type":52,"tag":80,"props":4454,"children":4455},{"style":103},[4456],{"type":58,"value":138},{"type":52,"tag":80,"props":4458,"children":4459},{"style":130},[4460],{"type":58,"value":4461},"An error occurred:",{"type":52,"tag":80,"props":4463,"children":4464},{"style":103},[4465],{"type":58,"value":138},{"type":52,"tag":80,"props":4467,"children":4468},{"style":103},[4469],{"type":58,"value":538},{"type":52,"tag":80,"props":4471,"children":4472},{"style":109},[4473],{"type":58,"value":4474}," opts",{"type":52,"tag":80,"props":4476,"children":4477},{"style":103},[4478],{"type":58,"value":253},{"type":52,"tag":80,"props":4480,"children":4481},{"style":109},[4482],{"type":58,"value":4448},{"type":52,"tag":80,"props":4484,"children":4485},{"style":181},[4486],{"type":58,"value":1095},{"type":52,"tag":80,"props":4488,"children":4489},{"style":103},[4490],{"type":58,"value":143},{"type":52,"tag":80,"props":4492,"children":4493},{"class":82,"line":1137},[4494],{"type":52,"tag":80,"props":4495,"children":4496},{"style":103},[4497],{"type":58,"value":4498},"    },\n",{"type":52,"tag":80,"props":4500,"children":4501},{"class":82,"line":1154},[4502],{"type":52,"tag":80,"props":4503,"children":4504},{"style":103},[4505],{"type":58,"value":4506},"  },\n",{"type":52,"tag":80,"props":4508,"children":4509},{"class":82,"line":1219},[4510,4514],{"type":52,"tag":80,"props":4511,"children":4512},{"style":109},[4513],{"type":58,"value":1095},{"type":52,"tag":80,"props":4515,"children":4516},{"style":103},[4517],{"type":58,"value":143},{"type":52,"tag":61,"props":4519,"children":4521},{"id":4520},"common-mistakes",[4522],{"type":58,"value":4523},"Common Mistakes",{"type":52,"tag":1894,"props":4525,"children":4527},{"id":4526},"high-using-createcaller-inside-another-procedure",[4528,4533],{"type":52,"tag":80,"props":4529,"children":4530},{},[4531],{"type":58,"value":4532},"HIGH",{"type":58,"value":4534}," Using createCaller inside another procedure",{"type":52,"tag":1295,"props":4536,"children":4537},{},[4538],{"type":58,"value":4539},"Wrong:",{"type":52,"tag":68,"props":4541,"children":4543},{"className":70,"code":4542,"language":72,"meta":73,"style":73},"import { appRouter } from '.\u002FappRouter';\nimport { createCallerFactory, publicProcedure } from '.\u002Ftrpc';\n\nconst createCaller = createCallerFactory(appRouter);\n\nconst proc = publicProcedure.query(async () => {\n  const caller = createCaller({});\n  return caller.post.list();\n});\n",[4544],{"type":52,"tag":76,"props":4545,"children":4546},{"__ignoreMap":73},[4547,4586,4633,4640,4667,4674,4723,4758,4794],{"type":52,"tag":80,"props":4548,"children":4549},{"class":82,"line":83},[4550,4554,4558,4562,4566,4570,4574,4578,4582],{"type":52,"tag":80,"props":4551,"children":4552},{"style":97},[4553],{"type":58,"value":100},{"type":52,"tag":80,"props":4555,"children":4556},{"style":103},[4557],{"type":58,"value":106},{"type":52,"tag":80,"props":4559,"children":4560},{"style":109},[4561],{"type":58,"value":1576},{"type":52,"tag":80,"props":4563,"children":4564},{"style":103},[4565],{"type":58,"value":117},{"type":52,"tag":80,"props":4567,"children":4568},{"style":97},[4569],{"type":58,"value":122},{"type":52,"tag":80,"props":4571,"children":4572},{"style":103},[4573],{"type":58,"value":127},{"type":52,"tag":80,"props":4575,"children":4576},{"style":130},[4577],{"type":58,"value":1662},{"type":52,"tag":80,"props":4579,"children":4580},{"style":103},[4581],{"type":58,"value":138},{"type":52,"tag":80,"props":4583,"children":4584},{"style":103},[4585],{"type":58,"value":143},{"type":52,"tag":80,"props":4587,"children":4588},{"class":82,"line":93},[4589,4593,4597,4601,4605,4609,4613,4617,4621,4625,4629],{"type":52,"tag":80,"props":4590,"children":4591},{"style":97},[4592],{"type":58,"value":100},{"type":52,"tag":80,"props":4594,"children":4595},{"style":103},[4596],{"type":58,"value":106},{"type":52,"tag":80,"props":4598,"children":4599},{"style":109},[4600],{"type":58,"value":533},{"type":52,"tag":80,"props":4602,"children":4603},{"style":103},[4604],{"type":58,"value":538},{"type":52,"tag":80,"props":4606,"children":4607},{"style":109},[4608],{"type":58,"value":543},{"type":52,"tag":80,"props":4610,"children":4611},{"style":103},[4612],{"type":58,"value":117},{"type":52,"tag":80,"props":4614,"children":4615},{"style":97},[4616],{"type":58,"value":122},{"type":52,"tag":80,"props":4618,"children":4619},{"style":103},[4620],{"type":58,"value":127},{"type":52,"tag":80,"props":4622,"children":4623},{"style":130},[4624],{"type":58,"value":569},{"type":52,"tag":80,"props":4626,"children":4627},{"style":103},[4628],{"type":58,"value":138},{"type":52,"tag":80,"props":4630,"children":4631},{"style":103},[4632],{"type":58,"value":143},{"type":52,"tag":80,"props":4634,"children":4635},{"class":82,"line":146},[4636],{"type":52,"tag":80,"props":4637,"children":4638},{"emptyLinePlaceholder":150},[4639],{"type":58,"value":153},{"type":52,"tag":80,"props":4641,"children":4642},{"class":82,"line":156},[4643,4647,4651,4655,4659,4663],{"type":52,"tag":80,"props":4644,"children":4645},{"style":160},[4646],{"type":58,"value":234},{"type":52,"tag":80,"props":4648,"children":4649},{"style":109},[4650],{"type":58,"value":1597},{"type":52,"tag":80,"props":4652,"children":4653},{"style":103},[4654],{"type":58,"value":244},{"type":52,"tag":80,"props":4656,"children":4657},{"style":256},[4658],{"type":58,"value":533},{"type":52,"tag":80,"props":4660,"children":4661},{"style":109},[4662],{"type":58,"value":1610},{"type":52,"tag":80,"props":4664,"children":4665},{"style":103},[4666],{"type":58,"value":143},{"type":52,"tag":80,"props":4668,"children":4669},{"class":82,"line":220},[4670],{"type":52,"tag":80,"props":4671,"children":4672},{"emptyLinePlaceholder":150},[4673],{"type":58,"value":153},{"type":52,"tag":80,"props":4675,"children":4676},{"class":82,"line":228},[4677,4681,4686,4690,4694,4698,4702,4706,4710,4715,4719],{"type":52,"tag":80,"props":4678,"children":4679},{"style":160},[4680],{"type":58,"value":234},{"type":52,"tag":80,"props":4682,"children":4683},{"style":109},[4684],{"type":58,"value":4685}," proc ",{"type":52,"tag":80,"props":4687,"children":4688},{"style":103},[4689],{"type":58,"value":244},{"type":52,"tag":80,"props":4691,"children":4692},{"style":109},[4693],{"type":58,"value":543},{"type":52,"tag":80,"props":4695,"children":4696},{"style":103},[4697],{"type":58,"value":253},{"type":52,"tag":80,"props":4699,"children":4700},{"style":256},[4701],{"type":58,"value":1229},{"type":52,"tag":80,"props":4703,"children":4704},{"style":109},[4705],{"type":58,"value":795},{"type":52,"tag":80,"props":4707,"children":4708},{"style":160},[4709],{"type":58,"value":2096},{"type":52,"tag":80,"props":4711,"children":4712},{"style":103},[4713],{"type":58,"value":4714}," ()",{"type":52,"tag":80,"props":4716,"children":4717},{"style":160},[4718],{"type":58,"value":976},{"type":52,"tag":80,"props":4720,"children":4721},{"style":103},[4722],{"type":58,"value":602},{"type":52,"tag":80,"props":4724,"children":4725},{"class":82,"line":299},[4726,4730,4734,4738,4742,4746,4750,4754],{"type":52,"tag":80,"props":4727,"children":4728},{"style":160},[4729],{"type":58,"value":2122},{"type":52,"tag":80,"props":4731,"children":4732},{"style":109},[4733],{"type":58,"value":1779},{"type":52,"tag":80,"props":4735,"children":4736},{"style":103},[4737],{"type":58,"value":174},{"type":52,"tag":80,"props":4739,"children":4740},{"style":256},[4741],{"type":58,"value":1645},{"type":52,"tag":80,"props":4743,"children":4744},{"style":181},[4745],{"type":58,"value":795},{"type":52,"tag":80,"props":4747,"children":4748},{"style":103},[4749],{"type":58,"value":2941},{"type":52,"tag":80,"props":4751,"children":4752},{"style":181},[4753],{"type":58,"value":1095},{"type":52,"tag":80,"props":4755,"children":4756},{"style":103},[4757],{"type":58,"value":143},{"type":52,"tag":80,"props":4759,"children":4760},{"class":82,"line":307},[4761,4766,4770,4774,4778,4782,4786,4790],{"type":52,"tag":80,"props":4762,"children":4763},{"style":97},[4764],{"type":58,"value":4765},"  return",{"type":52,"tag":80,"props":4767,"children":4768},{"style":109},[4769],{"type":58,"value":1779},{"type":52,"tag":80,"props":4771,"children":4772},{"style":103},[4773],{"type":58,"value":253},{"type":52,"tag":80,"props":4775,"children":4776},{"style":109},[4777],{"type":58,"value":1090},{"type":52,"tag":80,"props":4779,"children":4780},{"style":103},[4781],{"type":58,"value":253},{"type":52,"tag":80,"props":4783,"children":4784},{"style":256},[4785],{"type":58,"value":1796},{"type":52,"tag":80,"props":4787,"children":4788},{"style":181},[4789],{"type":58,"value":279},{"type":52,"tag":80,"props":4791,"children":4792},{"style":103},[4793],{"type":58,"value":143},{"type":52,"tag":80,"props":4795,"children":4796},{"class":82,"line":348},[4797,4801,4805],{"type":52,"tag":80,"props":4798,"children":4799},{"style":103},[4800],{"type":58,"value":933},{"type":52,"tag":80,"props":4802,"children":4803},{"style":109},[4804],{"type":58,"value":1095},{"type":52,"tag":80,"props":4806,"children":4807},{"style":103},[4808],{"type":58,"value":143},{"type":52,"tag":1295,"props":4810,"children":4811},{},[4812],{"type":58,"value":4813},"Correct:",{"type":52,"tag":68,"props":4815,"children":4817},{"className":70,"code":4816,"language":72,"meta":73,"style":73},"import type { Context } from '.\u002Fcontext';\nimport { publicProcedure } from '.\u002Ftrpc';\n\nasync function listPosts(ctx: Context) {\n  return ctx.db.post.findMany();\n}\n\nconst proc = publicProcedure.query(async ({ ctx }) => {\n  return listPosts(ctx);\n});\n",[4818],{"type":52,"tag":76,"props":4819,"children":4820},{"__ignoreMap":73},[4821,4864,4903,4910,4950,4995,5002,5009,5065,5092],{"type":52,"tag":80,"props":4822,"children":4823},{"class":82,"line":83},[4824,4828,4832,4836,4840,4844,4848,4852,4856,4860],{"type":52,"tag":80,"props":4825,"children":4826},{"style":97},[4827],{"type":58,"value":100},{"type":52,"tag":80,"props":4829,"children":4830},{"style":97},[4831],{"type":58,"value":1557},{"type":52,"tag":80,"props":4833,"children":4834},{"style":103},[4835],{"type":58,"value":106},{"type":52,"tag":80,"props":4837,"children":4838},{"style":109},[4839],{"type":58,"value":169},{"type":52,"tag":80,"props":4841,"children":4842},{"style":103},[4843],{"type":58,"value":117},{"type":52,"tag":80,"props":4845,"children":4846},{"style":97},[4847],{"type":58,"value":122},{"type":52,"tag":80,"props":4849,"children":4850},{"style":103},[4851],{"type":58,"value":127},{"type":52,"tag":80,"props":4853,"children":4854},{"style":130},[4855],{"type":58,"value":2073},{"type":52,"tag":80,"props":4857,"children":4858},{"style":103},[4859],{"type":58,"value":138},{"type":52,"tag":80,"props":4861,"children":4862},{"style":103},[4863],{"type":58,"value":143},{"type":52,"tag":80,"props":4865,"children":4866},{"class":82,"line":93},[4867,4871,4875,4879,4883,4887,4891,4895,4899],{"type":52,"tag":80,"props":4868,"children":4869},{"style":97},[4870],{"type":58,"value":100},{"type":52,"tag":80,"props":4872,"children":4873},{"style":103},[4874],{"type":58,"value":106},{"type":52,"tag":80,"props":4876,"children":4877},{"style":109},[4878],{"type":58,"value":543},{"type":52,"tag":80,"props":4880,"children":4881},{"style":103},[4882],{"type":58,"value":117},{"type":52,"tag":80,"props":4884,"children":4885},{"style":97},[4886],{"type":58,"value":122},{"type":52,"tag":80,"props":4888,"children":4889},{"style":103},[4890],{"type":58,"value":127},{"type":52,"tag":80,"props":4892,"children":4893},{"style":130},[4894],{"type":58,"value":569},{"type":52,"tag":80,"props":4896,"children":4897},{"style":103},[4898],{"type":58,"value":138},{"type":52,"tag":80,"props":4900,"children":4901},{"style":103},[4902],{"type":58,"value":143},{"type":52,"tag":80,"props":4904,"children":4905},{"class":82,"line":146},[4906],{"type":52,"tag":80,"props":4907,"children":4908},{"emptyLinePlaceholder":150},[4909],{"type":58,"value":153},{"type":52,"tag":80,"props":4911,"children":4912},{"class":82,"line":156},[4913,4917,4921,4926,4930,4934,4938,4942,4946],{"type":52,"tag":80,"props":4914,"children":4915},{"style":160},[4916],{"type":58,"value":2096},{"type":52,"tag":80,"props":4918,"children":4919},{"style":160},[4920],{"type":58,"value":2101},{"type":52,"tag":80,"props":4922,"children":4923},{"style":256},[4924],{"type":58,"value":4925}," listPosts",{"type":52,"tag":80,"props":4927,"children":4928},{"style":103},[4929],{"type":58,"value":795},{"type":52,"tag":80,"props":4931,"children":4932},{"style":963},[4933],{"type":58,"value":2200},{"type":52,"tag":80,"props":4935,"children":4936},{"style":103},[4937],{"type":58,"value":203},{"type":52,"tag":80,"props":4939,"children":4940},{"style":166},[4941],{"type":58,"value":169},{"type":52,"tag":80,"props":4943,"children":4944},{"style":103},[4945],{"type":58,"value":1095},{"type":52,"tag":80,"props":4947,"children":4948},{"style":103},[4949],{"type":58,"value":602},{"type":52,"tag":80,"props":4951,"children":4952},{"class":82,"line":220},[4953,4957,4961,4965,4970,4974,4978,4982,4987,4991],{"type":52,"tag":80,"props":4954,"children":4955},{"style":97},[4956],{"type":58,"value":4765},{"type":52,"tag":80,"props":4958,"children":4959},{"style":109},[4960],{"type":58,"value":2127},{"type":52,"tag":80,"props":4962,"children":4963},{"style":103},[4964],{"type":58,"value":253},{"type":52,"tag":80,"props":4966,"children":4967},{"style":109},[4968],{"type":58,"value":4969},"db",{"type":52,"tag":80,"props":4971,"children":4972},{"style":103},[4973],{"type":58,"value":253},{"type":52,"tag":80,"props":4975,"children":4976},{"style":109},[4977],{"type":58,"value":1090},{"type":52,"tag":80,"props":4979,"children":4980},{"style":103},[4981],{"type":58,"value":253},{"type":52,"tag":80,"props":4983,"children":4984},{"style":256},[4985],{"type":58,"value":4986},"findMany",{"type":52,"tag":80,"props":4988,"children":4989},{"style":181},[4990],{"type":58,"value":279},{"type":52,"tag":80,"props":4992,"children":4993},{"style":103},[4994],{"type":58,"value":143},{"type":52,"tag":80,"props":4996,"children":4997},{"class":82,"line":228},[4998],{"type":52,"tag":80,"props":4999,"children":5000},{"style":103},[5001],{"type":58,"value":650},{"type":52,"tag":80,"props":5003,"children":5004},{"class":82,"line":299},[5005],{"type":52,"tag":80,"props":5006,"children":5007},{"emptyLinePlaceholder":150},[5008],{"type":58,"value":153},{"type":52,"tag":80,"props":5010,"children":5011},{"class":82,"line":307},[5012,5016,5020,5024,5028,5032,5036,5040,5044,5049,5053,5057,5061],{"type":52,"tag":80,"props":5013,"children":5014},{"style":160},[5015],{"type":58,"value":234},{"type":52,"tag":80,"props":5017,"children":5018},{"style":109},[5019],{"type":58,"value":4685},{"type":52,"tag":80,"props":5021,"children":5022},{"style":103},[5023],{"type":58,"value":244},{"type":52,"tag":80,"props":5025,"children":5026},{"style":109},[5027],{"type":58,"value":543},{"type":52,"tag":80,"props":5029,"children":5030},{"style":103},[5031],{"type":58,"value":253},{"type":52,"tag":80,"props":5033,"children":5034},{"style":256},[5035],{"type":58,"value":1229},{"type":52,"tag":80,"props":5037,"children":5038},{"style":109},[5039],{"type":58,"value":795},{"type":52,"tag":80,"props":5041,"children":5042},{"style":160},[5043],{"type":58,"value":2096},{"type":52,"tag":80,"props":5045,"children":5046},{"style":103},[5047],{"type":58,"value":5048}," ({",{"type":52,"tag":80,"props":5050,"children":5051},{"style":963},[5052],{"type":58,"value":2127},{"type":52,"tag":80,"props":5054,"children":5055},{"style":103},[5056],{"type":58,"value":971},{"type":52,"tag":80,"props":5058,"children":5059},{"style":160},[5060],{"type":58,"value":976},{"type":52,"tag":80,"props":5062,"children":5063},{"style":103},[5064],{"type":58,"value":602},{"type":52,"tag":80,"props":5066,"children":5067},{"class":82,"line":348},[5068,5072,5076,5080,5084,5088],{"type":52,"tag":80,"props":5069,"children":5070},{"style":97},[5071],{"type":58,"value":4765},{"type":52,"tag":80,"props":5073,"children":5074},{"style":256},[5075],{"type":58,"value":4925},{"type":52,"tag":80,"props":5077,"children":5078},{"style":181},[5079],{"type":58,"value":795},{"type":52,"tag":80,"props":5081,"children":5082},{"style":109},[5083],{"type":58,"value":2200},{"type":52,"tag":80,"props":5085,"children":5086},{"style":181},[5087],{"type":58,"value":1095},{"type":52,"tag":80,"props":5089,"children":5090},{"style":103},[5091],{"type":58,"value":143},{"type":52,"tag":80,"props":5093,"children":5094},{"class":82,"line":386},[5095,5099,5103],{"type":52,"tag":80,"props":5096,"children":5097},{"style":103},[5098],{"type":58,"value":933},{"type":52,"tag":80,"props":5100,"children":5101},{"style":109},[5102],{"type":58,"value":1095},{"type":52,"tag":80,"props":5104,"children":5105},{"style":103},[5106],{"type":58,"value":143},{"type":52,"tag":1295,"props":5108,"children":5109},{},[5110],{"type":58,"value":5111},"Calling createCaller from within a procedure re-creates context, re-runs all middleware, and re-validates input; extract shared logic into a plain function instead.",{"type":52,"tag":1295,"props":5113,"children":5114},{},[5115],{"type":58,"value":5116},"Source: www\u002Fdocs\u002Fserver\u002Fserver-side-calls.md",{"type":52,"tag":1894,"props":5118,"children":5120},{"id":5119},"medium-not-providing-context-to-createcaller",[5121,5126],{"type":52,"tag":80,"props":5122,"children":5123},{},[5124],{"type":58,"value":5125},"MEDIUM",{"type":58,"value":5127}," Not providing context to createCaller",{"type":52,"tag":1295,"props":5129,"children":5130},{},[5131],{"type":58,"value":4539},{"type":52,"tag":68,"props":5133,"children":5135},{"className":70,"code":5134,"language":72,"meta":73,"style":73},"import { appRouter } from '.\u002FappRouter';\n\nconst caller = appRouter.createCaller({});\nawait caller.protectedRoute();\n\u002F\u002F middleware throws UNAUTHORIZED because ctx.user is undefined\n",[5136],{"type":52,"tag":76,"props":5137,"children":5138},{"__ignoreMap":73},[5139,5178,5185,5228,5257],{"type":52,"tag":80,"props":5140,"children":5141},{"class":82,"line":83},[5142,5146,5150,5154,5158,5162,5166,5170,5174],{"type":52,"tag":80,"props":5143,"children":5144},{"style":97},[5145],{"type":58,"value":100},{"type":52,"tag":80,"props":5147,"children":5148},{"style":103},[5149],{"type":58,"value":106},{"type":52,"tag":80,"props":5151,"children":5152},{"style":109},[5153],{"type":58,"value":1576},{"type":52,"tag":80,"props":5155,"children":5156},{"style":103},[5157],{"type":58,"value":117},{"type":52,"tag":80,"props":5159,"children":5160},{"style":97},[5161],{"type":58,"value":122},{"type":52,"tag":80,"props":5163,"children":5164},{"style":103},[5165],{"type":58,"value":127},{"type":52,"tag":80,"props":5167,"children":5168},{"style":130},[5169],{"type":58,"value":1662},{"type":52,"tag":80,"props":5171,"children":5172},{"style":103},[5173],{"type":58,"value":138},{"type":52,"tag":80,"props":5175,"children":5176},{"style":103},[5177],{"type":58,"value":143},{"type":52,"tag":80,"props":5179,"children":5180},{"class":82,"line":93},[5181],{"type":52,"tag":80,"props":5182,"children":5183},{"emptyLinePlaceholder":150},[5184],{"type":58,"value":153},{"type":52,"tag":80,"props":5186,"children":5187},{"class":82,"line":146},[5188,5192,5196,5200,5204,5208,5212,5216,5220,5224],{"type":52,"tag":80,"props":5189,"children":5190},{"style":160},[5191],{"type":58,"value":234},{"type":52,"tag":80,"props":5193,"children":5194},{"style":109},[5195],{"type":58,"value":1689},{"type":52,"tag":80,"props":5197,"children":5198},{"style":103},[5199],{"type":58,"value":244},{"type":52,"tag":80,"props":5201,"children":5202},{"style":109},[5203],{"type":58,"value":1576},{"type":52,"tag":80,"props":5205,"children":5206},{"style":103},[5207],{"type":58,"value":253},{"type":52,"tag":80,"props":5209,"children":5210},{"style":256},[5211],{"type":58,"value":2932},{"type":52,"tag":80,"props":5213,"children":5214},{"style":109},[5215],{"type":58,"value":795},{"type":52,"tag":80,"props":5217,"children":5218},{"style":103},[5219],{"type":58,"value":2941},{"type":52,"tag":80,"props":5221,"children":5222},{"style":109},[5223],{"type":58,"value":1095},{"type":52,"tag":80,"props":5225,"children":5226},{"style":103},[5227],{"type":58,"value":143},{"type":52,"tag":80,"props":5229,"children":5230},{"class":82,"line":156},[5231,5236,5240,5244,5249,5253],{"type":52,"tag":80,"props":5232,"children":5233},{"style":97},[5234],{"type":58,"value":5235},"await",{"type":52,"tag":80,"props":5237,"children":5238},{"style":109},[5239],{"type":58,"value":1779},{"type":52,"tag":80,"props":5241,"children":5242},{"style":103},[5243],{"type":58,"value":253},{"type":52,"tag":80,"props":5245,"children":5246},{"style":256},[5247],{"type":58,"value":5248},"protectedRoute",{"type":52,"tag":80,"props":5250,"children":5251},{"style":109},[5252],{"type":58,"value":279},{"type":52,"tag":80,"props":5254,"children":5255},{"style":103},[5256],{"type":58,"value":143},{"type":52,"tag":80,"props":5258,"children":5259},{"class":82,"line":220},[5260],{"type":52,"tag":80,"props":5261,"children":5262},{"style":87},[5263],{"type":58,"value":5264},"\u002F\u002F middleware throws UNAUTHORIZED because ctx.user is undefined\n",{"type":52,"tag":1295,"props":5266,"children":5267},{},[5268],{"type":58,"value":4813},{"type":52,"tag":68,"props":5270,"children":5272},{"className":70,"code":5271,"language":72,"meta":73,"style":73},"import { appRouter } from '.\u002FappRouter';\nimport { createContextInner } from '.\u002Fcontext';\n\nconst ctx = await createContextInner({ user: { id: '1' } });\nconst caller = appRouter.createCaller(ctx);\nawait caller.protectedRoute();\n",[5273],{"type":52,"tag":76,"props":5274,"children":5275},{"__ignoreMap":73},[5276,5315,5354,5361,5441,5477],{"type":52,"tag":80,"props":5277,"children":5278},{"class":82,"line":83},[5279,5283,5287,5291,5295,5299,5303,5307,5311],{"type":52,"tag":80,"props":5280,"children":5281},{"style":97},[5282],{"type":58,"value":100},{"type":52,"tag":80,"props":5284,"children":5285},{"style":103},[5286],{"type":58,"value":106},{"type":52,"tag":80,"props":5288,"children":5289},{"style":109},[5290],{"type":58,"value":1576},{"type":52,"tag":80,"props":5292,"children":5293},{"style":103},[5294],{"type":58,"value":117},{"type":52,"tag":80,"props":5296,"children":5297},{"style":97},[5298],{"type":58,"value":122},{"type":52,"tag":80,"props":5300,"children":5301},{"style":103},[5302],{"type":58,"value":127},{"type":52,"tag":80,"props":5304,"children":5305},{"style":130},[5306],{"type":58,"value":1662},{"type":52,"tag":80,"props":5308,"children":5309},{"style":103},[5310],{"type":58,"value":138},{"type":52,"tag":80,"props":5312,"children":5313},{"style":103},[5314],{"type":58,"value":143},{"type":52,"tag":80,"props":5316,"children":5317},{"class":82,"line":93},[5318,5322,5326,5330,5334,5338,5342,5346,5350],{"type":52,"tag":80,"props":5319,"children":5320},{"style":97},[5321],{"type":58,"value":100},{"type":52,"tag":80,"props":5323,"children":5324},{"style":103},[5325],{"type":58,"value":106},{"type":52,"tag":80,"props":5327,"children":5328},{"style":109},[5329],{"type":58,"value":2056},{"type":52,"tag":80,"props":5331,"children":5332},{"style":103},[5333],{"type":58,"value":117},{"type":52,"tag":80,"props":5335,"children":5336},{"style":97},[5337],{"type":58,"value":122},{"type":52,"tag":80,"props":5339,"children":5340},{"style":103},[5341],{"type":58,"value":127},{"type":52,"tag":80,"props":5343,"children":5344},{"style":130},[5345],{"type":58,"value":2073},{"type":52,"tag":80,"props":5347,"children":5348},{"style":103},[5349],{"type":58,"value":138},{"type":52,"tag":80,"props":5351,"children":5352},{"style":103},[5353],{"type":58,"value":143},{"type":52,"tag":80,"props":5355,"children":5356},{"class":82,"line":146},[5357],{"type":52,"tag":80,"props":5358,"children":5359},{"emptyLinePlaceholder":150},[5360],{"type":58,"value":153},{"type":52,"tag":80,"props":5362,"children":5363},{"class":82,"line":156},[5364,5368,5373,5377,5381,5385,5389,5393,5397,5401,5405,5409,5413,5417,5421,5425,5429,5433,5437],{"type":52,"tag":80,"props":5365,"children":5366},{"style":160},[5367],{"type":58,"value":234},{"type":52,"tag":80,"props":5369,"children":5370},{"style":109},[5371],{"type":58,"value":5372}," ctx ",{"type":52,"tag":80,"props":5374,"children":5375},{"style":103},[5376],{"type":58,"value":244},{"type":52,"tag":80,"props":5378,"children":5379},{"style":97},[5380],{"type":58,"value":1774},{"type":52,"tag":80,"props":5382,"children":5383},{"style":256},[5384],{"type":58,"value":2056},{"type":52,"tag":80,"props":5386,"children":5387},{"style":109},[5388],{"type":58,"value":795},{"type":52,"tag":80,"props":5390,"children":5391},{"style":103},[5392],{"type":58,"value":697},{"type":52,"tag":80,"props":5394,"children":5395},{"style":181},[5396],{"type":58,"value":184},{"type":52,"tag":80,"props":5398,"children":5399},{"style":103},[5400],{"type":58,"value":203},{"type":52,"tag":80,"props":5402,"children":5403},{"style":103},[5404],{"type":58,"value":106},{"type":52,"tag":80,"props":5406,"children":5407},{"style":181},[5408],{"type":58,"value":198},{"type":52,"tag":80,"props":5410,"children":5411},{"style":103},[5412],{"type":58,"value":203},{"type":52,"tag":80,"props":5414,"children":5415},{"style":103},[5416],{"type":58,"value":127},{"type":52,"tag":80,"props":5418,"children":5419},{"style":130},[5420],{"type":58,"value":714},{"type":52,"tag":80,"props":5422,"children":5423},{"style":103},[5424],{"type":58,"value":138},{"type":52,"tag":80,"props":5426,"children":5427},{"style":103},[5428],{"type":58,"value":117},{"type":52,"tag":80,"props":5430,"children":5431},{"style":103},[5432],{"type":58,"value":117},{"type":52,"tag":80,"props":5434,"children":5435},{"style":109},[5436],{"type":58,"value":1095},{"type":52,"tag":80,"props":5438,"children":5439},{"style":103},[5440],{"type":58,"value":143},{"type":52,"tag":80,"props":5442,"children":5443},{"class":82,"line":220},[5444,5448,5452,5456,5460,5464,5468,5473],{"type":52,"tag":80,"props":5445,"children":5446},{"style":160},[5447],{"type":58,"value":234},{"type":52,"tag":80,"props":5449,"children":5450},{"style":109},[5451],{"type":58,"value":1689},{"type":52,"tag":80,"props":5453,"children":5454},{"style":103},[5455],{"type":58,"value":244},{"type":52,"tag":80,"props":5457,"children":5458},{"style":109},[5459],{"type":58,"value":1576},{"type":52,"tag":80,"props":5461,"children":5462},{"style":103},[5463],{"type":58,"value":253},{"type":52,"tag":80,"props":5465,"children":5466},{"style":256},[5467],{"type":58,"value":2932},{"type":52,"tag":80,"props":5469,"children":5470},{"style":109},[5471],{"type":58,"value":5472},"(ctx)",{"type":52,"tag":80,"props":5474,"children":5475},{"style":103},[5476],{"type":58,"value":143},{"type":52,"tag":80,"props":5478,"children":5479},{"class":82,"line":228},[5480,5484,5488,5492,5496,5500],{"type":52,"tag":80,"props":5481,"children":5482},{"style":97},[5483],{"type":58,"value":5235},{"type":52,"tag":80,"props":5485,"children":5486},{"style":109},[5487],{"type":58,"value":1779},{"type":52,"tag":80,"props":5489,"children":5490},{"style":103},[5491],{"type":58,"value":253},{"type":52,"tag":80,"props":5493,"children":5494},{"style":256},[5495],{"type":58,"value":5248},{"type":52,"tag":80,"props":5497,"children":5498},{"style":109},[5499],{"type":58,"value":279},{"type":52,"tag":80,"props":5501,"children":5502},{"style":103},[5503],{"type":58,"value":143},{"type":52,"tag":1295,"props":5505,"children":5506},{},[5507,5512],{"type":52,"tag":76,"props":5508,"children":5510},{"className":5509},[],[5511],{"type":58,"value":2932},{"type":58,"value":5513}," requires a context object matching what procedures and middleware expect; passing an empty object when procedures require auth context causes runtime errors.",{"type":52,"tag":1295,"props":5515,"children":5516},{},[5517],{"type":58,"value":5116},{"type":52,"tag":61,"props":5519,"children":5521},{"id":5520},"see-also",[5522],{"type":58,"value":5523},"See Also",{"type":52,"tag":5525,"props":5526,"children":5527},"ul",{},[5528,5539,5550],{"type":52,"tag":5529,"props":5530,"children":5531},"li",{},[5532,5537],{"type":52,"tag":76,"props":5533,"children":5535},{"className":5534},[],[5536],{"type":58,"value":45},{"type":58,"value":5538}," -- initTRPC, routers, context configuration",{"type":52,"tag":5529,"props":5540,"children":5541},{},[5542,5548],{"type":52,"tag":76,"props":5543,"children":5545},{"className":5544},[],[5546],{"type":58,"value":5547},"middlewares",{"type":58,"value":5549}," -- auth middleware that callers must satisfy",{"type":52,"tag":5529,"props":5551,"children":5552},{},[5553,5559],{"type":52,"tag":76,"props":5554,"children":5556},{"className":5555},[],[5557],{"type":58,"value":5558},"error-handling",{"type":58,"value":5560}," -- TRPCError and getHTTPStatusCodeFromError",{"type":52,"tag":5562,"props":5563,"children":5564},"style",{},[5565],{"type":58,"value":5566},"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":5568,"total":1219},[5569,5582,5595,5608,5628,5641,5655,5669,5681,5694,5704,5715],{"slug":5570,"name":5570,"fn":5571,"description":5572,"org":5573,"tags":5574,"stars":23,"repoUrl":24,"updatedAt":5581},"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},[5575,5576,5579,5580],{"name":18,"slug":19,"type":15},{"name":5577,"slug":5578,"type":15},"AWS","aws",{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},"2026-07-18T05:47:05.451869",{"slug":5583,"name":5583,"fn":5584,"description":5585,"org":5586,"tags":5587,"stars":23,"repoUrl":24,"updatedAt":5594},"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},[5588,5589,5590,5593],{"name":18,"slug":19,"type":15},{"name":13,"slug":14,"type":15},{"name":5591,"slug":5592,"type":15},"Express","express",{"name":9,"slug":8,"type":15},"2026-07-18T05:46:53.274248",{"slug":5596,"name":5596,"fn":5597,"description":5598,"org":5599,"tags":5600,"stars":23,"repoUrl":24,"updatedAt":5607},"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},[5601,5602,5603,5606],{"name":18,"slug":19,"type":15},{"name":13,"slug":14,"type":15},{"name":5604,"slug":5605,"type":15},"Fastify","fastify",{"name":9,"slug":8,"type":15},"2026-07-18T05:46:53.746621",{"slug":5609,"name":5609,"fn":5610,"description":5611,"org":5612,"tags":5613,"stars":23,"repoUrl":24,"updatedAt":5627},"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},[5614,5617,5620,5623,5624],{"name":5615,"slug":5616,"type":15},"Cloudflare","cloudflare",{"name":5618,"slug":5619,"type":15},"Deployment","deployment",{"name":5621,"slug":5622,"type":15},"Edge","edge",{"name":9,"slug":8,"type":15},{"name":5625,"slug":5626,"type":15},"Vercel","vercel","2026-07-18T05:46:50.548228",{"slug":5629,"name":5629,"fn":5630,"description":5631,"org":5632,"tags":5633,"stars":23,"repoUrl":24,"updatedAt":5640},"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},[5634,5635,5636,5639],{"name":18,"slug":19,"type":15},{"name":13,"slug":14,"type":15},{"name":5637,"slug":5638,"type":15},"Node.js","node-js",{"name":9,"slug":8,"type":15},"2026-07-18T05:46:58.093869",{"slug":5642,"name":5642,"fn":5643,"description":5644,"org":5645,"tags":5646,"stars":23,"repoUrl":24,"updatedAt":5654},"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},[5647,5649,5652,5653],{"name":5648,"slug":5642,"type":15},"Auth",{"name":5650,"slug":5651,"type":15},"Authentication","authentication",{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},"2026-07-18T05:46:45.347628",{"slug":5656,"name":5656,"fn":5657,"description":5658,"org":5659,"tags":5660,"stars":23,"repoUrl":24,"updatedAt":5668},"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},[5661,5662,5664,5667],{"name":13,"slug":14,"type":15},{"name":5663,"slug":5656,"type":15},"Caching",{"name":5665,"slug":5666,"type":15},"Performance","performance",{"name":9,"slug":8,"type":15},"2026-07-18T05:46:45.86443",{"slug":5670,"name":5670,"fn":5671,"description":5672,"org":5673,"tags":5674,"stars":23,"repoUrl":24,"updatedAt":5680},"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},[5675,5676,5679],{"name":18,"slug":19,"type":15},{"name":5677,"slug":5678,"type":15},"Frontend","frontend",{"name":9,"slug":8,"type":15},"2026-07-18T05:48:11.437946",{"slug":5558,"name":5558,"fn":5682,"description":5683,"org":5684,"tags":5685,"stars":23,"repoUrl":24,"updatedAt":5693},"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},[5686,5687,5690,5691],{"name":13,"slug":14,"type":15},{"name":5688,"slug":5689,"type":15},"Debugging","debugging",{"name":9,"slug":8,"type":15},{"name":5692,"slug":34,"type":15},"TypeScript","2026-07-18T05:46:52.798151",{"slug":5695,"name":5695,"fn":5696,"description":5697,"org":5698,"tags":5699,"stars":23,"repoUrl":24,"updatedAt":5703},"links","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},[5700,5701,5702],{"name":18,"slug":19,"type":15},{"name":5677,"slug":5678,"type":15},{"name":9,"slug":8,"type":15},"2026-07-18T05:47:06.847309",{"slug":5547,"name":5547,"fn":5705,"description":5706,"org":5707,"tags":5708,"stars":23,"repoUrl":24,"updatedAt":5714},"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},[5709,5710,5713],{"name":13,"slug":14,"type":15},{"name":5711,"slug":5712,"type":15},"Middleware","middleware",{"name":9,"slug":8,"type":15},"2026-07-18T05:46:49.132255",{"slug":5716,"name":5716,"fn":5717,"description":5718,"org":5719,"tags":5720,"stars":23,"repoUrl":24,"updatedAt":5728},"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},[5721,5722,5723,5726,5727],{"name":13,"slug":14,"type":15},{"name":5677,"slug":5678,"type":15},{"name":5724,"slug":5725,"type":15},"Next.js","next-js",{"name":9,"slug":8,"type":15},{"name":5692,"slug":34,"type":15},"2026-07-18T05:47:10.468453",{"items":5730,"total":1219},[5731,5738,5745,5752,5760,5767,5774],{"slug":5570,"name":5570,"fn":5571,"description":5572,"org":5732,"tags":5733,"stars":23,"repoUrl":24,"updatedAt":5581},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5734,5735,5736,5737],{"name":18,"slug":19,"type":15},{"name":5577,"slug":5578,"type":15},{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},{"slug":5583,"name":5583,"fn":5584,"description":5585,"org":5739,"tags":5740,"stars":23,"repoUrl":24,"updatedAt":5594},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5741,5742,5743,5744],{"name":18,"slug":19,"type":15},{"name":13,"slug":14,"type":15},{"name":5591,"slug":5592,"type":15},{"name":9,"slug":8,"type":15},{"slug":5596,"name":5596,"fn":5597,"description":5598,"org":5746,"tags":5747,"stars":23,"repoUrl":24,"updatedAt":5607},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5748,5749,5750,5751],{"name":18,"slug":19,"type":15},{"name":13,"slug":14,"type":15},{"name":5604,"slug":5605,"type":15},{"name":9,"slug":8,"type":15},{"slug":5609,"name":5609,"fn":5610,"description":5611,"org":5753,"tags":5754,"stars":23,"repoUrl":24,"updatedAt":5627},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5755,5756,5757,5758,5759],{"name":5615,"slug":5616,"type":15},{"name":5618,"slug":5619,"type":15},{"name":5621,"slug":5622,"type":15},{"name":9,"slug":8,"type":15},{"name":5625,"slug":5626,"type":15},{"slug":5629,"name":5629,"fn":5630,"description":5631,"org":5761,"tags":5762,"stars":23,"repoUrl":24,"updatedAt":5640},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5763,5764,5765,5766],{"name":18,"slug":19,"type":15},{"name":13,"slug":14,"type":15},{"name":5637,"slug":5638,"type":15},{"name":9,"slug":8,"type":15},{"slug":5642,"name":5642,"fn":5643,"description":5644,"org":5768,"tags":5769,"stars":23,"repoUrl":24,"updatedAt":5654},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5770,5771,5772,5773],{"name":5648,"slug":5642,"type":15},{"name":5650,"slug":5651,"type":15},{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},{"slug":5656,"name":5656,"fn":5657,"description":5658,"org":5775,"tags":5776,"stars":23,"repoUrl":24,"updatedAt":5668},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5777,5778,5779,5780],{"name":13,"slug":14,"type":15},{"name":5663,"slug":5656,"type":15},{"name":5665,"slug":5666,"type":15},{"name":9,"slug":8,"type":15}]