How to type results that includes relations ?
I have two tables: collections and products. Collection has many products.
I make an api request that gets the response from server.
How can I add typing to fetch api response ?
2 Replies
if you invoke findMany() inside a function, you can infer the ReturnType of the function https://discord.com/channels/1043890932593987624/1112458428070236229/1112519441561956352
Thanks a lot @mcgrealife