bill92
conditional useQuery without input
How to use the enabled option for useQuery that doesn't has an input?
I'm passing undefined and TS is not complaining, only on runtime I get
app-index.js:33 Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: [["iam","logout"],{"type":"query"}]
How to properly use this feature?6 replies
Error calling middleware
I'm getting an error trying to test out some pretty basic middleware. This is my code
Getting
TypeError: Cannot read properties of undefined (reading 'use')
I'm following the documentation [https://trpc.io/docs/server/middlewares] and I'm using @trpc/server@next3 replies