A way to get return type of api endpoint
If I have a query or mutation, is there a way to get the resolved return type from the method?
for example, I have a query called
api.plans.queries.getExamplePlans
, but in my react application I want the type of what this returns.2 Replies
i think this is how you do it https://discord.com/channels/1019350475847499849/1019350478817079338/1190595293553627197 (let us know if that doesn't work)
You can use
FunctionReturnType<typeof api.foo.bla>
(adding it to docs now)