\n\n\nI am getting an issue every time I try to prefetch and then use useSuspenseQuery:\n\n```tsx\nexport default async function IndexPage() {\n\n prefetch(trpc.getSomeData.queryOptions());\n\n return (\n \u003Cdiv>\n \u003Ch2>Query\u003C/h2>\n \u003CSuspense fallback=\"loading...\">\n \u003CClientComponent />\n \u003C/Suspense>\n \u003C/div>\n );\n}\n```\n```tsx\n\"use client\";\n\nimport { useSuspenseQuery } from \"@tanstack/react-query\";\nimport { useTRPC } from \"~/utils/trpc\";\n\nexport function ClientComponent() {\n const trpc = useTRPC();\n const query = useSuspenseQuery(trpc.getSomeData.queryOptions());\n return \u003Cdiv>{query.data}\u003C/div>;\n}\n```\n\n\n### Link to reproduction\n\nhttps://github.com/dBianchii/trpc-prefetch-error-repro.git\n\n### To reproduce\n\n- Clone the project locally (I had problems setting it up stackblitz so you'll have to do it locally)\n- Follow the repo's. README instructions\n\n### Additional information\n\n_No response_\n\n### ๐จโ๐งโ๐ฆ Contributing\n\n- [ ] ๐โโ๏ธ Yes, I'd be down to file a PR fixing this bug!",[3172,3175],{"name":3173,"color":3174},"โฎ needs reproduction","000055",{"name":3176,"color":3177},"๐ bug: unconfirmed","e99695",6973,"trpc","open","bug: Switched to client rendering because the server rendering errored: UNAUTHORIZED","2025-10-06T13:55:08Z","https://github.com/trpc/trpc/issues/6973",0.6728564,{"description":3186,"labels":3187,"number":3189,"owner":3179,"repository":3179,"state":3180,"title":3190,"updated_at":3191,"url":3192,"score":3193},"### Provide environment information\n\n```\nSystem:\n OS: macOS 15.3.2\n CPU: (10) arm64 Apple M1 Max\n Memory: 14.50 GB / 64.00 GB\n Shell: 5.9 - /bin/zsh\nBinaries:\n Node: 22.14.0 - ~/.nvm/versions/node/v22.14.0/bin/node\n npm: 11.2.0 - ~/.nvm/versions/node/v22.14.0/bin/npm\n pnpm: 10.8.0 - ~/.nvm/versions/node/v22.14.0/bin/pnpm\nBrowsers:\n Chrome: 135.0.7049.85\n Safari: 18.3.1\nnpmPackages:\n @tanstack/react-query: 5.72.2 => 5.72.2 \n @trpc/client: 11.1.0 => 11.1.0 \n @trpc/server: 11.1.0 => 11.1.0 \n react: 19.1.0 => 19.1.0 \n typescript: 5.8.3 => 5.8.3\n```\n\n### Describe the bug\n\nWhen using `useSuspenseInfiniteQueries` with `.infiniteQueryOptions`, a type error is reported but functionally works. `Type 'typeof skipToken' is not assignable to type 'QueryFunction...`\n\n### Link to reproduction\n\nhttps://codesandbox.io/p/devbox/snowy-river-psjh7x\n\n### To reproduce\n\n`src/routes/index.tsx`. Line ~20 is the type error with the `skipToken`.\n\nIgnore all the other errors in that page about posts, thats from the default tanstack router example.\n\n### Additional information\n\nIt's just a type error, it functionally works, just annoying having to throw an `ts-expect-error` because it might swallow input errors as well.\n\n### ๐จโ๐งโ๐ฆ Contributing\n\n- [ ] ๐โโ๏ธ Yes, I'd be down to file a PR fixing this bug!",[3188],{"name":3176,"color":3177},6701,"bug: `useSuspenseInfiniteQueries` `typeof skipToken is not assignable to type 'QueryFunction...` Type Error","2025-05-10T23:50:55Z","https://github.com/trpc/trpc/issues/6701",0.6775931,{"description":3195,"labels":3196,"number":3198,"owner":3179,"repository":3179,"state":3180,"title":3199,"updated_at":3200,"url":3201,"score":3202},"### Provide environment information\n\n```\r\n System:\r\n OS: macOS 14.4.1\r\n CPU: (8) arm64 Apple M1\r\n Memory: 62.41 MB / 16.00 GB\r\n Shell: 5.9 - /bin/zsh\r\n Binaries:\r\n Node: 20.10.0 - ~/.nvm/versions/node/v20.10.0/bin/node\r\n npm: 10.2.3 - ~/.nvm/versions/node/v20.10.0/bin/npm\r\n pnpm: 9.12.2 - ~/.nvm/versions/node/v20.10.0/bin/pnpm\r\n Browsers:\r\n Chrome: 130.0.6723.92\r\n Safari: 17.4.1\r\n npmPackages:\r\n @tanstack/react-query: ^5.59.19 => 5.59.19 \r\n @trpc/client: 11.0.0-rc.608 => 11.0.0-rc.608+f75de97b3 \r\n @trpc/react-query: 11.0.0-rc.608 => 11.0.0-rc.608+f75de97b3 \r\n react: ^18.3.1 => 18.3.1 \r\n typescript: ^5.6.3 => 5.6.3 \r\n```\n\n### Describe the bug\n\nI have a query which I just want to run in a certain condition (if another query had a non-empty result). I was trying to follow the docs (see https://trpc.io/docs/client/react/useQueries in conjunction with https://tanstack.com/query/v4/docs/framework/react/guides/dependent-queries#usequeries-dependent-query) but I could not get my code snippet to compile.\n\n### Link to reproduction\n\nhttps://stackblitz.com/edit/github-qa2kdy?file=src%2Fpages%2Findex.tsx\n\n### To reproduce\n\nChange the text in the variable `text` in line 10 of the `index.tsx`, and you'll see the error appear. To me the error only appeared after changing the text.\n\n### Additional information\n\nHere's the typescript error I get on the callback:\r\n\r\n```\r\nArgument of type '(t: UseQueriesProcedureRecord\u003C{ ctx: object; meta: object; errorShape: DefaultErrorShape; transformer: false; }, { greeting: QueryProcedure\u003C{ input: { name?: string | null | undefined; }; output: { text: string; }; }>; }>) => [] | [...]' is not assignable to parameter of type '(t: UseQueriesProcedureRecord\u003C{ ctx: object; meta: object; errorShape: DefaultErrorShape; transformer: false; }, { greeting: QueryProcedure\u003C{ input: { name?: string | null | undefined; }; output: { text: string; }; }>; }>) => readonly []'.\r\n Type '[] | [TrpcQueryOptionsForUseQueries\u003C{ text: string; }, { text: string; }, TRPCClientError\u003C{ ctx: object; meta: object; errorShape: DefaultErrorShape; transformer: false; }>>]' is not assignable to type 'readonly []'.\r\n Type '[TrpcQueryOptionsForUseQueries\u003C{ text: string; }, { text: string; }, TRPCClientError\u003C{ ctx: object; meta: object; errorShape: DefaultErrorShape; transformer: false; }>>]' is not assignable to type 'readonly []'.\r\n Source has 1 element(s) but target allows only 0.(2345)\r\n```\n\n### ๐จโ๐งโ๐ฆ Contributing\n\n- [ ] ๐โโ๏ธ Yes, I'd be down to file a PR fixing this bug!",[3197],{"name":3176,"color":3177},6188,"bug: React: Types for callback of `trpc.useQueries` doesn't allow returning an empty array","2025-03-20T15:42:41Z","https://github.com/trpc/trpc/issues/6188",0.67900604,{"description":3204,"labels":3205,"number":3210,"owner":3179,"repository":3179,"state":3211,"title":3212,"updated_at":3213,"url":3214,"score":3215},"### Provide environment information\n\n System:\r\n OS: macOS 13.0\r\n CPU: (8) x64 Apple M1\r\n Memory: 16.57 MB / 16.00 GB\r\n Shell: 5.5.1 - /usr/local/bin/zsh\r\n Binaries:\r\n Node: 14.18.3 - ~/.nvm/versions/node/v14.18.3/bin/node\r\n Yarn: 1.22.19 - ~/.nvm/versions/node/v14.18.3/bin/yarn\r\n npm: 8.13.1 - ~/.nvm/versions/node/v14.18.3/bin/npm\r\n Browsers:\r\n Brave Browser: 87.1.18.75\r\n Chrome: 107.0.5304.110\r\n Firefox: 105.0.3\r\n Firefox Developer Edition: 76.0\r\n Safari Technology Preview: 16.4\r\n\n\n### Describe the bug\n\n ERROR ERROR in client.ts:5:45 05:06:06\r\nTS2344: Type 'Router\u003C{ _config: RootConfig\u003C{ ctx: any; meta: {}; errorShape: DefaultErrorShape; transformer: DefaultDataTransformer; }>; router: true; ... 5 more ...; isDev: boolean; }> & { ...; }' does not satisfy the constraint 'Router\u003CAnyRouterDef\u003CAnyRootConfig, any>>'.\r\n The types returned by 'createCaller(...)' are incompatible between these types.\r\n Type '{ query: inferHandlerFn\u003C{}>; mutation: inferHandlerFn\u003C{}>; subscription: inferHandlerFn\u003C{}>; } & DecoratedProcedureRecord\u003C{ exportReport: BuildProcedure\u003C\"query\", { ...; }, { ...; }>; }>' is not assignable to type '{ query: inferHandlerFn\u003Cany>; mutation: inferHandlerFn\u003Cany>; subscription: inferHandlerFn\u003Cany>; } & DecoratedProcedureRecord\u003Cany>'.\r\n Type '{ query: inferHandlerFn\u003C{}>; mutation: inferHandlerFn\u003C{}>; subscription: inferHandlerFn\u003C{}>; } & DecoratedProcedureRecord\u003C{ exportReport: BuildProcedure\u003C\"query\", { ...; }, { ...; }>; }>' is not assignable to type '{ query: inferHandlerFn\u003Cany>; mutation: inferHandlerFn\u003Cany>; subscription: inferHandlerFn\u003Cany>; }'.\r\n Types of property 'query' are incompatible.\r\n Type 'inferHandlerFn\u003C{}>' is not assignable to type 'inferHandlerFn\u003Cany>'.\r\n Types of parameters 'path' and 'path' are incompatible.\r\n Type 'TPath' is not assignable to type 'never'.\r\n Type 'string' is not assignable to type 'never'.\n\n### Link to reproduction\n\nNo link\n\n### To reproduce\n\nI don't know why it stopped working all of a sudden\n\n### Additional information\n\n_No response_\n\n### ๐จโ๐งโ๐ฆ Contributing\n\n- [ ] ๐โโ๏ธ Yes, I'd be down to file a PR fixing this bug!",[3206,3209],{"name":3207,"color":3208},"๐ป invalid","e4e669",{"name":3173,"color":3174},3202,"closed","bug: not sure what happened, just broke all of a sudden","2022-11-19T21:47:15Z","https://github.com/trpc/trpc/issues/3202",0.55847245,{"description":3217,"labels":3218,"number":3219,"owner":3179,"repository":3179,"state":3211,"title":3220,"updated_at":3221,"url":3222,"score":3223},"### Provide environment information\n\nOS: macOS 13.0\r\nCPU: (8) x64 Apple M1\r\nMemory: 16.57 MB / 16.00 GB\r\nShell: 5.5.1 - /usr/local/bin/zsh\r\nBinaries:\r\nNode: 14.18.3 - ~/.nvm/versions/node/v14.18.3/bin/node\r\nYarn: 1.22.19 - ~/.nvm/versions/node/v14.18.3/bin/yarn\r\nnpm: 8.13.1 - ~/.nvm/versions/node/v14.18.3/bin/npm\r\nBrowsers:\r\nBrave Browser: 87.1.18.75\r\nChrome: 107.0.5304.110\r\nFirefox: 105.0.3\r\nFirefox Developer Edition: 76.0\r\nSafari Technology Preview: 16.4\r\n\n\n### Describe the bug\n\nI don't really know how this type checking really works but if somehow the client repo has different trpc version than the server ones, if I start the client side (e.g. nuxt) it will throw an error.\r\n\r\nError stacktrace\r\n```\r\nERROR ERROR in client.ts:5:45 05:06:06\r\nTS2344: Type 'Router\u003C{ _config: RootConfig\u003C{ ctx: any; meta: {}; errorShape: DefaultErrorShape; transformer: DefaultDataTransformer; }>; router: true; ... 5 more ...; isDev: boolean; }> & { ...; }' does not satisfy the constraint 'Router\u003CAnyRouterDef\u003CAnyRootConfig, any>>'.\r\nThe types returned by 'createCaller(...)' are incompatible between these types.\r\nType '{ query: inferHandlerFn\u003C{}>; mutation: inferHandlerFn\u003C{}>; subscription: inferHandlerFn\u003C{}>; } & DecoratedProcedureRecord\u003C{ exportReport: BuildProcedure\u003C\"query\", { ...; }, { ...; }>; }>' is not assignable to type '{ query: inferHandlerFn; mutation: inferHandlerFn; subscription: inferHandlerFn; } & DecoratedProcedureRecord'.\r\nType '{ query: inferHandlerFn\u003C{}>; mutation: inferHandlerFn\u003C{}>; subscription: inferHandlerFn\u003C{}>; } & DecoratedProcedureRecord\u003C{ exportReport: BuildProcedure\u003C\"query\", { ...; }, { ...; }>; }>' is not assignable to type '{ query: inferHandlerFn; mutation: inferHandlerFn; subscription: inferHandlerFn; }'.\r\nTypes of property 'query' are incompatible.\r\nType 'inferHandlerFn\u003C{}>' is not assignable to type 'inferHandlerFn'.\r\nTypes of parameters 'path' and 'path' are incompatible.\r\nType 'TPath' is not assignable to type 'never'.\r\nType 'string' is not assignable to type 'never'.\r\n```\r\n\r\nIf I understand it correctly, type checking in this case is probably inferred from the compilation time, how is the version of another repo that host the server app router code has to do with this and invalidate the inference? I'm really confused.\n\n### Link to reproduction\n\n123\n\n### To reproduce\n\nI have two repos, frontend-code and backend-code\r\n\r\nfrontend-code has yarn.lock `trpc/client 10.0.0-rc.8`, `trpc/client 10.0.0-rc.8`\r\nbackend-code has yarn.lock `trpc/client 10.0.0-rc.7`\r\n\r\nThe code that throw an error from (this runs in a nuxt project as a plugin)\r\n```\r\nimport Vue from 'vue'\r\nimport { createTRPCProxyClient, httpBatchLink } from '@trpc/client';\r\nimport type { AppRouter } from '../../../backend-code/server/_app';\r\n\r\nexport const client = createTRPCProxyClient\u003CAppRouter>({\r\n links: [\r\n httpBatchLink({\r\n url: process.env.TRPC_URL || '',\r\n fetch(url, options) {\r\n return fetch(url, {\r\n ...options,\r\n credentials: 'omit', // cors\r\n });\r\n },\r\n }),\r\n ],\r\n});\r\n```\r\n\r\nCode in ../../../backend-code/server/_app\r\n```\r\nimport { mergeRouters } from './trpc';\r\nimport { exportRouter } from './routers/report' // (a typical trpc router)\r\nย \r\nexport const appRouter = exportRouter;\r\nย \r\n// Export **type** of a router\r\nexport type AppRouter = typeof appRouter;\r\n```\r\n\r\n\r\nError stacktrace\r\n```\r\nERROR ERROR in client.ts:5:45 05:06:06\r\nTS2344: Type 'Router\u003C{ _config: RootConfig\u003C{ ctx: any; meta: {}; errorShape: DefaultErrorShape; transformer: DefaultDataTransformer; }>; router: true; ... 5 more ...; isDev: boolean; }> & { ...; }' does not satisfy the constraint 'Router\u003CAnyRouterDef\u003CAnyRootConfig, any>>'.\r\nThe types returned by 'createCaller(...)' are incompatible between these types.\r\nType '{ query: inferHandlerFn\u003C{}>; mutation: inferHandlerFn\u003C{}>; subscription: inferHandlerFn\u003C{}>; } & DecoratedProcedureRecord\u003C{ exportReport: BuildProcedure\u003C\"query\", { ...; }, { ...; }>; }>' is not assignable to type '{ query: inferHandlerFn; mutation: inferHandlerFn; subscription: inferHandlerFn; } & DecoratedProcedureRecord'.\r\nType '{ query: inferHandlerFn\u003C{}>; mutation: inferHandlerFn\u003C{}>; subscription: inferHandlerFn\u003C{}>; } & DecoratedProcedureRecord\u003C{ exportReport: BuildProcedure\u003C\"query\", { ...; }, { ...; }>; }>' is not assignable to type '{ query: inferHandlerFn; mutation: inferHandlerFn; subscription: inferHandlerFn; }'.\r\nTypes of property 'query' are incompatible.\r\nType 'inferHandlerFn\u003C{}>' is not assignable to type 'inferHandlerFn'.\r\nTypes of parameters 'path' and 'path' are incompatible.\r\nType 'TPath' is not assignable to type 'never'.\r\nType 'string' is not assignable to type 'never'.\r\n```\r\n\r\nIf I understand it correctly, type checking in this case is probably inferred from the compilation time, how is the version of another repo that host the server app router code has to do with this and invalidate the inference? I'm really confused.\n\n### Additional information\n\n_No response_\n\n### ๐จโ๐งโ๐ฆ Contributing\n\n- [ ] ๐โโ๏ธ Yes, I'd be down to file a PR fixing this bug!",[],3206,"bug: if trpc package version is different between server and client code it will throw an error","2022-11-20T14:06:29Z","https://github.com/trpc/trpc/issues/3206",0.5987928,{"description":3225,"labels":3226,"number":3228,"owner":3179,"repository":3179,"state":3211,"title":3229,"updated_at":3230,"url":3231,"score":3232},"### Provide environment information\n\nmacos\r\nvscode\r\nelectron-vite\r\nreact\r\n\r\nmonorepo with yarn workspaces\r\nclient electron app and server app in different packages\n\n### Describe the bug\n\nTrying to instantiate the trpc client, I get a type mismatch error.\r\n\r\nHere is the file. My editor shows red squiggle/type error on the `\u003CAppRouter>`\r\n\r\n```\r\nimport { createTRPCProxyClient, httpLink } from '@trpc/client'\r\nimport type { AppRouter } from '@flowy/server/src/router'\r\nimport CONFIG from '../config/config'\r\n\r\nconst trpc = createTRPCProxyClient\u003CAppRouter>({\r\n links: [\r\n httpLink({\r\n url: `${CONFIG.API_URL}/trpc`,\r\n headers: () => {\r\n return {\r\n authorization: ''\r\n }\r\n }\r\n })\r\n ]\r\n})\r\n\r\nexport default trpc\r\n```\r\n\r\nThe error is as follows: \r\n```\r\nType 'CreateRouterInner\u003CRootConfig\u003C{ ctx: Context; meta: object; errorShape: DefaultErrorShape; transformer: DefaultDataTransformer; }>, { ...; }>' does not satisfy the constraint 'Router\u003CAnyRouterDef\u003CAnyRootConfig, any>>'.\r\n The types returned by 'createCaller(...)' are incompatible between these types.\r\n Type '{ query: inferHandlerFn\u003C{}>; mutation: inferHandlerFn\u003C{}>; subscription: inferHandlerFn\u003C{}>; } & DecoratedProcedureRecord\u003C{ hello: BuildProcedure\u003C\"query\", { _config: RootConfig\u003C...>; ... 5 more ...; _output_out: unique symbol; }, string>; ... 12 more ...; s3: CreateRouterInner\u003C...>; }>' is not assignable to type '{ query: inferHandlerFn\u003Cany>; mutation: inferHandlerFn\u003Cany>; subscription: inferHandlerFn\u003Cany>; } & DecoratedProcedureRecord\u003Cany>'.\r\n Type '{ query: inferHandlerFn\u003C{}>; mutation: inferHandlerFn\u003C{}>; subscription: inferHandlerFn\u003C{}>; } & DecoratedProcedureRecord\u003C{ hello: BuildProcedure\u003C\"query\", { _config: RootConfig\u003C...>; ... 5 more ...; _output_out: unique symbol; }, string>; ... 12 more ...; s3: CreateRouterInner\u003C...>; }>' is not assignable to type '{ query: inferHandlerFn\u003Cany>; mutation: inferHandlerFn\u003Cany>; subscription: inferHandlerFn\u003Cany>; }'.\r\n Types of property 'query' are incompatible.\r\n Type 'inferHandlerFn\u003C{}>' is not assignable to type 'inferHandlerFn\u003Cany>'.\r\n Types of parameters 'path' and 'path' are incompatible.\r\n Type 'TPath' is not assignable to type 'never'.\r\n Type 'string' is not assignable to type 'never'.ts(2344)\r\n```\r\n\r\nThe instantiation works with a solidjs client app, but not in this one.\r\n\n\n### Link to reproduction\n\nhttps://trpc.io/docs/quickstart#using-your-new-backend-on-the-client\n\n### To reproduce\n\nFollowing the quickstart docs in trpc, specifically the client side:\r\nhttps://trpc.io/docs/quickstart#using-your-new-backend-on-the-client\n\n### Additional information\n\nI am able to ts-ignore it and use it fine, but I am surprised that the quickstart doesn't work for me and that no one else is having this problem. \n\n### ๐จโ๐งโ๐ฆ Contributing\n\n- [ ] ๐โโ๏ธ Yes, I'd be down to file a PR fixing this bug!",[3227],{"name":3207,"color":3208},3658,"bug: Quickstart trpc Client Type Error","2023-02-19T18:01:46Z","https://github.com/trpc/trpc/issues/3658",0.6193446,{"description":3234,"labels":3235,"number":3239,"owner":3179,"repository":3179,"state":3211,"title":3240,"updated_at":3241,"url":3242,"score":3243},"### Provide environment information\r\n\r\n\r\n ```\r\n System:\r\n OS: macOS 13.0.1\r\n CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz\r\n Memory: 923.02 MB / 16.00 GB\r\n Shell: 5.8.1 - /bin/zsh\r\n Binaries:\r\n Node: 16.18.1 - ~/.nvm/versions/node/v16.18.1/bin/node\r\n Yarn: 1.22.17 - /usr/local/bin/yarn\r\n npm: 8.19.2 - ~/.nvm/versions/node/v16.18.1/bin/npm\r\n Browsers:\r\n Chrome: 107.0.5304.110\r\n Safari: 16.1\r\n npmPackages:\r\n @tanstack/react-query: ^4.16.1 => 4.16.1 \r\n @trpc/client: ^10.0.0 => 10.0.0 \r\n @trpc/react-query: ^10.0.0 => 10.0.0 \r\n @trpc/server: ^10.0.0 => 10.0.0 \r\n react: ^17.0.1 => 17.0.2 \r\n typescript: ^4.4.4 => 4.8.4 \r\n```\r\n\r\n### Describe the bug\r\n\r\nWhen using v9 I could wrap multiple mutation methods in a single hook, allowing me to write code like:\r\n\r\n```ts\r\nconst logoutMutation = useUserMutation('logout')\r\nlogoutMutation.mutate()\r\n\r\nconst loginMutation = useUserMutation('login')\r\nloginMutation.mutate('username', 'password')\r\n```\r\nThe types for the argument in mutate were resolved and safe.\r\n\r\nIn v10 I see a type error for the same code as the type of the mutate function appears to be the union of the various user mutation methods, rather than resolved.\r\n\r\n\r\n\r\n### Link to reproduction\r\n\r\nhttps://stackblitz.com/edit/github-szimel\r\n\r\n### To reproduce\r\n\r\nServer:\r\n\r\n```ts\r\nconst userRouter = t.router({\r\n get: publicProcedure.query(async ({ ctx }) => {\r\n return { status: 200, user: ctx.user || publicUser(ctx) };\r\n }),\r\n login: publicProcedure\r\n .input(\r\n z.object({\r\n username: z.string(),\r\n password: z.string(),\r\n })\r\n )\r\n .mutation(async ({ ctx, input }) => {\r\n const response = await loginChecker(ctx.orgId, input.username, input.password);\r\n ctx.res.cookie('token', encrypt({ user: response.user }), {\r\n signed: true,\r\n maxAge: response.maxAge,\r\n domain: ctx.hostname,\r\n httpOnly: true,\r\n secure: process.env.IS_OFFLINE !== 'true',\r\n });\r\n return { status: 200, user: response.user };\r\n }),\r\n logout: publicProcedure.mutation(({ ctx }) => {\r\n ctx.res.clearCookie('token', {\r\n signed: true,\r\n domain: ctx.hostname,\r\n httpOnly: true,\r\n secure: process.env.IS_OFFLINE !== 'true',\r\n });\r\n return { status: 200 };\r\n }),\r\n});\r\n```\r\n\r\nClient hook:\r\n\r\n```ts\r\nexport const useUserMutation = ({\r\n method,\r\n}: {\r\n method: 'login' | 'logout';\r\n}) => {\r\n return trpc.user[method].useMutation();\r\n};\r\n```\r\n\r\nComponent\r\n\r\n```ts\r\nexport const Navigation = () => {\r\n const logoutMutation = useUserMutation({ method: 'logout' });\r\n\r\n const logoutUser = async () => {\r\n await logoutMutation.mutateAsync(undefined);\r\n };\r\n\r\n return \u003CHeader logout={logout}>\r\n}\r\n```\r\n\r\nResults in an error:\r\n\r\n`Argument of type 'undefined' is not assignable to parameter of type '{ username: string; password: string; } & void \r\n`\r\n\r\nv9 code with a hook defined as follows works fine:\r\n\r\n```ts\r\nexport const useUserMutation = ({\r\n method,\r\n}: {\r\n method: 'login' | 'logout';\r\n}) => {\r\n return trpc.useMutation(`user.${method}`);\r\n};\r\n```\r\n\r\n### Additional information\r\n\r\n_No response_\r\n\r\n### ๐จโ๐งโ๐ฆ Contributing\r\n\r\n- [X] ๐โโ๏ธ Yes, I'd be down to file a PR fixing this bug!",[3236],{"name":3237,"color":3238},"wontfix","ffffff",3286,"bug: Custom mutation hook can't resolve type for multiple methods","2022-12-11T18:01:40Z","https://github.com/trpc/trpc/issues/3286",0.6556854,{"description":3245,"labels":3246,"number":3247,"owner":3179,"repository":3179,"state":3211,"title":3248,"updated_at":3249,"url":3250,"score":3251},"### Provide environment information\r\n\r\n```\r\n\r\n System:\r\n OS: macOS 12.5.1\r\n CPU: (8) arm64 Apple M1\r\n Memory: 86.22 MB / 16.00 GB\r\n Shell: 5.8.1 - /bin/zsh\r\n Binaries:\r\n Node: 16.17.0 - ~/.nvm/versions/node/v16.17.0/bin/node\r\n Yarn: 1.22.19 - /opt/homebrew/bin/yarn\r\n npm: 8.19.1 - ~/.nvm/versions/node/v16.17.0/bin/npm\r\n Watchman: 2022.07.04.00 - /opt/homebrew/bin/watchman\r\n Browsers:\r\n Brave Browser: 105.1.43.88\r\n Chrome: 105.0.5195.102\r\n Firefox: 102.0.1\r\n Safari: 16.0\r\n npmPackages:\r\n @trpc/client: ^10.0.0-alpha.48 => 10.0.0-proxy-alpha.76 \r\n @trpc/react: ^10.0.0-alpha.48 => 10.0.0-proxy-alpha.76 \r\n react: 18.0.0 => 18.0.0 \r\n```\r\n\r\n### Describe the bug\r\n\r\nI'm receiving a weird error with latest in React Native with react-query and suspense turned on:\r\n\r\n```\r\n ERROR TypeError: _posts$data.map is not a function. (In '_posts$data.map(function (p) {\r\n return p.name;\r\n })', '_posts$data.map' is undefined)\r\n\r\n```\r\n\r\n\r\n\r\n### To reproduce\r\n\r\nGiven this component:\r\n\r\n```typescript\r\nfunction Something() {\r\n const posts = trpc.posts.all.useQuery();\r\n\r\n return (\r\n \u003CView>\r\n \u003CText>{posts.data?.map(p => p.name).join(\" \")}\u003C/Text>\r\n \u003CText>{posts.error?.toString()}\u003C/Text>\r\n \u003C/View>\r\n )\r\n}\r\n```\r\n\r\nAnd this set up:\r\n\r\n```typescript\r\nexport default function App() {\r\n const [queryClient] = useState(() => new QueryClient({\r\n defaultOptions: {\r\n queries: {\r\n suspense: true\r\n },\r\n }\r\n }))\r\n\r\n const [trpcClient] = useState(() =>\r\n trpc.createClient({\r\n url: 'http://localhost:2022/trpc',\r\n }),\r\n )\r\n\r\n return (\r\n \u003Ctrpc.Provider client={trpcClient} queryClient={queryClient}>\r\n \u003CQueryClientProvider client={queryClient}>\r\n \u003CStatusBar style=\"dark\"/>\r\n \u003CView style={styles.container}>\r\n \u003CText>Open up App.tsx to start working on your app!\u003C/Text>\r\n \u003CRetryLoader>\r\n \u003CSomething/>\r\n \u003C/RetryLoader>\r\n \u003C/View>\r\n \u003C/QueryClientProvider>\r\n \u003C/trpc.Provider>\r\n );\r\n}\r\n```\r\n\r\ntrpc set up like:\r\n\r\n```typescript\r\nimport { createTRPCReact } from '@trpc/react';\r\nimport type {AppRouter} from \"../../gateway/src/router\"\r\n\r\nexport const trpc = createTRPCReact\u003CAppRouter>();\r\n```\r\n\r\nThe server is standard:\r\n\r\n```typescript\r\nimport {t} from './trpc';\r\nimport {postsRouter} from \"../posts/router\"\r\n\r\nexport const appRouter = t.router({\r\n posts: postsRouter\r\n})\r\n\r\nexport type AppRouter = typeof appRouter\r\n```\r\n\r\n\r\n\r\n### Additional information\r\n\r\n_No response_\r\n\r\n### ๐จโ๐งโ๐ฆ Contributing\r\n\r\n- [X] ๐โโ๏ธ Yes, I'd be down to file a PR fixing this bug!",[],2718,"bug: Data seems to be incorrectly defined in latest v10","2022-10-04T00:17:50Z","https://github.com/trpc/trpc/issues/2718",0.6571808,{"description":3253,"labels":3254,"number":3255,"owner":3179,"repository":3179,"state":3211,"title":3256,"updated_at":3257,"url":3258,"score":3259},"### Provide environment information\r\n\r\n``` \r\nSystem:\r\n OS: macOS 12.2.1\r\n CPU: (10) arm64 Apple M1 Max\r\n Memory: 131.52 MB / 32.00 GB\r\n Shell: 3.2.57 - /bin/bash\r\n Binaries:\r\n Node: 18.8.0 - ~/.local/share/nvm/v18.8.0/bin/node\r\n Yarn: 1.22.19 - ~/.local/share/nvm/v18.8.0/bin/yarn\r\n npm: 8.18.0 - ~/.local/share/nvm/v18.8.0/bin/npm\r\n Browsers:\r\n Chrome: 106.0.5249.103\r\n Firefox: 105.0.2\r\n Safari: 15.3\r\n npmPackages:\r\n @trpc/client: ^10.0.0-proxy-beta.17 => 10.0.0-proxy-beta.17\r\n```\r\n\r\n\r\n### Describe the bug\r\n\r\nTypescript can't complete the typing of a query, see discussion https://github.com/trpc/trpc/discussions/2963\r\n\r\n\r\n`Property 'subscribe' does not exist on type 'DecoratedProcedureRecord\u003Cunknown, BuildProcedure\u003C\"subscription\", { _config: RootConfig\u003C{ ctx: {}; meta: {}; errorShape: never; transformer: CombinedDataTransformer; }>; _ctx_out: {}; _input_in: unique symbol; _input_out: unique symbol; _output_in: u\r\n nique symbol; _output_out: unique symbol; _meta: {}; }, Observable\u003C....'.`\r\n\r\n### Link to reproduction\r\n\r\nhttps://github.com/Lilja/trpc-v10-server-needed\r\n\r\n### To reproduce\r\n\r\nOpen up `src/index.ts` and modify the `type {AppRouter}` import, point it to the trpc repo OR a another router.\r\n\r\n### Additional information\r\n\r\n_No response_\r\n\r\n### ๐จโ๐งโ๐ฆ Contributing\r\n\r\n- [ ] ๐โโ๏ธ Yes, I'd be down to file a PR fixing this bug!",[],2972,"bug: @trpc/server needed in the frontend for types to work","2022-10-11T08:18:00Z","https://github.com/trpc/trpc/issues/2972",0.6582977,{"description":3261,"labels":3262,"number":3263,"owner":3179,"repository":3179,"state":3211,"title":3264,"updated_at":3265,"url":3266,"score":3267},"### Provide environment information\n\nSystem:\r\n OS: macOS 12.5.1\r\n CPU: (10) arm64 Apple M1 Max\r\n Memory: 11.72 GB / 64.00 GB\r\n Shell: 5.8.1 - /bin/zsh\r\n Binaries:\r\n Node: 16.15.1 - ~/.nvm/versions/node/v16.15.1/bin/node\r\n npm: 8.11.0 - ~/.nvm/versions/node/v16.15.1/bin/npm\r\n Browsers:\r\n Chrome: 104.0.5112.101\r\n Firefox: 103.0.2\r\n Safari: 15.6.1\n\n### Describe the bug\n\nCannot join routers across files, making organization useless.\r\n\r\nIn the example 'getUsers' only works if it's in the same file.\n\n### To reproduce\n\n**Index**\r\n\r\n```\r\nimport * as trpc from '@trpc/server';\r\nimport { Context } from 'vm';\r\nimport { getUser } from './get-user';\r\n\r\n// Works\r\n// let appRouter = trpc.router();\r\n// .query('getUser', {\r\n// async resolve() {\r\n// const request = (await User.findOne({ where: { id: 'test' } }))!;\r\n// return request;\r\n// },\r\n// });\r\n\r\n// \"Endpoints\", the name is the same as the call but with starting lower case.\r\n// For example CreateUser -> createUser\r\n\r\nconst createRouter = () => {\r\n return trpc.router\u003CContext>();\r\n};\r\n\r\nlet userRouter = createRouter();\r\n\r\n// User\r\ngetUser(userRouter);\r\n\r\nexport const initTrpc = () => {\r\n // Empty init to call the file.\r\n};\r\n\r\nconst appRouter = createRouter();\r\nappRouter.merge(userRouter);\r\n\r\nexport { appRouter };\r\n\r\nexport type AppRouter = typeof appRouter;\r\n```\r\n\r\n**getUsers.ts is broken**\r\n\r\n```\r\nimport { Context } from 'vm';\r\nimport User from '../models/user';\r\nimport * as trpc from '@trpc/server';\r\nimport { Router } from '@trpc/server/dist/declarations/src/router';\r\n\r\nexport const initGetUser = (appRouter) => {\r\n // appRouter.query('getUser', {\r\n // input: z.object({\r\n // id: z.string(),\r\n // }),\r\n // async resolve({ input }) {\r\n // const user = (await User.findOne({ where: { id: input.id } }))!;\r\n // return user;\r\n // },\r\n // });\r\n};\r\n\r\nexport const getUser = (\r\n router: Router\u003CContext, Context, {}, {}, {}, {}, trpc.DefaultErrorShape>,\r\n) => {\r\n return router.query('getUser', {\r\n async resolve() {\r\n const request = (await User.findOne({ where: { id: 'test' } }))!;\r\n return request;\r\n },\r\n });\r\n};\r\n```\r\n\n\n### Additional information\n\n_No response_\n\n### ๐จโ๐งโ๐ฆ Contributing\n\n- [ ] ๐โโ๏ธ Yes, I'd be down to file a PR fixing this bug!",[],2580,"bug: cannot chain query or mutation across files","2022-08-28T20:19:59Z","https://github.com/trpc/trpc/issues/2580",0.658538,["Reactive",3269],{},["Set"],["ShallowReactive",3272],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fV3qqlfZWk-FiH-bshRvt1tg3G69Nu0S7Nw-2QFOIVKo":-1},"/trpc/trpc/3089"]