tRPCttRPC
Powered by
SimonS
tRPC•3y ago•
4 replies
Simon

v10, passing useQuery options, queryKey mandatory?

I have a simple query like this
  const me = api.user.me.useQuery(undefined, {
    enabled: true,
  })
  const me = api.user.me.useQuery(undefined, {
    enabled: true,
  })

which results in an error
Property 'queryKey' is missing in type ...
Property 'queryKey' is missing in type ...
. So I have to pass the queryKey eventho it should be automatically generated?
Solution
hm, anyways it seems to work now, maybe a restart of VS code. I will close as solved
Jump to solution
tRPCJoin
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

What is the substitution for queryKey in useQuery?
KamilKKamil / ❓-help
13mo ago