createTRPCNext Type Error + useQuery Not Defined
I'm trying to use the conventions for
createTRPCNext
from https://github.com/trpc/examples-next-prisma-starter after converting a large legacy router a la the v9 -> v10 migration guide, however I keep getting a large type error on config({ ctx }): is not assignable to type '(info: { ctx?: NextPageContext | undefined; }) => WithTRPCConfig<Router<...
Additionally, querying with old query syntax gets me this error message, and my apppages error out with a 404. The useQuery error: Property 'useQuery' does not exist on type 'CreateTRPCNextBase
In my pages/_app
I am doing export default trpc.withTRPC(MyApp);
, where trpc
is the type error-throwing export const trpc = createTRPCNext
I must be missing something while following this chain to createTRPCNext.
Have tried different TRPC versions, am on 10.29.1 now for all packagesGitHub
GitHub - trpc/examples-next-prisma-starter: 🚀 tRPC starter repo wit...
🚀 tRPC starter repo with E2E-testing. Contribute to trpc/examples-next-prisma-starter development by creating an account on GitHub.
1 Reply
The issue was that I was using the old trpc 9 useQuery syntax rather than the new trpc 10 syntax