tRPC v11 with Tanstack React Query - queryOptions/mutationOptions methods missing
I'm migrating to the new Tanstack React Query integration for tRPC v11 in a Next.js 15 monorepo, but the
methods are not available on my tRPC utilities.
Setup:
- Next.js 15.3.5 with App Router
- tRPC v11.4.3
- @tanstack/react-query v5.79.0
- pnpm workspace monorepo
Issue:
The procedures are being typed as
procedures without
Has anyone encountered similar type inference issues across package boundaries in monorepos?
I've been trying to get a reproduction repo setup and this one is pretty close https://github.com/lassiter/tanstack-trpc-issue
queryOptions and mutationOptionsmethods are not available on my tRPC utilities.
Setup:
- Next.js 15.3.5 with App Router
- tRPC v11.4.3
- @tanstack/react-query v5.79.0
- pnpm workspace monorepo
Issue:
The procedures are being typed as
any due to a TypeScript portability issue with Supabase types in our shared package. When I exportprocedures without
as any, the build fails with Supabase cookie type mismatches.Has anyone encountered similar type inference issues across package boundaries in monorepos?
I've been trying to get a reproduction repo setup and this one is pretty close https://github.com/lassiter/tanstack-trpc-issue
GitHub
Contribute to lassiter/tanstack-trpc-issue development by creating an account on GitHub.