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