[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-trpc-caching":3,"mdc--drsrv-key":39,"related-org-trpc-caching":3759,"related-repo-trpc-caching":3915},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":22,"repoUrl":23,"updatedAt":24,"license":25,"forks":26,"topics":27,"repo":34,"sourceUrl":37,"mdContent":38},"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},"trpc","tRPC","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Ftrpc.png",[12,16,19,20],{"name":13,"slug":14,"type":15},"Performance","performance","tag",{"name":17,"slug":18,"type":15},"Backend","backend",{"name":9,"slug":8,"type":15},{"name":21,"slug":4,"type":15},"Caching",40424,"https:\u002F\u002Fgithub.com\u002Ftrpc\u002Ftrpc","2026-07-18T05:46:45.86443",null,1636,[28,29,30,31,32,33],"api","next","nextjs","prisma","react","typescript",{"repoUrl":23,"stars":22,"forks":26,"topics":35,"description":36},[28,29,30,31,32,33],"🧙‍♀️  Move Fast and Break Nothing. End-to-end typesafe APIs made easy. ","https:\u002F\u002Fgithub.com\u002Ftrpc\u002Ftrpc\u002Ftree\u002FHEAD\u002Fpackages\u002Fserver\u002Fskills\u002Fcaching","---\nname: caching\ndescription: >\n  Set HTTP cache headers on tRPC query responses via responseMeta callback for\n  CDN and browser caching. Configure Cache-Control, s-maxage,\n  stale-while-revalidate. Handle caching with batching and authenticated requests.\n  Avoid caching mutations, errors, and authenticated responses.\ntype: core\nlibrary: trpc\nlibrary_version: '11.16.0'\nrequires:\n  - server-setup\nsources:\n  - 'trpc\u002Ftrpc:www\u002Fdocs\u002Fserver\u002Fcaching.md'\n---\n\n# tRPC -- Caching\n\n## Setup\n\n```ts\n\u002F\u002F server\u002Ftrpc.ts\nimport { initTRPC } from '@trpc\u002Fserver';\nimport type { CreateHTTPContextOptions } from '@trpc\u002Fserver\u002Fadapters\u002Fstandalone';\n\nexport const createContext = async (opts: CreateHTTPContextOptions) => {\n  return {\n    req: opts.req,\n    res: opts.res,\n    user: null as { id: string } | null,\n  };\n};\n\ntype Context = Awaited\u003CReturnType\u003Ctypeof createContext>>;\n\nexport const t = initTRPC.context\u003CContext>().create();\nexport const router = t.router;\nexport const publicProcedure = t.procedure;\n```\n\n```ts\n\u002F\u002F server\u002FappRouter.ts\nimport { publicProcedure, router } from '.\u002Ftrpc';\n\nexport const appRouter = router({\n  public: router({\n    slowQueryCached: publicProcedure.query(async () => {\n      await new Promise((resolve) => setTimeout(resolve, 5000));\n      return { lastUpdated: new Date().toJSON() };\n    }),\n  }),\n});\n\nexport type AppRouter = typeof appRouter;\n```\n\n```ts\n\u002F\u002F server\u002Findex.ts\nimport { createHTTPServer } from '@trpc\u002Fserver\u002Fadapters\u002Fstandalone';\nimport { appRouter } from '.\u002FappRouter';\nimport { createContext } from '.\u002Ftrpc';\n\nconst server = createHTTPServer({\n  router: appRouter,\n  createContext,\n  responseMeta(opts) {\n    const { paths, errors, type } = opts;\n\n    const allPublic =\n      paths && paths.every((path) => path.startsWith('public.'));\n    const allOk = errors.length === 0;\n    const isQuery = type === 'query';\n\n    if (allPublic && allOk && isQuery) {\n      const ONE_DAY_IN_SECONDS = 60 * 60 * 24;\n      return {\n        headers: new Headers([\n          [\n            'cache-control',\n            `s-maxage=1, stale-while-revalidate=${ONE_DAY_IN_SECONDS}`,\n          ],\n        ]),\n      };\n    }\n    return {};\n  },\n});\n\nserver.listen(3000);\n```\n\n## Core Patterns\n\n### Path-based public route caching\n\n```ts\nimport { createHTTPServer } from '@trpc\u002Fserver\u002Fadapters\u002Fstandalone';\nimport { appRouter } from '.\u002FappRouter';\nimport { createContext } from '.\u002Ftrpc';\n\nconst server = createHTTPServer({\n  router: appRouter,\n  createContext,\n  responseMeta({ paths, errors, type }) {\n    const allPublic =\n      paths && paths.every((path) => path.startsWith('public.'));\n    const allOk = errors.length === 0;\n    const isQuery = type === 'query';\n\n    if (allPublic && allOk && isQuery) {\n      return {\n        headers: new Headers([\n          ['cache-control', 's-maxage=1, stale-while-revalidate=86400'],\n        ]),\n      };\n    }\n    return {};\n  },\n});\n```\n\nName public routes with a `public` prefix (e.g., `public.slowQueryCached`) so `responseMeta` can identify them by path.\n\n### Skip caching for authenticated requests\n\n```ts\nimport { createHTTPServer } from '@trpc\u002Fserver\u002Fadapters\u002Fstandalone';\nimport { appRouter } from '.\u002FappRouter';\nimport { createContext } from '.\u002Ftrpc';\n\nconst server = createHTTPServer({\n  router: appRouter,\n  createContext,\n  responseMeta({ ctx, errors, type }) {\n    if (ctx?.user || errors.length > 0 || type !== 'query') {\n      return {};\n    }\n    return {\n      headers: new Headers([\n        ['cache-control', 's-maxage=1, stale-while-revalidate=86400'],\n      ]),\n    };\n  },\n});\n```\n\n## Common Mistakes\n\n### [CRITICAL] Caching authenticated responses\n\nWrong:\n\n```ts\nimport { createHTTPServer } from '@trpc\u002Fserver\u002Fadapters\u002Fstandalone';\nimport { appRouter } from '.\u002FappRouter';\n\nconst server = createHTTPServer({\n  router: appRouter,\n  responseMeta() {\n    return {\n      headers: new Headers([['cache-control', 's-maxage=60']]),\n    };\n  },\n});\n```\n\nCorrect:\n\n```ts\nimport { createHTTPServer } from '@trpc\u002Fserver\u002Fadapters\u002Fstandalone';\nimport { appRouter } from '.\u002FappRouter';\nimport { createContext } from '.\u002Ftrpc';\n\nconst server = createHTTPServer({\n  router: appRouter,\n  createContext,\n  responseMeta({ ctx, errors, type }) {\n    if (ctx?.user || errors.length > 0 || type !== 'query') {\n      return {};\n    }\n    return {\n      headers: new Headers([\n        ['cache-control', 's-maxage=1, stale-while-revalidate=86400'],\n      ]),\n    };\n  },\n});\n```\n\nWith batching enabled by default, a cached response containing personal data could be served to other users; always check for auth context, errors, and request type before setting cache headers.\n\nSource: www\u002Fdocs\u002Fserver\u002Fcaching.md\n\n### [HIGH] Next.js App Router overrides Cache-Control headers\n\nThere is no code fix for this -- Next.js App Router overrides `Cache-Control` headers set by tRPC via `responseMeta`. The documented caching approach using `responseMeta` does not work as expected in App Router. Use Next.js native caching mechanisms (`revalidate`, `unstable_cache`) instead when deploying on App Router.\n\nSource: https:\u002F\u002Fgithub.com\u002Ftrpc\u002Ftrpc\u002Fissues\u002F5625\n\n## See Also\n\n- `server-setup` -- initTRPC, createContext configuration\n- `adapter-standalone` -- responseMeta option on createHTTPServer\n- `adapter-fetch` -- responseMeta option on fetchRequestHandler\n- `links` -- splitLink to separate public\u002Fprivate requests on the client\n",{"data":40,"body":47},{"name":4,"description":6,"type":41,"library":8,"library_version":42,"requires":43,"sources":45},"core","11.16.0",[44],"server-setup",[46],"trpc\u002Ftrpc:www\u002Fdocs\u002Fserver\u002Fcaching.md",{"type":48,"children":49},"root",[50,59,66,632,1022,1814,1820,1827,2412,2442,2448,2900,2906,2917,2922,3177,3182,3622,3627,3632,3643,3686,3699,3705,3753],{"type":51,"tag":52,"props":53,"children":55},"element","h1",{"id":54},"trpc-caching",[56],{"type":57,"value":58},"text","tRPC -- Caching",{"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":73},"pre",{"className":69,"code":70,"language":71,"meta":72,"style":72},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F server\u002Ftrpc.ts\nimport { initTRPC } from '@trpc\u002Fserver';\nimport type { CreateHTTPContextOptions } from '@trpc\u002Fserver\u002Fadapters\u002Fstandalone';\n\nexport const createContext = async (opts: CreateHTTPContextOptions) => {\n  return {\n    req: opts.req,\n    res: opts.res,\n    user: null as { id: string } | null,\n  };\n};\n\ntype Context = Awaited\u003CReturnType\u003Ctypeof createContext>>;\n\nexport const t = initTRPC.context\u003CContext>().create();\nexport const router = t.router;\nexport const publicProcedure = t.procedure;\n","ts","",[74],{"type":51,"tag":75,"props":76,"children":77},"code",{"__ignoreMap":72},[78,90,143,190,200,266,279,313,343,401,410,419,427,476,484,555,594],{"type":51,"tag":79,"props":80,"children":83},"span",{"class":81,"line":82},"line",1,[84],{"type":51,"tag":79,"props":85,"children":87},{"style":86},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[88],{"type":57,"value":89},"\u002F\u002F server\u002Ftrpc.ts\n",{"type":51,"tag":79,"props":91,"children":93},{"class":81,"line":92},2,[94,100,106,112,117,122,127,133,138],{"type":51,"tag":79,"props":95,"children":97},{"style":96},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[98],{"type":57,"value":99},"import",{"type":51,"tag":79,"props":101,"children":103},{"style":102},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[104],{"type":57,"value":105}," {",{"type":51,"tag":79,"props":107,"children":109},{"style":108},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[110],{"type":57,"value":111}," initTRPC",{"type":51,"tag":79,"props":113,"children":114},{"style":102},[115],{"type":57,"value":116}," }",{"type":51,"tag":79,"props":118,"children":119},{"style":96},[120],{"type":57,"value":121}," from",{"type":51,"tag":79,"props":123,"children":124},{"style":102},[125],{"type":57,"value":126}," '",{"type":51,"tag":79,"props":128,"children":130},{"style":129},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[131],{"type":57,"value":132},"@trpc\u002Fserver",{"type":51,"tag":79,"props":134,"children":135},{"style":102},[136],{"type":57,"value":137},"'",{"type":51,"tag":79,"props":139,"children":140},{"style":102},[141],{"type":57,"value":142},";\n",{"type":51,"tag":79,"props":144,"children":146},{"class":81,"line":145},3,[147,151,156,160,165,169,173,177,182,186],{"type":51,"tag":79,"props":148,"children":149},{"style":96},[150],{"type":57,"value":99},{"type":51,"tag":79,"props":152,"children":153},{"style":96},[154],{"type":57,"value":155}," type",{"type":51,"tag":79,"props":157,"children":158},{"style":102},[159],{"type":57,"value":105},{"type":51,"tag":79,"props":161,"children":162},{"style":108},[163],{"type":57,"value":164}," CreateHTTPContextOptions",{"type":51,"tag":79,"props":166,"children":167},{"style":102},[168],{"type":57,"value":116},{"type":51,"tag":79,"props":170,"children":171},{"style":96},[172],{"type":57,"value":121},{"type":51,"tag":79,"props":174,"children":175},{"style":102},[176],{"type":57,"value":126},{"type":51,"tag":79,"props":178,"children":179},{"style":129},[180],{"type":57,"value":181},"@trpc\u002Fserver\u002Fadapters\u002Fstandalone",{"type":51,"tag":79,"props":183,"children":184},{"style":102},[185],{"type":57,"value":137},{"type":51,"tag":79,"props":187,"children":188},{"style":102},[189],{"type":57,"value":142},{"type":51,"tag":79,"props":191,"children":193},{"class":81,"line":192},4,[194],{"type":51,"tag":79,"props":195,"children":197},{"emptyLinePlaceholder":196},true,[198],{"type":57,"value":199},"\n",{"type":51,"tag":79,"props":201,"children":203},{"class":81,"line":202},5,[204,209,215,220,225,230,235,241,246,251,256,261],{"type":51,"tag":79,"props":205,"children":206},{"style":96},[207],{"type":57,"value":208},"export",{"type":51,"tag":79,"props":210,"children":212},{"style":211},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[213],{"type":57,"value":214}," const",{"type":51,"tag":79,"props":216,"children":217},{"style":108},[218],{"type":57,"value":219}," createContext ",{"type":51,"tag":79,"props":221,"children":222},{"style":102},[223],{"type":57,"value":224},"=",{"type":51,"tag":79,"props":226,"children":227},{"style":211},[228],{"type":57,"value":229}," async",{"type":51,"tag":79,"props":231,"children":232},{"style":102},[233],{"type":57,"value":234}," (",{"type":51,"tag":79,"props":236,"children":238},{"style":237},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[239],{"type":57,"value":240},"opts",{"type":51,"tag":79,"props":242,"children":243},{"style":102},[244],{"type":57,"value":245},":",{"type":51,"tag":79,"props":247,"children":249},{"style":248},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[250],{"type":57,"value":164},{"type":51,"tag":79,"props":252,"children":253},{"style":102},[254],{"type":57,"value":255},")",{"type":51,"tag":79,"props":257,"children":258},{"style":211},[259],{"type":57,"value":260}," =>",{"type":51,"tag":79,"props":262,"children":263},{"style":102},[264],{"type":57,"value":265}," {\n",{"type":51,"tag":79,"props":267,"children":269},{"class":81,"line":268},6,[270,275],{"type":51,"tag":79,"props":271,"children":272},{"style":96},[273],{"type":57,"value":274},"  return",{"type":51,"tag":79,"props":276,"children":277},{"style":102},[278],{"type":57,"value":265},{"type":51,"tag":79,"props":280,"children":282},{"class":81,"line":281},7,[283,289,293,298,303,308],{"type":51,"tag":79,"props":284,"children":286},{"style":285},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[287],{"type":57,"value":288},"    req",{"type":51,"tag":79,"props":290,"children":291},{"style":102},[292],{"type":57,"value":245},{"type":51,"tag":79,"props":294,"children":295},{"style":108},[296],{"type":57,"value":297}," opts",{"type":51,"tag":79,"props":299,"children":300},{"style":102},[301],{"type":57,"value":302},".",{"type":51,"tag":79,"props":304,"children":305},{"style":108},[306],{"type":57,"value":307},"req",{"type":51,"tag":79,"props":309,"children":310},{"style":102},[311],{"type":57,"value":312},",\n",{"type":51,"tag":79,"props":314,"children":316},{"class":81,"line":315},8,[317,322,326,330,334,339],{"type":51,"tag":79,"props":318,"children":319},{"style":285},[320],{"type":57,"value":321},"    res",{"type":51,"tag":79,"props":323,"children":324},{"style":102},[325],{"type":57,"value":245},{"type":51,"tag":79,"props":327,"children":328},{"style":108},[329],{"type":57,"value":297},{"type":51,"tag":79,"props":331,"children":332},{"style":102},[333],{"type":57,"value":302},{"type":51,"tag":79,"props":335,"children":336},{"style":108},[337],{"type":57,"value":338},"res",{"type":51,"tag":79,"props":340,"children":341},{"style":102},[342],{"type":57,"value":312},{"type":51,"tag":79,"props":344,"children":346},{"class":81,"line":345},9,[347,352,356,361,366,370,375,379,384,388,393,397],{"type":51,"tag":79,"props":348,"children":349},{"style":285},[350],{"type":57,"value":351},"    user",{"type":51,"tag":79,"props":353,"children":354},{"style":102},[355],{"type":57,"value":245},{"type":51,"tag":79,"props":357,"children":358},{"style":102},[359],{"type":57,"value":360}," null",{"type":51,"tag":79,"props":362,"children":363},{"style":96},[364],{"type":57,"value":365}," as",{"type":51,"tag":79,"props":367,"children":368},{"style":102},[369],{"type":57,"value":105},{"type":51,"tag":79,"props":371,"children":372},{"style":285},[373],{"type":57,"value":374}," id",{"type":51,"tag":79,"props":376,"children":377},{"style":102},[378],{"type":57,"value":245},{"type":51,"tag":79,"props":380,"children":381},{"style":248},[382],{"type":57,"value":383}," string",{"type":51,"tag":79,"props":385,"children":386},{"style":102},[387],{"type":57,"value":116},{"type":51,"tag":79,"props":389,"children":390},{"style":102},[391],{"type":57,"value":392}," |",{"type":51,"tag":79,"props":394,"children":395},{"style":248},[396],{"type":57,"value":360},{"type":51,"tag":79,"props":398,"children":399},{"style":102},[400],{"type":57,"value":312},{"type":51,"tag":79,"props":402,"children":404},{"class":81,"line":403},10,[405],{"type":51,"tag":79,"props":406,"children":407},{"style":102},[408],{"type":57,"value":409},"  };\n",{"type":51,"tag":79,"props":411,"children":413},{"class":81,"line":412},11,[414],{"type":51,"tag":79,"props":415,"children":416},{"style":102},[417],{"type":57,"value":418},"};\n",{"type":51,"tag":79,"props":420,"children":422},{"class":81,"line":421},12,[423],{"type":51,"tag":79,"props":424,"children":425},{"emptyLinePlaceholder":196},[426],{"type":57,"value":199},{"type":51,"tag":79,"props":428,"children":430},{"class":81,"line":429},13,[431,436,441,446,451,456,461,466,471],{"type":51,"tag":79,"props":432,"children":433},{"style":211},[434],{"type":57,"value":435},"type",{"type":51,"tag":79,"props":437,"children":438},{"style":248},[439],{"type":57,"value":440}," Context",{"type":51,"tag":79,"props":442,"children":443},{"style":102},[444],{"type":57,"value":445}," =",{"type":51,"tag":79,"props":447,"children":448},{"style":248},[449],{"type":57,"value":450}," Awaited",{"type":51,"tag":79,"props":452,"children":453},{"style":102},[454],{"type":57,"value":455},"\u003C",{"type":51,"tag":79,"props":457,"children":458},{"style":248},[459],{"type":57,"value":460},"ReturnType",{"type":51,"tag":79,"props":462,"children":463},{"style":102},[464],{"type":57,"value":465},"\u003Ctypeof",{"type":51,"tag":79,"props":467,"children":468},{"style":108},[469],{"type":57,"value":470}," createContext",{"type":51,"tag":79,"props":472,"children":473},{"style":102},[474],{"type":57,"value":475},">>;\n",{"type":51,"tag":79,"props":477,"children":479},{"class":81,"line":478},14,[480],{"type":51,"tag":79,"props":481,"children":482},{"emptyLinePlaceholder":196},[483],{"type":57,"value":199},{"type":51,"tag":79,"props":485,"children":487},{"class":81,"line":486},15,[488,492,496,501,505,509,513,519,523,528,533,538,542,547,551],{"type":51,"tag":79,"props":489,"children":490},{"style":96},[491],{"type":57,"value":208},{"type":51,"tag":79,"props":493,"children":494},{"style":211},[495],{"type":57,"value":214},{"type":51,"tag":79,"props":497,"children":498},{"style":108},[499],{"type":57,"value":500}," t ",{"type":51,"tag":79,"props":502,"children":503},{"style":102},[504],{"type":57,"value":224},{"type":51,"tag":79,"props":506,"children":507},{"style":108},[508],{"type":57,"value":111},{"type":51,"tag":79,"props":510,"children":511},{"style":102},[512],{"type":57,"value":302},{"type":51,"tag":79,"props":514,"children":516},{"style":515},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[517],{"type":57,"value":518},"context",{"type":51,"tag":79,"props":520,"children":521},{"style":102},[522],{"type":57,"value":455},{"type":51,"tag":79,"props":524,"children":525},{"style":248},[526],{"type":57,"value":527},"Context",{"type":51,"tag":79,"props":529,"children":530},{"style":102},[531],{"type":57,"value":532},">",{"type":51,"tag":79,"props":534,"children":535},{"style":108},[536],{"type":57,"value":537},"()",{"type":51,"tag":79,"props":539,"children":540},{"style":102},[541],{"type":57,"value":302},{"type":51,"tag":79,"props":543,"children":544},{"style":515},[545],{"type":57,"value":546},"create",{"type":51,"tag":79,"props":548,"children":549},{"style":108},[550],{"type":57,"value":537},{"type":51,"tag":79,"props":552,"children":553},{"style":102},[554],{"type":57,"value":142},{"type":51,"tag":79,"props":556,"children":558},{"class":81,"line":557},16,[559,563,567,572,576,581,585,590],{"type":51,"tag":79,"props":560,"children":561},{"style":96},[562],{"type":57,"value":208},{"type":51,"tag":79,"props":564,"children":565},{"style":211},[566],{"type":57,"value":214},{"type":51,"tag":79,"props":568,"children":569},{"style":108},[570],{"type":57,"value":571}," router ",{"type":51,"tag":79,"props":573,"children":574},{"style":102},[575],{"type":57,"value":224},{"type":51,"tag":79,"props":577,"children":578},{"style":108},[579],{"type":57,"value":580}," t",{"type":51,"tag":79,"props":582,"children":583},{"style":102},[584],{"type":57,"value":302},{"type":51,"tag":79,"props":586,"children":587},{"style":108},[588],{"type":57,"value":589},"router",{"type":51,"tag":79,"props":591,"children":592},{"style":102},[593],{"type":57,"value":142},{"type":51,"tag":79,"props":595,"children":597},{"class":81,"line":596},17,[598,602,606,611,615,619,623,628],{"type":51,"tag":79,"props":599,"children":600},{"style":96},[601],{"type":57,"value":208},{"type":51,"tag":79,"props":603,"children":604},{"style":211},[605],{"type":57,"value":214},{"type":51,"tag":79,"props":607,"children":608},{"style":108},[609],{"type":57,"value":610}," publicProcedure ",{"type":51,"tag":79,"props":612,"children":613},{"style":102},[614],{"type":57,"value":224},{"type":51,"tag":79,"props":616,"children":617},{"style":108},[618],{"type":57,"value":580},{"type":51,"tag":79,"props":620,"children":621},{"style":102},[622],{"type":57,"value":302},{"type":51,"tag":79,"props":624,"children":625},{"style":108},[626],{"type":57,"value":627},"procedure",{"type":51,"tag":79,"props":629,"children":630},{"style":102},[631],{"type":57,"value":142},{"type":51,"tag":67,"props":633,"children":635},{"className":69,"code":634,"language":71,"meta":72,"style":72},"\u002F\u002F server\u002FappRouter.ts\nimport { publicProcedure, router } from '.\u002Ftrpc';\n\nexport const appRouter = router({\n  public: router({\n    slowQueryCached: publicProcedure.query(async () => {\n      await new Promise((resolve) => setTimeout(resolve, 5000));\n      return { lastUpdated: new Date().toJSON() };\n    }),\n  }),\n});\n\nexport type AppRouter = typeof appRouter;\n",[636],{"type":51,"tag":75,"props":637,"children":638},{"__ignoreMap":72},[639,647,698,705,739,763,810,881,933,949,965,981,988],{"type":51,"tag":79,"props":640,"children":641},{"class":81,"line":82},[642],{"type":51,"tag":79,"props":643,"children":644},{"style":86},[645],{"type":57,"value":646},"\u002F\u002F server\u002FappRouter.ts\n",{"type":51,"tag":79,"props":648,"children":649},{"class":81,"line":92},[650,654,658,663,668,673,677,681,685,690,694],{"type":51,"tag":79,"props":651,"children":652},{"style":96},[653],{"type":57,"value":99},{"type":51,"tag":79,"props":655,"children":656},{"style":102},[657],{"type":57,"value":105},{"type":51,"tag":79,"props":659,"children":660},{"style":108},[661],{"type":57,"value":662}," publicProcedure",{"type":51,"tag":79,"props":664,"children":665},{"style":102},[666],{"type":57,"value":667},",",{"type":51,"tag":79,"props":669,"children":670},{"style":108},[671],{"type":57,"value":672}," router",{"type":51,"tag":79,"props":674,"children":675},{"style":102},[676],{"type":57,"value":116},{"type":51,"tag":79,"props":678,"children":679},{"style":96},[680],{"type":57,"value":121},{"type":51,"tag":79,"props":682,"children":683},{"style":102},[684],{"type":57,"value":126},{"type":51,"tag":79,"props":686,"children":687},{"style":129},[688],{"type":57,"value":689},".\u002Ftrpc",{"type":51,"tag":79,"props":691,"children":692},{"style":102},[693],{"type":57,"value":137},{"type":51,"tag":79,"props":695,"children":696},{"style":102},[697],{"type":57,"value":142},{"type":51,"tag":79,"props":699,"children":700},{"class":81,"line":145},[701],{"type":51,"tag":79,"props":702,"children":703},{"emptyLinePlaceholder":196},[704],{"type":57,"value":199},{"type":51,"tag":79,"props":706,"children":707},{"class":81,"line":192},[708,712,716,721,725,729,734],{"type":51,"tag":79,"props":709,"children":710},{"style":96},[711],{"type":57,"value":208},{"type":51,"tag":79,"props":713,"children":714},{"style":211},[715],{"type":57,"value":214},{"type":51,"tag":79,"props":717,"children":718},{"style":108},[719],{"type":57,"value":720}," appRouter ",{"type":51,"tag":79,"props":722,"children":723},{"style":102},[724],{"type":57,"value":224},{"type":51,"tag":79,"props":726,"children":727},{"style":515},[728],{"type":57,"value":672},{"type":51,"tag":79,"props":730,"children":731},{"style":108},[732],{"type":57,"value":733},"(",{"type":51,"tag":79,"props":735,"children":736},{"style":102},[737],{"type":57,"value":738},"{\n",{"type":51,"tag":79,"props":740,"children":741},{"class":81,"line":202},[742,747,751,755,759],{"type":51,"tag":79,"props":743,"children":744},{"style":285},[745],{"type":57,"value":746},"  public",{"type":51,"tag":79,"props":748,"children":749},{"style":102},[750],{"type":57,"value":245},{"type":51,"tag":79,"props":752,"children":753},{"style":515},[754],{"type":57,"value":672},{"type":51,"tag":79,"props":756,"children":757},{"style":108},[758],{"type":57,"value":733},{"type":51,"tag":79,"props":760,"children":761},{"style":102},[762],{"type":57,"value":738},{"type":51,"tag":79,"props":764,"children":765},{"class":81,"line":268},[766,771,775,779,783,788,792,797,802,806],{"type":51,"tag":79,"props":767,"children":768},{"style":285},[769],{"type":57,"value":770},"    slowQueryCached",{"type":51,"tag":79,"props":772,"children":773},{"style":102},[774],{"type":57,"value":245},{"type":51,"tag":79,"props":776,"children":777},{"style":108},[778],{"type":57,"value":662},{"type":51,"tag":79,"props":780,"children":781},{"style":102},[782],{"type":57,"value":302},{"type":51,"tag":79,"props":784,"children":785},{"style":515},[786],{"type":57,"value":787},"query",{"type":51,"tag":79,"props":789,"children":790},{"style":108},[791],{"type":57,"value":733},{"type":51,"tag":79,"props":793,"children":794},{"style":211},[795],{"type":57,"value":796},"async",{"type":51,"tag":79,"props":798,"children":799},{"style":102},[800],{"type":57,"value":801}," ()",{"type":51,"tag":79,"props":803,"children":804},{"style":211},[805],{"type":57,"value":260},{"type":51,"tag":79,"props":807,"children":808},{"style":102},[809],{"type":57,"value":265},{"type":51,"tag":79,"props":811,"children":812},{"class":81,"line":281},[813,818,823,828,832,836,841,845,849,854,858,862,866,872,877],{"type":51,"tag":79,"props":814,"children":815},{"style":96},[816],{"type":57,"value":817},"      await",{"type":51,"tag":79,"props":819,"children":820},{"style":102},[821],{"type":57,"value":822}," new",{"type":51,"tag":79,"props":824,"children":825},{"style":248},[826],{"type":57,"value":827}," Promise",{"type":51,"tag":79,"props":829,"children":830},{"style":285},[831],{"type":57,"value":733},{"type":51,"tag":79,"props":833,"children":834},{"style":102},[835],{"type":57,"value":733},{"type":51,"tag":79,"props":837,"children":838},{"style":237},[839],{"type":57,"value":840},"resolve",{"type":51,"tag":79,"props":842,"children":843},{"style":102},[844],{"type":57,"value":255},{"type":51,"tag":79,"props":846,"children":847},{"style":211},[848],{"type":57,"value":260},{"type":51,"tag":79,"props":850,"children":851},{"style":515},[852],{"type":57,"value":853}," setTimeout",{"type":51,"tag":79,"props":855,"children":856},{"style":285},[857],{"type":57,"value":733},{"type":51,"tag":79,"props":859,"children":860},{"style":108},[861],{"type":57,"value":840},{"type":51,"tag":79,"props":863,"children":864},{"style":102},[865],{"type":57,"value":667},{"type":51,"tag":79,"props":867,"children":869},{"style":868},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[870],{"type":57,"value":871}," 5000",{"type":51,"tag":79,"props":873,"children":874},{"style":285},[875],{"type":57,"value":876},"))",{"type":51,"tag":79,"props":878,"children":879},{"style":102},[880],{"type":57,"value":142},{"type":51,"tag":79,"props":882,"children":883},{"class":81,"line":315},[884,889,893,898,902,906,911,915,919,924,929],{"type":51,"tag":79,"props":885,"children":886},{"style":96},[887],{"type":57,"value":888},"      return",{"type":51,"tag":79,"props":890,"children":891},{"style":102},[892],{"type":57,"value":105},{"type":51,"tag":79,"props":894,"children":895},{"style":285},[896],{"type":57,"value":897}," lastUpdated",{"type":51,"tag":79,"props":899,"children":900},{"style":102},[901],{"type":57,"value":245},{"type":51,"tag":79,"props":903,"children":904},{"style":102},[905],{"type":57,"value":822},{"type":51,"tag":79,"props":907,"children":908},{"style":515},[909],{"type":57,"value":910}," Date",{"type":51,"tag":79,"props":912,"children":913},{"style":285},[914],{"type":57,"value":537},{"type":51,"tag":79,"props":916,"children":917},{"style":102},[918],{"type":57,"value":302},{"type":51,"tag":79,"props":920,"children":921},{"style":515},[922],{"type":57,"value":923},"toJSON",{"type":51,"tag":79,"props":925,"children":926},{"style":285},[927],{"type":57,"value":928},"() ",{"type":51,"tag":79,"props":930,"children":931},{"style":102},[932],{"type":57,"value":418},{"type":51,"tag":79,"props":934,"children":935},{"class":81,"line":345},[936,941,945],{"type":51,"tag":79,"props":937,"children":938},{"style":102},[939],{"type":57,"value":940},"    }",{"type":51,"tag":79,"props":942,"children":943},{"style":108},[944],{"type":57,"value":255},{"type":51,"tag":79,"props":946,"children":947},{"style":102},[948],{"type":57,"value":312},{"type":51,"tag":79,"props":950,"children":951},{"class":81,"line":403},[952,957,961],{"type":51,"tag":79,"props":953,"children":954},{"style":102},[955],{"type":57,"value":956},"  }",{"type":51,"tag":79,"props":958,"children":959},{"style":108},[960],{"type":57,"value":255},{"type":51,"tag":79,"props":962,"children":963},{"style":102},[964],{"type":57,"value":312},{"type":51,"tag":79,"props":966,"children":967},{"class":81,"line":412},[968,973,977],{"type":51,"tag":79,"props":969,"children":970},{"style":102},[971],{"type":57,"value":972},"}",{"type":51,"tag":79,"props":974,"children":975},{"style":108},[976],{"type":57,"value":255},{"type":51,"tag":79,"props":978,"children":979},{"style":102},[980],{"type":57,"value":142},{"type":51,"tag":79,"props":982,"children":983},{"class":81,"line":421},[984],{"type":51,"tag":79,"props":985,"children":986},{"emptyLinePlaceholder":196},[987],{"type":57,"value":199},{"type":51,"tag":79,"props":989,"children":990},{"class":81,"line":429},[991,995,999,1004,1008,1013,1018],{"type":51,"tag":79,"props":992,"children":993},{"style":96},[994],{"type":57,"value":208},{"type":51,"tag":79,"props":996,"children":997},{"style":211},[998],{"type":57,"value":155},{"type":51,"tag":79,"props":1000,"children":1001},{"style":248},[1002],{"type":57,"value":1003}," AppRouter",{"type":51,"tag":79,"props":1005,"children":1006},{"style":102},[1007],{"type":57,"value":445},{"type":51,"tag":79,"props":1009,"children":1010},{"style":102},[1011],{"type":57,"value":1012}," typeof",{"type":51,"tag":79,"props":1014,"children":1015},{"style":108},[1016],{"type":57,"value":1017}," appRouter",{"type":51,"tag":79,"props":1019,"children":1020},{"style":102},[1021],{"type":57,"value":142},{"type":51,"tag":67,"props":1023,"children":1025},{"className":69,"code":1024,"language":71,"meta":72,"style":72},"\u002F\u002F server\u002Findex.ts\nimport { createHTTPServer } from '@trpc\u002Fserver\u002Fadapters\u002Fstandalone';\nimport { appRouter } from '.\u002FappRouter';\nimport { createContext } from '.\u002Ftrpc';\n\nconst server = createHTTPServer({\n  router: appRouter,\n  createContext,\n  responseMeta(opts) {\n    const { paths, errors, type } = opts;\n\n    const allPublic =\n      paths && paths.every((path) => path.startsWith('public.'));\n    const allOk = errors.length === 0;\n    const isQuery = type === 'query';\n\n    if (allPublic && allOk && isQuery) {\n      const ONE_DAY_IN_SECONDS = 60 * 60 * 24;\n      return {\n        headers: new Headers([\n          [\n            'cache-control',\n            `s-maxage=1, stale-while-revalidate=${ONE_DAY_IN_SECONDS}`,\n          ],\n        ]),\n      };\n    }\n    return {};\n  },\n});\n\nserver.listen(3000);\n",[1026],{"type":51,"tag":75,"props":1027,"children":1028},{"__ignoreMap":72},[1029,1037,1077,1117,1156,1163,1192,1212,1224,1248,1298,1305,1322,1408,1451,1491,1498,1540,1585,1597,1624,1633,1655,1688,1701,1714,1723,1732,1746,1755,1771,1779],{"type":51,"tag":79,"props":1030,"children":1031},{"class":81,"line":82},[1032],{"type":51,"tag":79,"props":1033,"children":1034},{"style":86},[1035],{"type":57,"value":1036},"\u002F\u002F server\u002Findex.ts\n",{"type":51,"tag":79,"props":1038,"children":1039},{"class":81,"line":92},[1040,1044,1048,1053,1057,1061,1065,1069,1073],{"type":51,"tag":79,"props":1041,"children":1042},{"style":96},[1043],{"type":57,"value":99},{"type":51,"tag":79,"props":1045,"children":1046},{"style":102},[1047],{"type":57,"value":105},{"type":51,"tag":79,"props":1049,"children":1050},{"style":108},[1051],{"type":57,"value":1052}," createHTTPServer",{"type":51,"tag":79,"props":1054,"children":1055},{"style":102},[1056],{"type":57,"value":116},{"type":51,"tag":79,"props":1058,"children":1059},{"style":96},[1060],{"type":57,"value":121},{"type":51,"tag":79,"props":1062,"children":1063},{"style":102},[1064],{"type":57,"value":126},{"type":51,"tag":79,"props":1066,"children":1067},{"style":129},[1068],{"type":57,"value":181},{"type":51,"tag":79,"props":1070,"children":1071},{"style":102},[1072],{"type":57,"value":137},{"type":51,"tag":79,"props":1074,"children":1075},{"style":102},[1076],{"type":57,"value":142},{"type":51,"tag":79,"props":1078,"children":1079},{"class":81,"line":145},[1080,1084,1088,1092,1096,1100,1104,1109,1113],{"type":51,"tag":79,"props":1081,"children":1082},{"style":96},[1083],{"type":57,"value":99},{"type":51,"tag":79,"props":1085,"children":1086},{"style":102},[1087],{"type":57,"value":105},{"type":51,"tag":79,"props":1089,"children":1090},{"style":108},[1091],{"type":57,"value":1017},{"type":51,"tag":79,"props":1093,"children":1094},{"style":102},[1095],{"type":57,"value":116},{"type":51,"tag":79,"props":1097,"children":1098},{"style":96},[1099],{"type":57,"value":121},{"type":51,"tag":79,"props":1101,"children":1102},{"style":102},[1103],{"type":57,"value":126},{"type":51,"tag":79,"props":1105,"children":1106},{"style":129},[1107],{"type":57,"value":1108},".\u002FappRouter",{"type":51,"tag":79,"props":1110,"children":1111},{"style":102},[1112],{"type":57,"value":137},{"type":51,"tag":79,"props":1114,"children":1115},{"style":102},[1116],{"type":57,"value":142},{"type":51,"tag":79,"props":1118,"children":1119},{"class":81,"line":192},[1120,1124,1128,1132,1136,1140,1144,1148,1152],{"type":51,"tag":79,"props":1121,"children":1122},{"style":96},[1123],{"type":57,"value":99},{"type":51,"tag":79,"props":1125,"children":1126},{"style":102},[1127],{"type":57,"value":105},{"type":51,"tag":79,"props":1129,"children":1130},{"style":108},[1131],{"type":57,"value":470},{"type":51,"tag":79,"props":1133,"children":1134},{"style":102},[1135],{"type":57,"value":116},{"type":51,"tag":79,"props":1137,"children":1138},{"style":96},[1139],{"type":57,"value":121},{"type":51,"tag":79,"props":1141,"children":1142},{"style":102},[1143],{"type":57,"value":126},{"type":51,"tag":79,"props":1145,"children":1146},{"style":129},[1147],{"type":57,"value":689},{"type":51,"tag":79,"props":1149,"children":1150},{"style":102},[1151],{"type":57,"value":137},{"type":51,"tag":79,"props":1153,"children":1154},{"style":102},[1155],{"type":57,"value":142},{"type":51,"tag":79,"props":1157,"children":1158},{"class":81,"line":202},[1159],{"type":51,"tag":79,"props":1160,"children":1161},{"emptyLinePlaceholder":196},[1162],{"type":57,"value":199},{"type":51,"tag":79,"props":1164,"children":1165},{"class":81,"line":268},[1166,1171,1176,1180,1184,1188],{"type":51,"tag":79,"props":1167,"children":1168},{"style":211},[1169],{"type":57,"value":1170},"const",{"type":51,"tag":79,"props":1172,"children":1173},{"style":108},[1174],{"type":57,"value":1175}," server ",{"type":51,"tag":79,"props":1177,"children":1178},{"style":102},[1179],{"type":57,"value":224},{"type":51,"tag":79,"props":1181,"children":1182},{"style":515},[1183],{"type":57,"value":1052},{"type":51,"tag":79,"props":1185,"children":1186},{"style":108},[1187],{"type":57,"value":733},{"type":51,"tag":79,"props":1189,"children":1190},{"style":102},[1191],{"type":57,"value":738},{"type":51,"tag":79,"props":1193,"children":1194},{"class":81,"line":281},[1195,1200,1204,1208],{"type":51,"tag":79,"props":1196,"children":1197},{"style":285},[1198],{"type":57,"value":1199},"  router",{"type":51,"tag":79,"props":1201,"children":1202},{"style":102},[1203],{"type":57,"value":245},{"type":51,"tag":79,"props":1205,"children":1206},{"style":108},[1207],{"type":57,"value":1017},{"type":51,"tag":79,"props":1209,"children":1210},{"style":102},[1211],{"type":57,"value":312},{"type":51,"tag":79,"props":1213,"children":1214},{"class":81,"line":315},[1215,1220],{"type":51,"tag":79,"props":1216,"children":1217},{"style":108},[1218],{"type":57,"value":1219},"  createContext",{"type":51,"tag":79,"props":1221,"children":1222},{"style":102},[1223],{"type":57,"value":312},{"type":51,"tag":79,"props":1225,"children":1226},{"class":81,"line":345},[1227,1232,1236,1240,1244],{"type":51,"tag":79,"props":1228,"children":1229},{"style":285},[1230],{"type":57,"value":1231},"  responseMeta",{"type":51,"tag":79,"props":1233,"children":1234},{"style":102},[1235],{"type":57,"value":733},{"type":51,"tag":79,"props":1237,"children":1238},{"style":237},[1239],{"type":57,"value":240},{"type":51,"tag":79,"props":1241,"children":1242},{"style":102},[1243],{"type":57,"value":255},{"type":51,"tag":79,"props":1245,"children":1246},{"style":102},[1247],{"type":57,"value":265},{"type":51,"tag":79,"props":1249,"children":1250},{"class":81,"line":403},[1251,1256,1260,1265,1269,1274,1278,1282,1286,1290,1294],{"type":51,"tag":79,"props":1252,"children":1253},{"style":211},[1254],{"type":57,"value":1255},"    const",{"type":51,"tag":79,"props":1257,"children":1258},{"style":102},[1259],{"type":57,"value":105},{"type":51,"tag":79,"props":1261,"children":1262},{"style":108},[1263],{"type":57,"value":1264}," paths",{"type":51,"tag":79,"props":1266,"children":1267},{"style":102},[1268],{"type":57,"value":667},{"type":51,"tag":79,"props":1270,"children":1271},{"style":108},[1272],{"type":57,"value":1273}," errors",{"type":51,"tag":79,"props":1275,"children":1276},{"style":102},[1277],{"type":57,"value":667},{"type":51,"tag":79,"props":1279,"children":1280},{"style":108},[1281],{"type":57,"value":155},{"type":51,"tag":79,"props":1283,"children":1284},{"style":102},[1285],{"type":57,"value":116},{"type":51,"tag":79,"props":1287,"children":1288},{"style":102},[1289],{"type":57,"value":445},{"type":51,"tag":79,"props":1291,"children":1292},{"style":108},[1293],{"type":57,"value":297},{"type":51,"tag":79,"props":1295,"children":1296},{"style":102},[1297],{"type":57,"value":142},{"type":51,"tag":79,"props":1299,"children":1300},{"class":81,"line":412},[1301],{"type":51,"tag":79,"props":1302,"children":1303},{"emptyLinePlaceholder":196},[1304],{"type":57,"value":199},{"type":51,"tag":79,"props":1306,"children":1307},{"class":81,"line":421},[1308,1312,1317],{"type":51,"tag":79,"props":1309,"children":1310},{"style":211},[1311],{"type":57,"value":1255},{"type":51,"tag":79,"props":1313,"children":1314},{"style":108},[1315],{"type":57,"value":1316}," allPublic",{"type":51,"tag":79,"props":1318,"children":1319},{"style":102},[1320],{"type":57,"value":1321}," =\n",{"type":51,"tag":79,"props":1323,"children":1324},{"class":81,"line":429},[1325,1330,1335,1339,1343,1348,1352,1356,1361,1365,1369,1374,1378,1383,1387,1391,1396,1400,1404],{"type":51,"tag":79,"props":1326,"children":1327},{"style":108},[1328],{"type":57,"value":1329},"      paths",{"type":51,"tag":79,"props":1331,"children":1332},{"style":102},[1333],{"type":57,"value":1334}," &&",{"type":51,"tag":79,"props":1336,"children":1337},{"style":108},[1338],{"type":57,"value":1264},{"type":51,"tag":79,"props":1340,"children":1341},{"style":102},[1342],{"type":57,"value":302},{"type":51,"tag":79,"props":1344,"children":1345},{"style":515},[1346],{"type":57,"value":1347},"every",{"type":51,"tag":79,"props":1349,"children":1350},{"style":285},[1351],{"type":57,"value":733},{"type":51,"tag":79,"props":1353,"children":1354},{"style":102},[1355],{"type":57,"value":733},{"type":51,"tag":79,"props":1357,"children":1358},{"style":237},[1359],{"type":57,"value":1360},"path",{"type":51,"tag":79,"props":1362,"children":1363},{"style":102},[1364],{"type":57,"value":255},{"type":51,"tag":79,"props":1366,"children":1367},{"style":211},[1368],{"type":57,"value":260},{"type":51,"tag":79,"props":1370,"children":1371},{"style":108},[1372],{"type":57,"value":1373}," path",{"type":51,"tag":79,"props":1375,"children":1376},{"style":102},[1377],{"type":57,"value":302},{"type":51,"tag":79,"props":1379,"children":1380},{"style":515},[1381],{"type":57,"value":1382},"startsWith",{"type":51,"tag":79,"props":1384,"children":1385},{"style":285},[1386],{"type":57,"value":733},{"type":51,"tag":79,"props":1388,"children":1389},{"style":102},[1390],{"type":57,"value":137},{"type":51,"tag":79,"props":1392,"children":1393},{"style":129},[1394],{"type":57,"value":1395},"public.",{"type":51,"tag":79,"props":1397,"children":1398},{"style":102},[1399],{"type":57,"value":137},{"type":51,"tag":79,"props":1401,"children":1402},{"style":285},[1403],{"type":57,"value":876},{"type":51,"tag":79,"props":1405,"children":1406},{"style":102},[1407],{"type":57,"value":142},{"type":51,"tag":79,"props":1409,"children":1410},{"class":81,"line":478},[1411,1415,1420,1424,1428,1432,1437,1442,1447],{"type":51,"tag":79,"props":1412,"children":1413},{"style":211},[1414],{"type":57,"value":1255},{"type":51,"tag":79,"props":1416,"children":1417},{"style":108},[1418],{"type":57,"value":1419}," allOk",{"type":51,"tag":79,"props":1421,"children":1422},{"style":102},[1423],{"type":57,"value":445},{"type":51,"tag":79,"props":1425,"children":1426},{"style":108},[1427],{"type":57,"value":1273},{"type":51,"tag":79,"props":1429,"children":1430},{"style":102},[1431],{"type":57,"value":302},{"type":51,"tag":79,"props":1433,"children":1434},{"style":108},[1435],{"type":57,"value":1436},"length",{"type":51,"tag":79,"props":1438,"children":1439},{"style":102},[1440],{"type":57,"value":1441}," ===",{"type":51,"tag":79,"props":1443,"children":1444},{"style":868},[1445],{"type":57,"value":1446}," 0",{"type":51,"tag":79,"props":1448,"children":1449},{"style":102},[1450],{"type":57,"value":142},{"type":51,"tag":79,"props":1452,"children":1453},{"class":81,"line":486},[1454,1458,1463,1467,1471,1475,1479,1483,1487],{"type":51,"tag":79,"props":1455,"children":1456},{"style":211},[1457],{"type":57,"value":1255},{"type":51,"tag":79,"props":1459,"children":1460},{"style":108},[1461],{"type":57,"value":1462}," isQuery",{"type":51,"tag":79,"props":1464,"children":1465},{"style":102},[1466],{"type":57,"value":445},{"type":51,"tag":79,"props":1468,"children":1469},{"style":108},[1470],{"type":57,"value":155},{"type":51,"tag":79,"props":1472,"children":1473},{"style":102},[1474],{"type":57,"value":1441},{"type":51,"tag":79,"props":1476,"children":1477},{"style":102},[1478],{"type":57,"value":126},{"type":51,"tag":79,"props":1480,"children":1481},{"style":129},[1482],{"type":57,"value":787},{"type":51,"tag":79,"props":1484,"children":1485},{"style":102},[1486],{"type":57,"value":137},{"type":51,"tag":79,"props":1488,"children":1489},{"style":102},[1490],{"type":57,"value":142},{"type":51,"tag":79,"props":1492,"children":1493},{"class":81,"line":557},[1494],{"type":51,"tag":79,"props":1495,"children":1496},{"emptyLinePlaceholder":196},[1497],{"type":57,"value":199},{"type":51,"tag":79,"props":1499,"children":1500},{"class":81,"line":596},[1501,1506,1510,1515,1519,1523,1527,1531,1536],{"type":51,"tag":79,"props":1502,"children":1503},{"style":96},[1504],{"type":57,"value":1505},"    if",{"type":51,"tag":79,"props":1507,"children":1508},{"style":285},[1509],{"type":57,"value":234},{"type":51,"tag":79,"props":1511,"children":1512},{"style":108},[1513],{"type":57,"value":1514},"allPublic",{"type":51,"tag":79,"props":1516,"children":1517},{"style":102},[1518],{"type":57,"value":1334},{"type":51,"tag":79,"props":1520,"children":1521},{"style":108},[1522],{"type":57,"value":1419},{"type":51,"tag":79,"props":1524,"children":1525},{"style":102},[1526],{"type":57,"value":1334},{"type":51,"tag":79,"props":1528,"children":1529},{"style":108},[1530],{"type":57,"value":1462},{"type":51,"tag":79,"props":1532,"children":1533},{"style":285},[1534],{"type":57,"value":1535},") ",{"type":51,"tag":79,"props":1537,"children":1538},{"style":102},[1539],{"type":57,"value":738},{"type":51,"tag":79,"props":1541,"children":1543},{"class":81,"line":1542},18,[1544,1549,1554,1558,1563,1568,1572,1576,1581],{"type":51,"tag":79,"props":1545,"children":1546},{"style":211},[1547],{"type":57,"value":1548},"      const",{"type":51,"tag":79,"props":1550,"children":1551},{"style":108},[1552],{"type":57,"value":1553}," ONE_DAY_IN_SECONDS",{"type":51,"tag":79,"props":1555,"children":1556},{"style":102},[1557],{"type":57,"value":445},{"type":51,"tag":79,"props":1559,"children":1560},{"style":868},[1561],{"type":57,"value":1562}," 60",{"type":51,"tag":79,"props":1564,"children":1565},{"style":102},[1566],{"type":57,"value":1567}," *",{"type":51,"tag":79,"props":1569,"children":1570},{"style":868},[1571],{"type":57,"value":1562},{"type":51,"tag":79,"props":1573,"children":1574},{"style":102},[1575],{"type":57,"value":1567},{"type":51,"tag":79,"props":1577,"children":1578},{"style":868},[1579],{"type":57,"value":1580}," 24",{"type":51,"tag":79,"props":1582,"children":1583},{"style":102},[1584],{"type":57,"value":142},{"type":51,"tag":79,"props":1586,"children":1588},{"class":81,"line":1587},19,[1589,1593],{"type":51,"tag":79,"props":1590,"children":1591},{"style":96},[1592],{"type":57,"value":888},{"type":51,"tag":79,"props":1594,"children":1595},{"style":102},[1596],{"type":57,"value":265},{"type":51,"tag":79,"props":1598,"children":1600},{"class":81,"line":1599},20,[1601,1606,1610,1614,1619],{"type":51,"tag":79,"props":1602,"children":1603},{"style":285},[1604],{"type":57,"value":1605},"        headers",{"type":51,"tag":79,"props":1607,"children":1608},{"style":102},[1609],{"type":57,"value":245},{"type":51,"tag":79,"props":1611,"children":1612},{"style":102},[1613],{"type":57,"value":822},{"type":51,"tag":79,"props":1615,"children":1616},{"style":515},[1617],{"type":57,"value":1618}," Headers",{"type":51,"tag":79,"props":1620,"children":1621},{"style":285},[1622],{"type":57,"value":1623},"([\n",{"type":51,"tag":79,"props":1625,"children":1627},{"class":81,"line":1626},21,[1628],{"type":51,"tag":79,"props":1629,"children":1630},{"style":285},[1631],{"type":57,"value":1632},"          [\n",{"type":51,"tag":79,"props":1634,"children":1636},{"class":81,"line":1635},22,[1637,1642,1647,1651],{"type":51,"tag":79,"props":1638,"children":1639},{"style":102},[1640],{"type":57,"value":1641},"            '",{"type":51,"tag":79,"props":1643,"children":1644},{"style":129},[1645],{"type":57,"value":1646},"cache-control",{"type":51,"tag":79,"props":1648,"children":1649},{"style":102},[1650],{"type":57,"value":137},{"type":51,"tag":79,"props":1652,"children":1653},{"style":102},[1654],{"type":57,"value":312},{"type":51,"tag":79,"props":1656,"children":1658},{"class":81,"line":1657},23,[1659,1664,1669,1674,1679,1684],{"type":51,"tag":79,"props":1660,"children":1661},{"style":102},[1662],{"type":57,"value":1663},"            `",{"type":51,"tag":79,"props":1665,"children":1666},{"style":129},[1667],{"type":57,"value":1668},"s-maxage=1, stale-while-revalidate=",{"type":51,"tag":79,"props":1670,"children":1671},{"style":102},[1672],{"type":57,"value":1673},"${",{"type":51,"tag":79,"props":1675,"children":1676},{"style":108},[1677],{"type":57,"value":1678},"ONE_DAY_IN_SECONDS",{"type":51,"tag":79,"props":1680,"children":1681},{"style":102},[1682],{"type":57,"value":1683},"}`",{"type":51,"tag":79,"props":1685,"children":1686},{"style":102},[1687],{"type":57,"value":312},{"type":51,"tag":79,"props":1689,"children":1691},{"class":81,"line":1690},24,[1692,1697],{"type":51,"tag":79,"props":1693,"children":1694},{"style":285},[1695],{"type":57,"value":1696},"          ]",{"type":51,"tag":79,"props":1698,"children":1699},{"style":102},[1700],{"type":57,"value":312},{"type":51,"tag":79,"props":1702,"children":1704},{"class":81,"line":1703},25,[1705,1710],{"type":51,"tag":79,"props":1706,"children":1707},{"style":285},[1708],{"type":57,"value":1709},"        ])",{"type":51,"tag":79,"props":1711,"children":1712},{"style":102},[1713],{"type":57,"value":312},{"type":51,"tag":79,"props":1715,"children":1717},{"class":81,"line":1716},26,[1718],{"type":51,"tag":79,"props":1719,"children":1720},{"style":102},[1721],{"type":57,"value":1722},"      };\n",{"type":51,"tag":79,"props":1724,"children":1726},{"class":81,"line":1725},27,[1727],{"type":51,"tag":79,"props":1728,"children":1729},{"style":102},[1730],{"type":57,"value":1731},"    }\n",{"type":51,"tag":79,"props":1733,"children":1735},{"class":81,"line":1734},28,[1736,1741],{"type":51,"tag":79,"props":1737,"children":1738},{"style":96},[1739],{"type":57,"value":1740},"    return",{"type":51,"tag":79,"props":1742,"children":1743},{"style":102},[1744],{"type":57,"value":1745}," {};\n",{"type":51,"tag":79,"props":1747,"children":1749},{"class":81,"line":1748},29,[1750],{"type":51,"tag":79,"props":1751,"children":1752},{"style":102},[1753],{"type":57,"value":1754},"  },\n",{"type":51,"tag":79,"props":1756,"children":1758},{"class":81,"line":1757},30,[1759,1763,1767],{"type":51,"tag":79,"props":1760,"children":1761},{"style":102},[1762],{"type":57,"value":972},{"type":51,"tag":79,"props":1764,"children":1765},{"style":108},[1766],{"type":57,"value":255},{"type":51,"tag":79,"props":1768,"children":1769},{"style":102},[1770],{"type":57,"value":142},{"type":51,"tag":79,"props":1772,"children":1774},{"class":81,"line":1773},31,[1775],{"type":51,"tag":79,"props":1776,"children":1777},{"emptyLinePlaceholder":196},[1778],{"type":57,"value":199},{"type":51,"tag":79,"props":1780,"children":1782},{"class":81,"line":1781},32,[1783,1788,1792,1797,1801,1806,1810],{"type":51,"tag":79,"props":1784,"children":1785},{"style":108},[1786],{"type":57,"value":1787},"server",{"type":51,"tag":79,"props":1789,"children":1790},{"style":102},[1791],{"type":57,"value":302},{"type":51,"tag":79,"props":1793,"children":1794},{"style":515},[1795],{"type":57,"value":1796},"listen",{"type":51,"tag":79,"props":1798,"children":1799},{"style":108},[1800],{"type":57,"value":733},{"type":51,"tag":79,"props":1802,"children":1803},{"style":868},[1804],{"type":57,"value":1805},"3000",{"type":51,"tag":79,"props":1807,"children":1808},{"style":108},[1809],{"type":57,"value":255},{"type":51,"tag":79,"props":1811,"children":1812},{"style":102},[1813],{"type":57,"value":142},{"type":51,"tag":60,"props":1815,"children":1817},{"id":1816},"core-patterns",[1818],{"type":57,"value":1819},"Core Patterns",{"type":51,"tag":1821,"props":1822,"children":1824},"h3",{"id":1823},"path-based-public-route-caching",[1825],{"type":57,"value":1826},"Path-based public route caching",{"type":51,"tag":67,"props":1828,"children":1830},{"className":69,"code":1829,"language":71,"meta":72,"style":72},"import { createHTTPServer } from '@trpc\u002Fserver\u002Fadapters\u002Fstandalone';\nimport { appRouter } from '.\u002FappRouter';\nimport { createContext } from '.\u002Ftrpc';\n\nconst server = createHTTPServer({\n  router: appRouter,\n  createContext,\n  responseMeta({ paths, errors, type }) {\n    const allPublic =\n      paths && paths.every((path) => path.startsWith('public.'));\n    const allOk = errors.length === 0;\n    const isQuery = type === 'query';\n\n    if (allPublic && allOk && isQuery) {\n      return {\n        headers: new Headers([\n          ['cache-control', 's-maxage=1, stale-while-revalidate=86400'],\n        ]),\n      };\n    }\n    return {};\n  },\n});\n",[1831],{"type":51,"tag":75,"props":1832,"children":1833},{"__ignoreMap":72},[1834,1873,1912,1951,1958,1985,2004,2015,2056,2071,2150,2189,2228,2235,2274,2285,2308,2354,2365,2372,2379,2390,2397],{"type":51,"tag":79,"props":1835,"children":1836},{"class":81,"line":82},[1837,1841,1845,1849,1853,1857,1861,1865,1869],{"type":51,"tag":79,"props":1838,"children":1839},{"style":96},[1840],{"type":57,"value":99},{"type":51,"tag":79,"props":1842,"children":1843},{"style":102},[1844],{"type":57,"value":105},{"type":51,"tag":79,"props":1846,"children":1847},{"style":108},[1848],{"type":57,"value":1052},{"type":51,"tag":79,"props":1850,"children":1851},{"style":102},[1852],{"type":57,"value":116},{"type":51,"tag":79,"props":1854,"children":1855},{"style":96},[1856],{"type":57,"value":121},{"type":51,"tag":79,"props":1858,"children":1859},{"style":102},[1860],{"type":57,"value":126},{"type":51,"tag":79,"props":1862,"children":1863},{"style":129},[1864],{"type":57,"value":181},{"type":51,"tag":79,"props":1866,"children":1867},{"style":102},[1868],{"type":57,"value":137},{"type":51,"tag":79,"props":1870,"children":1871},{"style":102},[1872],{"type":57,"value":142},{"type":51,"tag":79,"props":1874,"children":1875},{"class":81,"line":92},[1876,1880,1884,1888,1892,1896,1900,1904,1908],{"type":51,"tag":79,"props":1877,"children":1878},{"style":96},[1879],{"type":57,"value":99},{"type":51,"tag":79,"props":1881,"children":1882},{"style":102},[1883],{"type":57,"value":105},{"type":51,"tag":79,"props":1885,"children":1886},{"style":108},[1887],{"type":57,"value":1017},{"type":51,"tag":79,"props":1889,"children":1890},{"style":102},[1891],{"type":57,"value":116},{"type":51,"tag":79,"props":1893,"children":1894},{"style":96},[1895],{"type":57,"value":121},{"type":51,"tag":79,"props":1897,"children":1898},{"style":102},[1899],{"type":57,"value":126},{"type":51,"tag":79,"props":1901,"children":1902},{"style":129},[1903],{"type":57,"value":1108},{"type":51,"tag":79,"props":1905,"children":1906},{"style":102},[1907],{"type":57,"value":137},{"type":51,"tag":79,"props":1909,"children":1910},{"style":102},[1911],{"type":57,"value":142},{"type":51,"tag":79,"props":1913,"children":1914},{"class":81,"line":145},[1915,1919,1923,1927,1931,1935,1939,1943,1947],{"type":51,"tag":79,"props":1916,"children":1917},{"style":96},[1918],{"type":57,"value":99},{"type":51,"tag":79,"props":1920,"children":1921},{"style":102},[1922],{"type":57,"value":105},{"type":51,"tag":79,"props":1924,"children":1925},{"style":108},[1926],{"type":57,"value":470},{"type":51,"tag":79,"props":1928,"children":1929},{"style":102},[1930],{"type":57,"value":116},{"type":51,"tag":79,"props":1932,"children":1933},{"style":96},[1934],{"type":57,"value":121},{"type":51,"tag":79,"props":1936,"children":1937},{"style":102},[1938],{"type":57,"value":126},{"type":51,"tag":79,"props":1940,"children":1941},{"style":129},[1942],{"type":57,"value":689},{"type":51,"tag":79,"props":1944,"children":1945},{"style":102},[1946],{"type":57,"value":137},{"type":51,"tag":79,"props":1948,"children":1949},{"style":102},[1950],{"type":57,"value":142},{"type":51,"tag":79,"props":1952,"children":1953},{"class":81,"line":192},[1954],{"type":51,"tag":79,"props":1955,"children":1956},{"emptyLinePlaceholder":196},[1957],{"type":57,"value":199},{"type":51,"tag":79,"props":1959,"children":1960},{"class":81,"line":202},[1961,1965,1969,1973,1977,1981],{"type":51,"tag":79,"props":1962,"children":1963},{"style":211},[1964],{"type":57,"value":1170},{"type":51,"tag":79,"props":1966,"children":1967},{"style":108},[1968],{"type":57,"value":1175},{"type":51,"tag":79,"props":1970,"children":1971},{"style":102},[1972],{"type":57,"value":224},{"type":51,"tag":79,"props":1974,"children":1975},{"style":515},[1976],{"type":57,"value":1052},{"type":51,"tag":79,"props":1978,"children":1979},{"style":108},[1980],{"type":57,"value":733},{"type":51,"tag":79,"props":1982,"children":1983},{"style":102},[1984],{"type":57,"value":738},{"type":51,"tag":79,"props":1986,"children":1987},{"class":81,"line":268},[1988,1992,1996,2000],{"type":51,"tag":79,"props":1989,"children":1990},{"style":285},[1991],{"type":57,"value":1199},{"type":51,"tag":79,"props":1993,"children":1994},{"style":102},[1995],{"type":57,"value":245},{"type":51,"tag":79,"props":1997,"children":1998},{"style":108},[1999],{"type":57,"value":1017},{"type":51,"tag":79,"props":2001,"children":2002},{"style":102},[2003],{"type":57,"value":312},{"type":51,"tag":79,"props":2005,"children":2006},{"class":81,"line":281},[2007,2011],{"type":51,"tag":79,"props":2008,"children":2009},{"style":108},[2010],{"type":57,"value":1219},{"type":51,"tag":79,"props":2012,"children":2013},{"style":102},[2014],{"type":57,"value":312},{"type":51,"tag":79,"props":2016,"children":2017},{"class":81,"line":315},[2018,2022,2027,2031,2035,2039,2043,2047,2052],{"type":51,"tag":79,"props":2019,"children":2020},{"style":285},[2021],{"type":57,"value":1231},{"type":51,"tag":79,"props":2023,"children":2024},{"style":102},[2025],{"type":57,"value":2026},"({",{"type":51,"tag":79,"props":2028,"children":2029},{"style":237},[2030],{"type":57,"value":1264},{"type":51,"tag":79,"props":2032,"children":2033},{"style":102},[2034],{"type":57,"value":667},{"type":51,"tag":79,"props":2036,"children":2037},{"style":237},[2038],{"type":57,"value":1273},{"type":51,"tag":79,"props":2040,"children":2041},{"style":102},[2042],{"type":57,"value":667},{"type":51,"tag":79,"props":2044,"children":2045},{"style":237},[2046],{"type":57,"value":155},{"type":51,"tag":79,"props":2048,"children":2049},{"style":102},[2050],{"type":57,"value":2051}," })",{"type":51,"tag":79,"props":2053,"children":2054},{"style":102},[2055],{"type":57,"value":265},{"type":51,"tag":79,"props":2057,"children":2058},{"class":81,"line":345},[2059,2063,2067],{"type":51,"tag":79,"props":2060,"children":2061},{"style":211},[2062],{"type":57,"value":1255},{"type":51,"tag":79,"props":2064,"children":2065},{"style":108},[2066],{"type":57,"value":1316},{"type":51,"tag":79,"props":2068,"children":2069},{"style":102},[2070],{"type":57,"value":1321},{"type":51,"tag":79,"props":2072,"children":2073},{"class":81,"line":403},[2074,2078,2082,2086,2090,2094,2098,2102,2106,2110,2114,2118,2122,2126,2130,2134,2138,2142,2146],{"type":51,"tag":79,"props":2075,"children":2076},{"style":108},[2077],{"type":57,"value":1329},{"type":51,"tag":79,"props":2079,"children":2080},{"style":102},[2081],{"type":57,"value":1334},{"type":51,"tag":79,"props":2083,"children":2084},{"style":108},[2085],{"type":57,"value":1264},{"type":51,"tag":79,"props":2087,"children":2088},{"style":102},[2089],{"type":57,"value":302},{"type":51,"tag":79,"props":2091,"children":2092},{"style":515},[2093],{"type":57,"value":1347},{"type":51,"tag":79,"props":2095,"children":2096},{"style":285},[2097],{"type":57,"value":733},{"type":51,"tag":79,"props":2099,"children":2100},{"style":102},[2101],{"type":57,"value":733},{"type":51,"tag":79,"props":2103,"children":2104},{"style":237},[2105],{"type":57,"value":1360},{"type":51,"tag":79,"props":2107,"children":2108},{"style":102},[2109],{"type":57,"value":255},{"type":51,"tag":79,"props":2111,"children":2112},{"style":211},[2113],{"type":57,"value":260},{"type":51,"tag":79,"props":2115,"children":2116},{"style":108},[2117],{"type":57,"value":1373},{"type":51,"tag":79,"props":2119,"children":2120},{"style":102},[2121],{"type":57,"value":302},{"type":51,"tag":79,"props":2123,"children":2124},{"style":515},[2125],{"type":57,"value":1382},{"type":51,"tag":79,"props":2127,"children":2128},{"style":285},[2129],{"type":57,"value":733},{"type":51,"tag":79,"props":2131,"children":2132},{"style":102},[2133],{"type":57,"value":137},{"type":51,"tag":79,"props":2135,"children":2136},{"style":129},[2137],{"type":57,"value":1395},{"type":51,"tag":79,"props":2139,"children":2140},{"style":102},[2141],{"type":57,"value":137},{"type":51,"tag":79,"props":2143,"children":2144},{"style":285},[2145],{"type":57,"value":876},{"type":51,"tag":79,"props":2147,"children":2148},{"style":102},[2149],{"type":57,"value":142},{"type":51,"tag":79,"props":2151,"children":2152},{"class":81,"line":412},[2153,2157,2161,2165,2169,2173,2177,2181,2185],{"type":51,"tag":79,"props":2154,"children":2155},{"style":211},[2156],{"type":57,"value":1255},{"type":51,"tag":79,"props":2158,"children":2159},{"style":108},[2160],{"type":57,"value":1419},{"type":51,"tag":79,"props":2162,"children":2163},{"style":102},[2164],{"type":57,"value":445},{"type":51,"tag":79,"props":2166,"children":2167},{"style":108},[2168],{"type":57,"value":1273},{"type":51,"tag":79,"props":2170,"children":2171},{"style":102},[2172],{"type":57,"value":302},{"type":51,"tag":79,"props":2174,"children":2175},{"style":108},[2176],{"type":57,"value":1436},{"type":51,"tag":79,"props":2178,"children":2179},{"style":102},[2180],{"type":57,"value":1441},{"type":51,"tag":79,"props":2182,"children":2183},{"style":868},[2184],{"type":57,"value":1446},{"type":51,"tag":79,"props":2186,"children":2187},{"style":102},[2188],{"type":57,"value":142},{"type":51,"tag":79,"props":2190,"children":2191},{"class":81,"line":421},[2192,2196,2200,2204,2208,2212,2216,2220,2224],{"type":51,"tag":79,"props":2193,"children":2194},{"style":211},[2195],{"type":57,"value":1255},{"type":51,"tag":79,"props":2197,"children":2198},{"style":108},[2199],{"type":57,"value":1462},{"type":51,"tag":79,"props":2201,"children":2202},{"style":102},[2203],{"type":57,"value":445},{"type":51,"tag":79,"props":2205,"children":2206},{"style":108},[2207],{"type":57,"value":155},{"type":51,"tag":79,"props":2209,"children":2210},{"style":102},[2211],{"type":57,"value":1441},{"type":51,"tag":79,"props":2213,"children":2214},{"style":102},[2215],{"type":57,"value":126},{"type":51,"tag":79,"props":2217,"children":2218},{"style":129},[2219],{"type":57,"value":787},{"type":51,"tag":79,"props":2221,"children":2222},{"style":102},[2223],{"type":57,"value":137},{"type":51,"tag":79,"props":2225,"children":2226},{"style":102},[2227],{"type":57,"value":142},{"type":51,"tag":79,"props":2229,"children":2230},{"class":81,"line":429},[2231],{"type":51,"tag":79,"props":2232,"children":2233},{"emptyLinePlaceholder":196},[2234],{"type":57,"value":199},{"type":51,"tag":79,"props":2236,"children":2237},{"class":81,"line":478},[2238,2242,2246,2250,2254,2258,2262,2266,2270],{"type":51,"tag":79,"props":2239,"children":2240},{"style":96},[2241],{"type":57,"value":1505},{"type":51,"tag":79,"props":2243,"children":2244},{"style":285},[2245],{"type":57,"value":234},{"type":51,"tag":79,"props":2247,"children":2248},{"style":108},[2249],{"type":57,"value":1514},{"type":51,"tag":79,"props":2251,"children":2252},{"style":102},[2253],{"type":57,"value":1334},{"type":51,"tag":79,"props":2255,"children":2256},{"style":108},[2257],{"type":57,"value":1419},{"type":51,"tag":79,"props":2259,"children":2260},{"style":102},[2261],{"type":57,"value":1334},{"type":51,"tag":79,"props":2263,"children":2264},{"style":108},[2265],{"type":57,"value":1462},{"type":51,"tag":79,"props":2267,"children":2268},{"style":285},[2269],{"type":57,"value":1535},{"type":51,"tag":79,"props":2271,"children":2272},{"style":102},[2273],{"type":57,"value":738},{"type":51,"tag":79,"props":2275,"children":2276},{"class":81,"line":486},[2277,2281],{"type":51,"tag":79,"props":2278,"children":2279},{"style":96},[2280],{"type":57,"value":888},{"type":51,"tag":79,"props":2282,"children":2283},{"style":102},[2284],{"type":57,"value":265},{"type":51,"tag":79,"props":2286,"children":2287},{"class":81,"line":557},[2288,2292,2296,2300,2304],{"type":51,"tag":79,"props":2289,"children":2290},{"style":285},[2291],{"type":57,"value":1605},{"type":51,"tag":79,"props":2293,"children":2294},{"style":102},[2295],{"type":57,"value":245},{"type":51,"tag":79,"props":2297,"children":2298},{"style":102},[2299],{"type":57,"value":822},{"type":51,"tag":79,"props":2301,"children":2302},{"style":515},[2303],{"type":57,"value":1618},{"type":51,"tag":79,"props":2305,"children":2306},{"style":285},[2307],{"type":57,"value":1623},{"type":51,"tag":79,"props":2309,"children":2310},{"class":81,"line":596},[2311,2316,2320,2324,2328,2332,2336,2341,2345,2350],{"type":51,"tag":79,"props":2312,"children":2313},{"style":285},[2314],{"type":57,"value":2315},"          [",{"type":51,"tag":79,"props":2317,"children":2318},{"style":102},[2319],{"type":57,"value":137},{"type":51,"tag":79,"props":2321,"children":2322},{"style":129},[2323],{"type":57,"value":1646},{"type":51,"tag":79,"props":2325,"children":2326},{"style":102},[2327],{"type":57,"value":137},{"type":51,"tag":79,"props":2329,"children":2330},{"style":102},[2331],{"type":57,"value":667},{"type":51,"tag":79,"props":2333,"children":2334},{"style":102},[2335],{"type":57,"value":126},{"type":51,"tag":79,"props":2337,"children":2338},{"style":129},[2339],{"type":57,"value":2340},"s-maxage=1, stale-while-revalidate=86400",{"type":51,"tag":79,"props":2342,"children":2343},{"style":102},[2344],{"type":57,"value":137},{"type":51,"tag":79,"props":2346,"children":2347},{"style":285},[2348],{"type":57,"value":2349},"]",{"type":51,"tag":79,"props":2351,"children":2352},{"style":102},[2353],{"type":57,"value":312},{"type":51,"tag":79,"props":2355,"children":2356},{"class":81,"line":1542},[2357,2361],{"type":51,"tag":79,"props":2358,"children":2359},{"style":285},[2360],{"type":57,"value":1709},{"type":51,"tag":79,"props":2362,"children":2363},{"style":102},[2364],{"type":57,"value":312},{"type":51,"tag":79,"props":2366,"children":2367},{"class":81,"line":1587},[2368],{"type":51,"tag":79,"props":2369,"children":2370},{"style":102},[2371],{"type":57,"value":1722},{"type":51,"tag":79,"props":2373,"children":2374},{"class":81,"line":1599},[2375],{"type":51,"tag":79,"props":2376,"children":2377},{"style":102},[2378],{"type":57,"value":1731},{"type":51,"tag":79,"props":2380,"children":2381},{"class":81,"line":1626},[2382,2386],{"type":51,"tag":79,"props":2383,"children":2384},{"style":96},[2385],{"type":57,"value":1740},{"type":51,"tag":79,"props":2387,"children":2388},{"style":102},[2389],{"type":57,"value":1745},{"type":51,"tag":79,"props":2391,"children":2392},{"class":81,"line":1635},[2393],{"type":51,"tag":79,"props":2394,"children":2395},{"style":102},[2396],{"type":57,"value":1754},{"type":51,"tag":79,"props":2398,"children":2399},{"class":81,"line":1657},[2400,2404,2408],{"type":51,"tag":79,"props":2401,"children":2402},{"style":102},[2403],{"type":57,"value":972},{"type":51,"tag":79,"props":2405,"children":2406},{"style":108},[2407],{"type":57,"value":255},{"type":51,"tag":79,"props":2409,"children":2410},{"style":102},[2411],{"type":57,"value":142},{"type":51,"tag":2413,"props":2414,"children":2415},"p",{},[2416,2418,2424,2426,2432,2434,2440],{"type":57,"value":2417},"Name public routes with a ",{"type":51,"tag":75,"props":2419,"children":2421},{"className":2420},[],[2422],{"type":57,"value":2423},"public",{"type":57,"value":2425}," prefix (e.g., ",{"type":51,"tag":75,"props":2427,"children":2429},{"className":2428},[],[2430],{"type":57,"value":2431},"public.slowQueryCached",{"type":57,"value":2433},") so ",{"type":51,"tag":75,"props":2435,"children":2437},{"className":2436},[],[2438],{"type":57,"value":2439},"responseMeta",{"type":57,"value":2441}," can identify them by path.",{"type":51,"tag":1821,"props":2443,"children":2445},{"id":2444},"skip-caching-for-authenticated-requests",[2446],{"type":57,"value":2447},"Skip caching for authenticated requests",{"type":51,"tag":67,"props":2449,"children":2451},{"className":69,"code":2450,"language":71,"meta":72,"style":72},"import { createHTTPServer } from '@trpc\u002Fserver\u002Fadapters\u002Fstandalone';\nimport { appRouter } from '.\u002FappRouter';\nimport { createContext } from '.\u002Ftrpc';\n\nconst server = createHTTPServer({\n  router: appRouter,\n  createContext,\n  responseMeta({ ctx, errors, type }) {\n    if (ctx?.user || errors.length > 0 || type !== 'query') {\n      return {};\n    }\n    return {\n      headers: new Headers([\n        ['cache-control', 's-maxage=1, stale-while-revalidate=86400'],\n      ]),\n    };\n  },\n});\n",[2452],{"type":51,"tag":75,"props":2453,"children":2454},{"__ignoreMap":72},[2455,2494,2533,2572,2579,2606,2625,2636,2676,2761,2772,2779,2790,2814,2858,2870,2878,2885],{"type":51,"tag":79,"props":2456,"children":2457},{"class":81,"line":82},[2458,2462,2466,2470,2474,2478,2482,2486,2490],{"type":51,"tag":79,"props":2459,"children":2460},{"style":96},[2461],{"type":57,"value":99},{"type":51,"tag":79,"props":2463,"children":2464},{"style":102},[2465],{"type":57,"value":105},{"type":51,"tag":79,"props":2467,"children":2468},{"style":108},[2469],{"type":57,"value":1052},{"type":51,"tag":79,"props":2471,"children":2472},{"style":102},[2473],{"type":57,"value":116},{"type":51,"tag":79,"props":2475,"children":2476},{"style":96},[2477],{"type":57,"value":121},{"type":51,"tag":79,"props":2479,"children":2480},{"style":102},[2481],{"type":57,"value":126},{"type":51,"tag":79,"props":2483,"children":2484},{"style":129},[2485],{"type":57,"value":181},{"type":51,"tag":79,"props":2487,"children":2488},{"style":102},[2489],{"type":57,"value":137},{"type":51,"tag":79,"props":2491,"children":2492},{"style":102},[2493],{"type":57,"value":142},{"type":51,"tag":79,"props":2495,"children":2496},{"class":81,"line":92},[2497,2501,2505,2509,2513,2517,2521,2525,2529],{"type":51,"tag":79,"props":2498,"children":2499},{"style":96},[2500],{"type":57,"value":99},{"type":51,"tag":79,"props":2502,"children":2503},{"style":102},[2504],{"type":57,"value":105},{"type":51,"tag":79,"props":2506,"children":2507},{"style":108},[2508],{"type":57,"value":1017},{"type":51,"tag":79,"props":2510,"children":2511},{"style":102},[2512],{"type":57,"value":116},{"type":51,"tag":79,"props":2514,"children":2515},{"style":96},[2516],{"type":57,"value":121},{"type":51,"tag":79,"props":2518,"children":2519},{"style":102},[2520],{"type":57,"value":126},{"type":51,"tag":79,"props":2522,"children":2523},{"style":129},[2524],{"type":57,"value":1108},{"type":51,"tag":79,"props":2526,"children":2527},{"style":102},[2528],{"type":57,"value":137},{"type":51,"tag":79,"props":2530,"children":2531},{"style":102},[2532],{"type":57,"value":142},{"type":51,"tag":79,"props":2534,"children":2535},{"class":81,"line":145},[2536,2540,2544,2548,2552,2556,2560,2564,2568],{"type":51,"tag":79,"props":2537,"children":2538},{"style":96},[2539],{"type":57,"value":99},{"type":51,"tag":79,"props":2541,"children":2542},{"style":102},[2543],{"type":57,"value":105},{"type":51,"tag":79,"props":2545,"children":2546},{"style":108},[2547],{"type":57,"value":470},{"type":51,"tag":79,"props":2549,"children":2550},{"style":102},[2551],{"type":57,"value":116},{"type":51,"tag":79,"props":2553,"children":2554},{"style":96},[2555],{"type":57,"value":121},{"type":51,"tag":79,"props":2557,"children":2558},{"style":102},[2559],{"type":57,"value":126},{"type":51,"tag":79,"props":2561,"children":2562},{"style":129},[2563],{"type":57,"value":689},{"type":51,"tag":79,"props":2565,"children":2566},{"style":102},[2567],{"type":57,"value":137},{"type":51,"tag":79,"props":2569,"children":2570},{"style":102},[2571],{"type":57,"value":142},{"type":51,"tag":79,"props":2573,"children":2574},{"class":81,"line":192},[2575],{"type":51,"tag":79,"props":2576,"children":2577},{"emptyLinePlaceholder":196},[2578],{"type":57,"value":199},{"type":51,"tag":79,"props":2580,"children":2581},{"class":81,"line":202},[2582,2586,2590,2594,2598,2602],{"type":51,"tag":79,"props":2583,"children":2584},{"style":211},[2585],{"type":57,"value":1170},{"type":51,"tag":79,"props":2587,"children":2588},{"style":108},[2589],{"type":57,"value":1175},{"type":51,"tag":79,"props":2591,"children":2592},{"style":102},[2593],{"type":57,"value":224},{"type":51,"tag":79,"props":2595,"children":2596},{"style":515},[2597],{"type":57,"value":1052},{"type":51,"tag":79,"props":2599,"children":2600},{"style":108},[2601],{"type":57,"value":733},{"type":51,"tag":79,"props":2603,"children":2604},{"style":102},[2605],{"type":57,"value":738},{"type":51,"tag":79,"props":2607,"children":2608},{"class":81,"line":268},[2609,2613,2617,2621],{"type":51,"tag":79,"props":2610,"children":2611},{"style":285},[2612],{"type":57,"value":1199},{"type":51,"tag":79,"props":2614,"children":2615},{"style":102},[2616],{"type":57,"value":245},{"type":51,"tag":79,"props":2618,"children":2619},{"style":108},[2620],{"type":57,"value":1017},{"type":51,"tag":79,"props":2622,"children":2623},{"style":102},[2624],{"type":57,"value":312},{"type":51,"tag":79,"props":2626,"children":2627},{"class":81,"line":281},[2628,2632],{"type":51,"tag":79,"props":2629,"children":2630},{"style":108},[2631],{"type":57,"value":1219},{"type":51,"tag":79,"props":2633,"children":2634},{"style":102},[2635],{"type":57,"value":312},{"type":51,"tag":79,"props":2637,"children":2638},{"class":81,"line":315},[2639,2643,2647,2652,2656,2660,2664,2668,2672],{"type":51,"tag":79,"props":2640,"children":2641},{"style":285},[2642],{"type":57,"value":1231},{"type":51,"tag":79,"props":2644,"children":2645},{"style":102},[2646],{"type":57,"value":2026},{"type":51,"tag":79,"props":2648,"children":2649},{"style":237},[2650],{"type":57,"value":2651}," ctx",{"type":51,"tag":79,"props":2653,"children":2654},{"style":102},[2655],{"type":57,"value":667},{"type":51,"tag":79,"props":2657,"children":2658},{"style":237},[2659],{"type":57,"value":1273},{"type":51,"tag":79,"props":2661,"children":2662},{"style":102},[2663],{"type":57,"value":667},{"type":51,"tag":79,"props":2665,"children":2666},{"style":237},[2667],{"type":57,"value":155},{"type":51,"tag":79,"props":2669,"children":2670},{"style":102},[2671],{"type":57,"value":2051},{"type":51,"tag":79,"props":2673,"children":2674},{"style":102},[2675],{"type":57,"value":265},{"type":51,"tag":79,"props":2677,"children":2678},{"class":81,"line":345},[2679,2683,2687,2692,2697,2702,2707,2711,2715,2719,2724,2728,2732,2736,2741,2745,2749,2753,2757],{"type":51,"tag":79,"props":2680,"children":2681},{"style":96},[2682],{"type":57,"value":1505},{"type":51,"tag":79,"props":2684,"children":2685},{"style":285},[2686],{"type":57,"value":234},{"type":51,"tag":79,"props":2688,"children":2689},{"style":108},[2690],{"type":57,"value":2691},"ctx",{"type":51,"tag":79,"props":2693,"children":2694},{"style":102},[2695],{"type":57,"value":2696},"?.",{"type":51,"tag":79,"props":2698,"children":2699},{"style":108},[2700],{"type":57,"value":2701},"user",{"type":51,"tag":79,"props":2703,"children":2704},{"style":102},[2705],{"type":57,"value":2706}," ||",{"type":51,"tag":79,"props":2708,"children":2709},{"style":108},[2710],{"type":57,"value":1273},{"type":51,"tag":79,"props":2712,"children":2713},{"style":102},[2714],{"type":57,"value":302},{"type":51,"tag":79,"props":2716,"children":2717},{"style":108},[2718],{"type":57,"value":1436},{"type":51,"tag":79,"props":2720,"children":2721},{"style":102},[2722],{"type":57,"value":2723}," >",{"type":51,"tag":79,"props":2725,"children":2726},{"style":868},[2727],{"type":57,"value":1446},{"type":51,"tag":79,"props":2729,"children":2730},{"style":102},[2731],{"type":57,"value":2706},{"type":51,"tag":79,"props":2733,"children":2734},{"style":108},[2735],{"type":57,"value":155},{"type":51,"tag":79,"props":2737,"children":2738},{"style":102},[2739],{"type":57,"value":2740}," !==",{"type":51,"tag":79,"props":2742,"children":2743},{"style":102},[2744],{"type":57,"value":126},{"type":51,"tag":79,"props":2746,"children":2747},{"style":129},[2748],{"type":57,"value":787},{"type":51,"tag":79,"props":2750,"children":2751},{"style":102},[2752],{"type":57,"value":137},{"type":51,"tag":79,"props":2754,"children":2755},{"style":285},[2756],{"type":57,"value":1535},{"type":51,"tag":79,"props":2758,"children":2759},{"style":102},[2760],{"type":57,"value":738},{"type":51,"tag":79,"props":2762,"children":2763},{"class":81,"line":403},[2764,2768],{"type":51,"tag":79,"props":2765,"children":2766},{"style":96},[2767],{"type":57,"value":888},{"type":51,"tag":79,"props":2769,"children":2770},{"style":102},[2771],{"type":57,"value":1745},{"type":51,"tag":79,"props":2773,"children":2774},{"class":81,"line":412},[2775],{"type":51,"tag":79,"props":2776,"children":2777},{"style":102},[2778],{"type":57,"value":1731},{"type":51,"tag":79,"props":2780,"children":2781},{"class":81,"line":421},[2782,2786],{"type":51,"tag":79,"props":2783,"children":2784},{"style":96},[2785],{"type":57,"value":1740},{"type":51,"tag":79,"props":2787,"children":2788},{"style":102},[2789],{"type":57,"value":265},{"type":51,"tag":79,"props":2791,"children":2792},{"class":81,"line":429},[2793,2798,2802,2806,2810],{"type":51,"tag":79,"props":2794,"children":2795},{"style":285},[2796],{"type":57,"value":2797},"      headers",{"type":51,"tag":79,"props":2799,"children":2800},{"style":102},[2801],{"type":57,"value":245},{"type":51,"tag":79,"props":2803,"children":2804},{"style":102},[2805],{"type":57,"value":822},{"type":51,"tag":79,"props":2807,"children":2808},{"style":515},[2809],{"type":57,"value":1618},{"type":51,"tag":79,"props":2811,"children":2812},{"style":285},[2813],{"type":57,"value":1623},{"type":51,"tag":79,"props":2815,"children":2816},{"class":81,"line":478},[2817,2822,2826,2830,2834,2838,2842,2846,2850,2854],{"type":51,"tag":79,"props":2818,"children":2819},{"style":285},[2820],{"type":57,"value":2821},"        [",{"type":51,"tag":79,"props":2823,"children":2824},{"style":102},[2825],{"type":57,"value":137},{"type":51,"tag":79,"props":2827,"children":2828},{"style":129},[2829],{"type":57,"value":1646},{"type":51,"tag":79,"props":2831,"children":2832},{"style":102},[2833],{"type":57,"value":137},{"type":51,"tag":79,"props":2835,"children":2836},{"style":102},[2837],{"type":57,"value":667},{"type":51,"tag":79,"props":2839,"children":2840},{"style":102},[2841],{"type":57,"value":126},{"type":51,"tag":79,"props":2843,"children":2844},{"style":129},[2845],{"type":57,"value":2340},{"type":51,"tag":79,"props":2847,"children":2848},{"style":102},[2849],{"type":57,"value":137},{"type":51,"tag":79,"props":2851,"children":2852},{"style":285},[2853],{"type":57,"value":2349},{"type":51,"tag":79,"props":2855,"children":2856},{"style":102},[2857],{"type":57,"value":312},{"type":51,"tag":79,"props":2859,"children":2860},{"class":81,"line":486},[2861,2866],{"type":51,"tag":79,"props":2862,"children":2863},{"style":285},[2864],{"type":57,"value":2865},"      ])",{"type":51,"tag":79,"props":2867,"children":2868},{"style":102},[2869],{"type":57,"value":312},{"type":51,"tag":79,"props":2871,"children":2872},{"class":81,"line":557},[2873],{"type":51,"tag":79,"props":2874,"children":2875},{"style":102},[2876],{"type":57,"value":2877},"    };\n",{"type":51,"tag":79,"props":2879,"children":2880},{"class":81,"line":596},[2881],{"type":51,"tag":79,"props":2882,"children":2883},{"style":102},[2884],{"type":57,"value":1754},{"type":51,"tag":79,"props":2886,"children":2887},{"class":81,"line":1542},[2888,2892,2896],{"type":51,"tag":79,"props":2889,"children":2890},{"style":102},[2891],{"type":57,"value":972},{"type":51,"tag":79,"props":2893,"children":2894},{"style":108},[2895],{"type":57,"value":255},{"type":51,"tag":79,"props":2897,"children":2898},{"style":102},[2899],{"type":57,"value":142},{"type":51,"tag":60,"props":2901,"children":2903},{"id":2902},"common-mistakes",[2904],{"type":57,"value":2905},"Common Mistakes",{"type":51,"tag":1821,"props":2907,"children":2909},{"id":2908},"critical-caching-authenticated-responses",[2910,2915],{"type":51,"tag":79,"props":2911,"children":2912},{},[2913],{"type":57,"value":2914},"CRITICAL",{"type":57,"value":2916}," Caching authenticated responses",{"type":51,"tag":2413,"props":2918,"children":2919},{},[2920],{"type":57,"value":2921},"Wrong:",{"type":51,"tag":67,"props":2923,"children":2925},{"className":69,"code":2924,"language":71,"meta":72,"style":72},"import { createHTTPServer } from '@trpc\u002Fserver\u002Fadapters\u002Fstandalone';\nimport { appRouter } from '.\u002FappRouter';\n\nconst server = createHTTPServer({\n  router: appRouter,\n  responseMeta() {\n    return {\n      headers: new Headers([['cache-control', 's-maxage=60']]),\n    };\n  },\n});\n",[2926],{"type":51,"tag":75,"props":2927,"children":2928},{"__ignoreMap":72},[2929,2968,3007,3014,3041,3060,3075,3086,3148,3155,3162],{"type":51,"tag":79,"props":2930,"children":2931},{"class":81,"line":82},[2932,2936,2940,2944,2948,2952,2956,2960,2964],{"type":51,"tag":79,"props":2933,"children":2934},{"style":96},[2935],{"type":57,"value":99},{"type":51,"tag":79,"props":2937,"children":2938},{"style":102},[2939],{"type":57,"value":105},{"type":51,"tag":79,"props":2941,"children":2942},{"style":108},[2943],{"type":57,"value":1052},{"type":51,"tag":79,"props":2945,"children":2946},{"style":102},[2947],{"type":57,"value":116},{"type":51,"tag":79,"props":2949,"children":2950},{"style":96},[2951],{"type":57,"value":121},{"type":51,"tag":79,"props":2953,"children":2954},{"style":102},[2955],{"type":57,"value":126},{"type":51,"tag":79,"props":2957,"children":2958},{"style":129},[2959],{"type":57,"value":181},{"type":51,"tag":79,"props":2961,"children":2962},{"style":102},[2963],{"type":57,"value":137},{"type":51,"tag":79,"props":2965,"children":2966},{"style":102},[2967],{"type":57,"value":142},{"type":51,"tag":79,"props":2969,"children":2970},{"class":81,"line":92},[2971,2975,2979,2983,2987,2991,2995,2999,3003],{"type":51,"tag":79,"props":2972,"children":2973},{"style":96},[2974],{"type":57,"value":99},{"type":51,"tag":79,"props":2976,"children":2977},{"style":102},[2978],{"type":57,"value":105},{"type":51,"tag":79,"props":2980,"children":2981},{"style":108},[2982],{"type":57,"value":1017},{"type":51,"tag":79,"props":2984,"children":2985},{"style":102},[2986],{"type":57,"value":116},{"type":51,"tag":79,"props":2988,"children":2989},{"style":96},[2990],{"type":57,"value":121},{"type":51,"tag":79,"props":2992,"children":2993},{"style":102},[2994],{"type":57,"value":126},{"type":51,"tag":79,"props":2996,"children":2997},{"style":129},[2998],{"type":57,"value":1108},{"type":51,"tag":79,"props":3000,"children":3001},{"style":102},[3002],{"type":57,"value":137},{"type":51,"tag":79,"props":3004,"children":3005},{"style":102},[3006],{"type":57,"value":142},{"type":51,"tag":79,"props":3008,"children":3009},{"class":81,"line":145},[3010],{"type":51,"tag":79,"props":3011,"children":3012},{"emptyLinePlaceholder":196},[3013],{"type":57,"value":199},{"type":51,"tag":79,"props":3015,"children":3016},{"class":81,"line":192},[3017,3021,3025,3029,3033,3037],{"type":51,"tag":79,"props":3018,"children":3019},{"style":211},[3020],{"type":57,"value":1170},{"type":51,"tag":79,"props":3022,"children":3023},{"style":108},[3024],{"type":57,"value":1175},{"type":51,"tag":79,"props":3026,"children":3027},{"style":102},[3028],{"type":57,"value":224},{"type":51,"tag":79,"props":3030,"children":3031},{"style":515},[3032],{"type":57,"value":1052},{"type":51,"tag":79,"props":3034,"children":3035},{"style":108},[3036],{"type":57,"value":733},{"type":51,"tag":79,"props":3038,"children":3039},{"style":102},[3040],{"type":57,"value":738},{"type":51,"tag":79,"props":3042,"children":3043},{"class":81,"line":202},[3044,3048,3052,3056],{"type":51,"tag":79,"props":3045,"children":3046},{"style":285},[3047],{"type":57,"value":1199},{"type":51,"tag":79,"props":3049,"children":3050},{"style":102},[3051],{"type":57,"value":245},{"type":51,"tag":79,"props":3053,"children":3054},{"style":108},[3055],{"type":57,"value":1017},{"type":51,"tag":79,"props":3057,"children":3058},{"style":102},[3059],{"type":57,"value":312},{"type":51,"tag":79,"props":3061,"children":3062},{"class":81,"line":268},[3063,3067,3071],{"type":51,"tag":79,"props":3064,"children":3065},{"style":285},[3066],{"type":57,"value":1231},{"type":51,"tag":79,"props":3068,"children":3069},{"style":102},[3070],{"type":57,"value":537},{"type":51,"tag":79,"props":3072,"children":3073},{"style":102},[3074],{"type":57,"value":265},{"type":51,"tag":79,"props":3076,"children":3077},{"class":81,"line":281},[3078,3082],{"type":51,"tag":79,"props":3079,"children":3080},{"style":96},[3081],{"type":57,"value":1740},{"type":51,"tag":79,"props":3083,"children":3084},{"style":102},[3085],{"type":57,"value":265},{"type":51,"tag":79,"props":3087,"children":3088},{"class":81,"line":315},[3089,3093,3097,3101,3105,3110,3114,3118,3122,3126,3130,3135,3139,3144],{"type":51,"tag":79,"props":3090,"children":3091},{"style":285},[3092],{"type":57,"value":2797},{"type":51,"tag":79,"props":3094,"children":3095},{"style":102},[3096],{"type":57,"value":245},{"type":51,"tag":79,"props":3098,"children":3099},{"style":102},[3100],{"type":57,"value":822},{"type":51,"tag":79,"props":3102,"children":3103},{"style":515},[3104],{"type":57,"value":1618},{"type":51,"tag":79,"props":3106,"children":3107},{"style":285},[3108],{"type":57,"value":3109},"([[",{"type":51,"tag":79,"props":3111,"children":3112},{"style":102},[3113],{"type":57,"value":137},{"type":51,"tag":79,"props":3115,"children":3116},{"style":129},[3117],{"type":57,"value":1646},{"type":51,"tag":79,"props":3119,"children":3120},{"style":102},[3121],{"type":57,"value":137},{"type":51,"tag":79,"props":3123,"children":3124},{"style":102},[3125],{"type":57,"value":667},{"type":51,"tag":79,"props":3127,"children":3128},{"style":102},[3129],{"type":57,"value":126},{"type":51,"tag":79,"props":3131,"children":3132},{"style":129},[3133],{"type":57,"value":3134},"s-maxage=60",{"type":51,"tag":79,"props":3136,"children":3137},{"style":102},[3138],{"type":57,"value":137},{"type":51,"tag":79,"props":3140,"children":3141},{"style":285},[3142],{"type":57,"value":3143},"]])",{"type":51,"tag":79,"props":3145,"children":3146},{"style":102},[3147],{"type":57,"value":312},{"type":51,"tag":79,"props":3149,"children":3150},{"class":81,"line":345},[3151],{"type":51,"tag":79,"props":3152,"children":3153},{"style":102},[3154],{"type":57,"value":2877},{"type":51,"tag":79,"props":3156,"children":3157},{"class":81,"line":403},[3158],{"type":51,"tag":79,"props":3159,"children":3160},{"style":102},[3161],{"type":57,"value":1754},{"type":51,"tag":79,"props":3163,"children":3164},{"class":81,"line":412},[3165,3169,3173],{"type":51,"tag":79,"props":3166,"children":3167},{"style":102},[3168],{"type":57,"value":972},{"type":51,"tag":79,"props":3170,"children":3171},{"style":108},[3172],{"type":57,"value":255},{"type":51,"tag":79,"props":3174,"children":3175},{"style":102},[3176],{"type":57,"value":142},{"type":51,"tag":2413,"props":3178,"children":3179},{},[3180],{"type":57,"value":3181},"Correct:",{"type":51,"tag":67,"props":3183,"children":3184},{"className":69,"code":2450,"language":71,"meta":72,"style":72},[3185],{"type":51,"tag":75,"props":3186,"children":3187},{"__ignoreMap":72},[3188,3227,3266,3305,3312,3339,3358,3369,3408,3487,3498,3505,3516,3539,3582,3593,3600,3607],{"type":51,"tag":79,"props":3189,"children":3190},{"class":81,"line":82},[3191,3195,3199,3203,3207,3211,3215,3219,3223],{"type":51,"tag":79,"props":3192,"children":3193},{"style":96},[3194],{"type":57,"value":99},{"type":51,"tag":79,"props":3196,"children":3197},{"style":102},[3198],{"type":57,"value":105},{"type":51,"tag":79,"props":3200,"children":3201},{"style":108},[3202],{"type":57,"value":1052},{"type":51,"tag":79,"props":3204,"children":3205},{"style":102},[3206],{"type":57,"value":116},{"type":51,"tag":79,"props":3208,"children":3209},{"style":96},[3210],{"type":57,"value":121},{"type":51,"tag":79,"props":3212,"children":3213},{"style":102},[3214],{"type":57,"value":126},{"type":51,"tag":79,"props":3216,"children":3217},{"style":129},[3218],{"type":57,"value":181},{"type":51,"tag":79,"props":3220,"children":3221},{"style":102},[3222],{"type":57,"value":137},{"type":51,"tag":79,"props":3224,"children":3225},{"style":102},[3226],{"type":57,"value":142},{"type":51,"tag":79,"props":3228,"children":3229},{"class":81,"line":92},[3230,3234,3238,3242,3246,3250,3254,3258,3262],{"type":51,"tag":79,"props":3231,"children":3232},{"style":96},[3233],{"type":57,"value":99},{"type":51,"tag":79,"props":3235,"children":3236},{"style":102},[3237],{"type":57,"value":105},{"type":51,"tag":79,"props":3239,"children":3240},{"style":108},[3241],{"type":57,"value":1017},{"type":51,"tag":79,"props":3243,"children":3244},{"style":102},[3245],{"type":57,"value":116},{"type":51,"tag":79,"props":3247,"children":3248},{"style":96},[3249],{"type":57,"value":121},{"type":51,"tag":79,"props":3251,"children":3252},{"style":102},[3253],{"type":57,"value":126},{"type":51,"tag":79,"props":3255,"children":3256},{"style":129},[3257],{"type":57,"value":1108},{"type":51,"tag":79,"props":3259,"children":3260},{"style":102},[3261],{"type":57,"value":137},{"type":51,"tag":79,"props":3263,"children":3264},{"style":102},[3265],{"type":57,"value":142},{"type":51,"tag":79,"props":3267,"children":3268},{"class":81,"line":145},[3269,3273,3277,3281,3285,3289,3293,3297,3301],{"type":51,"tag":79,"props":3270,"children":3271},{"style":96},[3272],{"type":57,"value":99},{"type":51,"tag":79,"props":3274,"children":3275},{"style":102},[3276],{"type":57,"value":105},{"type":51,"tag":79,"props":3278,"children":3279},{"style":108},[3280],{"type":57,"value":470},{"type":51,"tag":79,"props":3282,"children":3283},{"style":102},[3284],{"type":57,"value":116},{"type":51,"tag":79,"props":3286,"children":3287},{"style":96},[3288],{"type":57,"value":121},{"type":51,"tag":79,"props":3290,"children":3291},{"style":102},[3292],{"type":57,"value":126},{"type":51,"tag":79,"props":3294,"children":3295},{"style":129},[3296],{"type":57,"value":689},{"type":51,"tag":79,"props":3298,"children":3299},{"style":102},[3300],{"type":57,"value":137},{"type":51,"tag":79,"props":3302,"children":3303},{"style":102},[3304],{"type":57,"value":142},{"type":51,"tag":79,"props":3306,"children":3307},{"class":81,"line":192},[3308],{"type":51,"tag":79,"props":3309,"children":3310},{"emptyLinePlaceholder":196},[3311],{"type":57,"value":199},{"type":51,"tag":79,"props":3313,"children":3314},{"class":81,"line":202},[3315,3319,3323,3327,3331,3335],{"type":51,"tag":79,"props":3316,"children":3317},{"style":211},[3318],{"type":57,"value":1170},{"type":51,"tag":79,"props":3320,"children":3321},{"style":108},[3322],{"type":57,"value":1175},{"type":51,"tag":79,"props":3324,"children":3325},{"style":102},[3326],{"type":57,"value":224},{"type":51,"tag":79,"props":3328,"children":3329},{"style":515},[3330],{"type":57,"value":1052},{"type":51,"tag":79,"props":3332,"children":3333},{"style":108},[3334],{"type":57,"value":733},{"type":51,"tag":79,"props":3336,"children":3337},{"style":102},[3338],{"type":57,"value":738},{"type":51,"tag":79,"props":3340,"children":3341},{"class":81,"line":268},[3342,3346,3350,3354],{"type":51,"tag":79,"props":3343,"children":3344},{"style":285},[3345],{"type":57,"value":1199},{"type":51,"tag":79,"props":3347,"children":3348},{"style":102},[3349],{"type":57,"value":245},{"type":51,"tag":79,"props":3351,"children":3352},{"style":108},[3353],{"type":57,"value":1017},{"type":51,"tag":79,"props":3355,"children":3356},{"style":102},[3357],{"type":57,"value":312},{"type":51,"tag":79,"props":3359,"children":3360},{"class":81,"line":281},[3361,3365],{"type":51,"tag":79,"props":3362,"children":3363},{"style":108},[3364],{"type":57,"value":1219},{"type":51,"tag":79,"props":3366,"children":3367},{"style":102},[3368],{"type":57,"value":312},{"type":51,"tag":79,"props":3370,"children":3371},{"class":81,"line":315},[3372,3376,3380,3384,3388,3392,3396,3400,3404],{"type":51,"tag":79,"props":3373,"children":3374},{"style":285},[3375],{"type":57,"value":1231},{"type":51,"tag":79,"props":3377,"children":3378},{"style":102},[3379],{"type":57,"value":2026},{"type":51,"tag":79,"props":3381,"children":3382},{"style":237},[3383],{"type":57,"value":2651},{"type":51,"tag":79,"props":3385,"children":3386},{"style":102},[3387],{"type":57,"value":667},{"type":51,"tag":79,"props":3389,"children":3390},{"style":237},[3391],{"type":57,"value":1273},{"type":51,"tag":79,"props":3393,"children":3394},{"style":102},[3395],{"type":57,"value":667},{"type":51,"tag":79,"props":3397,"children":3398},{"style":237},[3399],{"type":57,"value":155},{"type":51,"tag":79,"props":3401,"children":3402},{"style":102},[3403],{"type":57,"value":2051},{"type":51,"tag":79,"props":3405,"children":3406},{"style":102},[3407],{"type":57,"value":265},{"type":51,"tag":79,"props":3409,"children":3410},{"class":81,"line":345},[3411,3415,3419,3423,3427,3431,3435,3439,3443,3447,3451,3455,3459,3463,3467,3471,3475,3479,3483],{"type":51,"tag":79,"props":3412,"children":3413},{"style":96},[3414],{"type":57,"value":1505},{"type":51,"tag":79,"props":3416,"children":3417},{"style":285},[3418],{"type":57,"value":234},{"type":51,"tag":79,"props":3420,"children":3421},{"style":108},[3422],{"type":57,"value":2691},{"type":51,"tag":79,"props":3424,"children":3425},{"style":102},[3426],{"type":57,"value":2696},{"type":51,"tag":79,"props":3428,"children":3429},{"style":108},[3430],{"type":57,"value":2701},{"type":51,"tag":79,"props":3432,"children":3433},{"style":102},[3434],{"type":57,"value":2706},{"type":51,"tag":79,"props":3436,"children":3437},{"style":108},[3438],{"type":57,"value":1273},{"type":51,"tag":79,"props":3440,"children":3441},{"style":102},[3442],{"type":57,"value":302},{"type":51,"tag":79,"props":3444,"children":3445},{"style":108},[3446],{"type":57,"value":1436},{"type":51,"tag":79,"props":3448,"children":3449},{"style":102},[3450],{"type":57,"value":2723},{"type":51,"tag":79,"props":3452,"children":3453},{"style":868},[3454],{"type":57,"value":1446},{"type":51,"tag":79,"props":3456,"children":3457},{"style":102},[3458],{"type":57,"value":2706},{"type":51,"tag":79,"props":3460,"children":3461},{"style":108},[3462],{"type":57,"value":155},{"type":51,"tag":79,"props":3464,"children":3465},{"style":102},[3466],{"type":57,"value":2740},{"type":51,"tag":79,"props":3468,"children":3469},{"style":102},[3470],{"type":57,"value":126},{"type":51,"tag":79,"props":3472,"children":3473},{"style":129},[3474],{"type":57,"value":787},{"type":51,"tag":79,"props":3476,"children":3477},{"style":102},[3478],{"type":57,"value":137},{"type":51,"tag":79,"props":3480,"children":3481},{"style":285},[3482],{"type":57,"value":1535},{"type":51,"tag":79,"props":3484,"children":3485},{"style":102},[3486],{"type":57,"value":738},{"type":51,"tag":79,"props":3488,"children":3489},{"class":81,"line":403},[3490,3494],{"type":51,"tag":79,"props":3491,"children":3492},{"style":96},[3493],{"type":57,"value":888},{"type":51,"tag":79,"props":3495,"children":3496},{"style":102},[3497],{"type":57,"value":1745},{"type":51,"tag":79,"props":3499,"children":3500},{"class":81,"line":412},[3501],{"type":51,"tag":79,"props":3502,"children":3503},{"style":102},[3504],{"type":57,"value":1731},{"type":51,"tag":79,"props":3506,"children":3507},{"class":81,"line":421},[3508,3512],{"type":51,"tag":79,"props":3509,"children":3510},{"style":96},[3511],{"type":57,"value":1740},{"type":51,"tag":79,"props":3513,"children":3514},{"style":102},[3515],{"type":57,"value":265},{"type":51,"tag":79,"props":3517,"children":3518},{"class":81,"line":429},[3519,3523,3527,3531,3535],{"type":51,"tag":79,"props":3520,"children":3521},{"style":285},[3522],{"type":57,"value":2797},{"type":51,"tag":79,"props":3524,"children":3525},{"style":102},[3526],{"type":57,"value":245},{"type":51,"tag":79,"props":3528,"children":3529},{"style":102},[3530],{"type":57,"value":822},{"type":51,"tag":79,"props":3532,"children":3533},{"style":515},[3534],{"type":57,"value":1618},{"type":51,"tag":79,"props":3536,"children":3537},{"style":285},[3538],{"type":57,"value":1623},{"type":51,"tag":79,"props":3540,"children":3541},{"class":81,"line":478},[3542,3546,3550,3554,3558,3562,3566,3570,3574,3578],{"type":51,"tag":79,"props":3543,"children":3544},{"style":285},[3545],{"type":57,"value":2821},{"type":51,"tag":79,"props":3547,"children":3548},{"style":102},[3549],{"type":57,"value":137},{"type":51,"tag":79,"props":3551,"children":3552},{"style":129},[3553],{"type":57,"value":1646},{"type":51,"tag":79,"props":3555,"children":3556},{"style":102},[3557],{"type":57,"value":137},{"type":51,"tag":79,"props":3559,"children":3560},{"style":102},[3561],{"type":57,"value":667},{"type":51,"tag":79,"props":3563,"children":3564},{"style":102},[3565],{"type":57,"value":126},{"type":51,"tag":79,"props":3567,"children":3568},{"style":129},[3569],{"type":57,"value":2340},{"type":51,"tag":79,"props":3571,"children":3572},{"style":102},[3573],{"type":57,"value":137},{"type":51,"tag":79,"props":3575,"children":3576},{"style":285},[3577],{"type":57,"value":2349},{"type":51,"tag":79,"props":3579,"children":3580},{"style":102},[3581],{"type":57,"value":312},{"type":51,"tag":79,"props":3583,"children":3584},{"class":81,"line":486},[3585,3589],{"type":51,"tag":79,"props":3586,"children":3587},{"style":285},[3588],{"type":57,"value":2865},{"type":51,"tag":79,"props":3590,"children":3591},{"style":102},[3592],{"type":57,"value":312},{"type":51,"tag":79,"props":3594,"children":3595},{"class":81,"line":557},[3596],{"type":51,"tag":79,"props":3597,"children":3598},{"style":102},[3599],{"type":57,"value":2877},{"type":51,"tag":79,"props":3601,"children":3602},{"class":81,"line":596},[3603],{"type":51,"tag":79,"props":3604,"children":3605},{"style":102},[3606],{"type":57,"value":1754},{"type":51,"tag":79,"props":3608,"children":3609},{"class":81,"line":1542},[3610,3614,3618],{"type":51,"tag":79,"props":3611,"children":3612},{"style":102},[3613],{"type":57,"value":972},{"type":51,"tag":79,"props":3615,"children":3616},{"style":108},[3617],{"type":57,"value":255},{"type":51,"tag":79,"props":3619,"children":3620},{"style":102},[3621],{"type":57,"value":142},{"type":51,"tag":2413,"props":3623,"children":3624},{},[3625],{"type":57,"value":3626},"With batching enabled by default, a cached response containing personal data could be served to other users; always check for auth context, errors, and request type before setting cache headers.",{"type":51,"tag":2413,"props":3628,"children":3629},{},[3630],{"type":57,"value":3631},"Source: www\u002Fdocs\u002Fserver\u002Fcaching.md",{"type":51,"tag":1821,"props":3633,"children":3635},{"id":3634},"high-nextjs-app-router-overrides-cache-control-headers",[3636,3641],{"type":51,"tag":79,"props":3637,"children":3638},{},[3639],{"type":57,"value":3640},"HIGH",{"type":57,"value":3642}," Next.js App Router overrides Cache-Control headers",{"type":51,"tag":2413,"props":3644,"children":3645},{},[3646,3648,3654,3656,3661,3663,3668,3670,3676,3678,3684],{"type":57,"value":3647},"There is no code fix for this -- Next.js App Router overrides ",{"type":51,"tag":75,"props":3649,"children":3651},{"className":3650},[],[3652],{"type":57,"value":3653},"Cache-Control",{"type":57,"value":3655}," headers set by tRPC via ",{"type":51,"tag":75,"props":3657,"children":3659},{"className":3658},[],[3660],{"type":57,"value":2439},{"type":57,"value":3662},". The documented caching approach using ",{"type":51,"tag":75,"props":3664,"children":3666},{"className":3665},[],[3667],{"type":57,"value":2439},{"type":57,"value":3669}," does not work as expected in App Router. Use Next.js native caching mechanisms (",{"type":51,"tag":75,"props":3671,"children":3673},{"className":3672},[],[3674],{"type":57,"value":3675},"revalidate",{"type":57,"value":3677},", ",{"type":51,"tag":75,"props":3679,"children":3681},{"className":3680},[],[3682],{"type":57,"value":3683},"unstable_cache",{"type":57,"value":3685},") instead when deploying on App Router.",{"type":51,"tag":2413,"props":3687,"children":3688},{},[3689,3691],{"type":57,"value":3690},"Source: ",{"type":51,"tag":3692,"props":3693,"children":3697},"a",{"href":3694,"rel":3695},"https:\u002F\u002Fgithub.com\u002Ftrpc\u002Ftrpc\u002Fissues\u002F5625",[3696],"nofollow",[3698],{"type":57,"value":3694},{"type":51,"tag":60,"props":3700,"children":3702},{"id":3701},"see-also",[3703],{"type":57,"value":3704},"See Also",{"type":51,"tag":3706,"props":3707,"children":3708},"ul",{},[3709,3720,3731,3742],{"type":51,"tag":3710,"props":3711,"children":3712},"li",{},[3713,3718],{"type":51,"tag":75,"props":3714,"children":3716},{"className":3715},[],[3717],{"type":57,"value":44},{"type":57,"value":3719}," -- initTRPC, createContext configuration",{"type":51,"tag":3710,"props":3721,"children":3722},{},[3723,3729],{"type":51,"tag":75,"props":3724,"children":3726},{"className":3725},[],[3727],{"type":57,"value":3728},"adapter-standalone",{"type":57,"value":3730}," -- responseMeta option on createHTTPServer",{"type":51,"tag":3710,"props":3732,"children":3733},{},[3734,3740],{"type":51,"tag":75,"props":3735,"children":3737},{"className":3736},[],[3738],{"type":57,"value":3739},"adapter-fetch",{"type":57,"value":3741}," -- responseMeta option on fetchRequestHandler",{"type":51,"tag":3710,"props":3743,"children":3744},{},[3745,3751],{"type":51,"tag":75,"props":3746,"children":3748},{"className":3747},[],[3749],{"type":57,"value":3750},"links",{"type":57,"value":3752}," -- splitLink to separate public\u002Fprivate requests on the client",{"type":51,"tag":3754,"props":3755,"children":3756},"style",{},[3757],{"type":57,"value":3758},"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":3760,"total":1690},[3761,3776,3789,3802,3821,3833,3847,3854,3866,3880,3889,3901],{"slug":3762,"name":3762,"fn":3763,"description":3764,"org":3765,"tags":3766,"stars":22,"repoUrl":23,"updatedAt":3775},"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},[3767,3770,3773,3774],{"name":3768,"slug":3769,"type":15},"API Development","api-development",{"name":3771,"slug":3772,"type":15},"AWS","aws",{"name":17,"slug":18,"type":15},{"name":9,"slug":8,"type":15},"2026-07-18T05:47:05.451869",{"slug":3777,"name":3777,"fn":3778,"description":3779,"org":3780,"tags":3781,"stars":22,"repoUrl":23,"updatedAt":3788},"adapter-express","mount tRPC as Express middleware","Mount tRPC as Express middleware with createExpressMiddleware() from @trpc\u002Fserver\u002Fadapters\u002Fexpress. Access Express req\u002Fres in createContext via CreateExpressContextOptions. Mount at a path prefix like app.use('\u002Ftrpc', ...). Avoid global express.json() conflicting with tRPC body parsing for FormData.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3782,3783,3784,3787],{"name":3768,"slug":3769,"type":15},{"name":17,"slug":18,"type":15},{"name":3785,"slug":3786,"type":15},"Express","express",{"name":9,"slug":8,"type":15},"2026-07-18T05:46:53.274248",{"slug":3790,"name":3790,"fn":3791,"description":3792,"org":3793,"tags":3794,"stars":22,"repoUrl":23,"updatedAt":3801},"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},[3795,3796,3797,3800],{"name":3768,"slug":3769,"type":15},{"name":17,"slug":18,"type":15},{"name":3798,"slug":3799,"type":15},"Fastify","fastify",{"name":9,"slug":8,"type":15},"2026-07-18T05:46:53.746621",{"slug":3739,"name":3739,"fn":3803,"description":3804,"org":3805,"tags":3806,"stars":22,"repoUrl":23,"updatedAt":3820},"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},[3807,3810,3813,3816,3817],{"name":3808,"slug":3809,"type":15},"Cloudflare","cloudflare",{"name":3811,"slug":3812,"type":15},"Deployment","deployment",{"name":3814,"slug":3815,"type":15},"Edge","edge",{"name":9,"slug":8,"type":15},{"name":3818,"slug":3819,"type":15},"Vercel","vercel","2026-07-18T05:46:50.548228",{"slug":3728,"name":3728,"fn":3822,"description":3823,"org":3824,"tags":3825,"stars":22,"repoUrl":23,"updatedAt":3832},"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},[3826,3827,3828,3831],{"name":3768,"slug":3769,"type":15},{"name":17,"slug":18,"type":15},{"name":3829,"slug":3830,"type":15},"Node.js","node-js",{"name":9,"slug":8,"type":15},"2026-07-18T05:46:58.093869",{"slug":3834,"name":3834,"fn":3835,"description":3836,"org":3837,"tags":3838,"stars":22,"repoUrl":23,"updatedAt":3846},"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},[3839,3841,3844,3845],{"name":3840,"slug":3834,"type":15},"Auth",{"name":3842,"slug":3843,"type":15},"Authentication","authentication",{"name":17,"slug":18,"type":15},{"name":9,"slug":8,"type":15},"2026-07-18T05:46:45.347628",{"slug":4,"name":4,"fn":5,"description":6,"org":3848,"tags":3849,"stars":22,"repoUrl":23,"updatedAt":24},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3850,3851,3852,3853],{"name":17,"slug":18,"type":15},{"name":21,"slug":4,"type":15},{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},{"slug":3855,"name":3855,"fn":3856,"description":3857,"org":3858,"tags":3859,"stars":22,"repoUrl":23,"updatedAt":3865},"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},[3860,3861,3864],{"name":3768,"slug":3769,"type":15},{"name":3862,"slug":3863,"type":15},"Frontend","frontend",{"name":9,"slug":8,"type":15},"2026-07-18T05:48:11.437946",{"slug":3867,"name":3867,"fn":3868,"description":3869,"org":3870,"tags":3871,"stars":22,"repoUrl":23,"updatedAt":3879},"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},[3872,3873,3876,3877],{"name":17,"slug":18,"type":15},{"name":3874,"slug":3875,"type":15},"Debugging","debugging",{"name":9,"slug":8,"type":15},{"name":3878,"slug":33,"type":15},"TypeScript","2026-07-18T05:46:52.798151",{"slug":3750,"name":3750,"fn":3881,"description":3882,"org":3883,"tags":3884,"stars":22,"repoUrl":23,"updatedAt":3888},"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},[3885,3886,3887],{"name":3768,"slug":3769,"type":15},{"name":3862,"slug":3863,"type":15},{"name":9,"slug":8,"type":15},"2026-07-18T05:47:06.847309",{"slug":3890,"name":3890,"fn":3891,"description":3892,"org":3893,"tags":3894,"stars":22,"repoUrl":23,"updatedAt":3900},"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},[3895,3896,3899],{"name":17,"slug":18,"type":15},{"name":3897,"slug":3898,"type":15},"Middleware","middleware",{"name":9,"slug":8,"type":15},"2026-07-18T05:46:49.132255",{"slug":3902,"name":3902,"fn":3903,"description":3904,"org":3905,"tags":3906,"stars":22,"repoUrl":23,"updatedAt":3914},"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},[3907,3908,3909,3912,3913],{"name":17,"slug":18,"type":15},{"name":3862,"slug":3863,"type":15},{"name":3910,"slug":3911,"type":15},"Next.js","next-js",{"name":9,"slug":8,"type":15},{"name":3878,"slug":33,"type":15},"2026-07-18T05:47:10.468453",{"items":3916,"total":1690},[3917,3924,3931,3938,3946,3953,3960],{"slug":3762,"name":3762,"fn":3763,"description":3764,"org":3918,"tags":3919,"stars":22,"repoUrl":23,"updatedAt":3775},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3920,3921,3922,3923],{"name":3768,"slug":3769,"type":15},{"name":3771,"slug":3772,"type":15},{"name":17,"slug":18,"type":15},{"name":9,"slug":8,"type":15},{"slug":3777,"name":3777,"fn":3778,"description":3779,"org":3925,"tags":3926,"stars":22,"repoUrl":23,"updatedAt":3788},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3927,3928,3929,3930],{"name":3768,"slug":3769,"type":15},{"name":17,"slug":18,"type":15},{"name":3785,"slug":3786,"type":15},{"name":9,"slug":8,"type":15},{"slug":3790,"name":3790,"fn":3791,"description":3792,"org":3932,"tags":3933,"stars":22,"repoUrl":23,"updatedAt":3801},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3934,3935,3936,3937],{"name":3768,"slug":3769,"type":15},{"name":17,"slug":18,"type":15},{"name":3798,"slug":3799,"type":15},{"name":9,"slug":8,"type":15},{"slug":3739,"name":3739,"fn":3803,"description":3804,"org":3939,"tags":3940,"stars":22,"repoUrl":23,"updatedAt":3820},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3941,3942,3943,3944,3945],{"name":3808,"slug":3809,"type":15},{"name":3811,"slug":3812,"type":15},{"name":3814,"slug":3815,"type":15},{"name":9,"slug":8,"type":15},{"name":3818,"slug":3819,"type":15},{"slug":3728,"name":3728,"fn":3822,"description":3823,"org":3947,"tags":3948,"stars":22,"repoUrl":23,"updatedAt":3832},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3949,3950,3951,3952],{"name":3768,"slug":3769,"type":15},{"name":17,"slug":18,"type":15},{"name":3829,"slug":3830,"type":15},{"name":9,"slug":8,"type":15},{"slug":3834,"name":3834,"fn":3835,"description":3836,"org":3954,"tags":3955,"stars":22,"repoUrl":23,"updatedAt":3846},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3956,3957,3958,3959],{"name":3840,"slug":3834,"type":15},{"name":3842,"slug":3843,"type":15},{"name":17,"slug":18,"type":15},{"name":9,"slug":8,"type":15},{"slug":4,"name":4,"fn":5,"description":6,"org":3961,"tags":3962,"stars":22,"repoUrl":23,"updatedAt":24},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3963,3964,3965,3966],{"name":17,"slug":18,"type":15},{"name":21,"slug":4,"type":15},{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15}]