tRPCttRPC
Powered by
RuleR
tRPC•2y ago•
1 reply
Rule

Error using createTRPCQueryUtils

Here is my code.
const trpc = createTRPCReact<TRPCRouter>();
const queryClient = new QueryClient();
const trpcQueryUtils = createTRPCQueryUtils({ queryClient, client: trpc });
const trpc = createTRPCReact<TRPCRouter>();
const queryClient = new QueryClient();
const trpcQueryUtils = createTRPCQueryUtils({ queryClient, client: trpc });

The line three is giving me this error when hovering on
client
client


createUtilityFunctions.d.ts(10, 5): The expected type comes from property 'client' which is declared here on type 'CreateQueryUtilsOptions<AnyRouter>'

The property 'links' in your router collides with a built-in method, rename this router or procedure on your backend." | "The property 'query' in your router collides with a built-in method, rename this router or procedure on your backend.'.
createUtilityFunctions.d.ts(10, 5): The expected type comes from property 'client' which is declared here on type 'CreateQueryUtilsOptions<AnyRouter>'

The property 'links' in your router collides with a built-in method, rename this router or procedure on your backend." | "The property 'query' in your router collides with a built-in method, rename this router or procedure on your backend.'.
tRPCJoin
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Getting type error in v11 when trying to instantiate createTRPCQueryUtils
charliephanCcharliephan / ❓-help
3y ago
Can't access mutate utils by createTRPCQueryUtils
Jay_OhhhJJay_Ohhh / ❓-help
2y ago
Canary useUtils and createTRPCQueryUtils type not callable
SebasPtschSSebasPtsch / ❓-help
3y ago
Error with v11 when using batching
ElvenEElven / ❓-help
2y ago