Get types of return value from trpc api call

For some reason in this new project when I get say the type of data I'm passing into useQuery is undefined it's actually expecting what would be the response of the function? Does anyone have any idea why, this works in other projects and I've used this consistently.
Solution:
RouterOutput["discord"]["getUserTeams"]
Jump to solution
5 Replies
Smadger
Smadger12mo ago
If I used a more complex API call it just expects back what would be returned from the API call. Here is an example on a more complex api endpoint.
Neto
Neto12mo ago
You don't need to use ReturnType directly There should be a export on the API folder relates to types
Smadger
Smadger12mo ago
Is there 🤦‍♂️
Solution
chocolatebananarhino
RouterOutput["discord"]["getUserTeams"]
Smadger
Smadger12mo ago
Oh I'm an idiot haha Thanks so much