SimonS
tRPC2y 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,
  })

which results in an error 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
Was this page helpful?