T
tRPC

❓-help

Getting type error in v11 when trying to instantiate createTRPCQueryUtils

Ccharliephan1/9/2024
Type 'CreateTRPCReactBase<CreateRouterInner<RootConfig<{ ctx: object; meta: object; errorShape: DefaultErrorShape; transformer: DefaultDataTransformer; }>, { allProjects: QueryProcedure<...>; project: QueryProcedure<...>; }>, unknown> & DecoratedProcedureRecord<...>' is not assignable to type '"The property 'query' in your router collides with a built-in method, rename this router or procedure on your backend." | "The property 'mutation' in your router collides with a built-in method, rename this router or procedure on your backend." | ... 6 more ... | TRPCUntypedClient<...>'.ts(2322)
createUtilityFunctions.d.ts(10, 5): The expected type comes from property 'client' which is declared here on type 'CreateQueryUtilsOptions<AnyRouter>'
Type 'CreateTRPCReactBase<CreateRouterInner<RootConfig<{ ctx: object; meta: object; errorShape: DefaultErrorShape; transformer: DefaultDataTransformer; }>, { allProjects: QueryProcedure<...>; project: QueryProcedure<...>; }>, unknown> & DecoratedProcedureRecord<...>' is not assignable to type '"The property 'query' in your router collides with a built-in method, rename this router or procedure on your backend." | "The property 'mutation' in your router collides with a built-in method, rename this router or procedure on your backend." | ... 6 more ... | TRPCUntypedClient<...>'.ts(2322)
createUtilityFunctions.d.ts(10, 5): The expected type comes from property 'client' which is declared here on type 'CreateQueryUtilsOptions<AnyRouter>'
No description
No description
SSebasPtsch1/9/2024
You need to call trpc.createClient and then put the result into the function

Looking for more? Join the community!