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