Help with inferring output

return ctx.prisma.product.findMany({
include: {
price: {
select: {
contractor: group === "CONTRACTOR",
customer: group === "CUSTOMER",
frequent: group === "FREQUENT",
professional: group === "PROFESSIONAL",
vip: group === "VIP",
visitor: group === "VISITOR",
},
},
},
});
return ctx.prisma.product.findMany({
include: {
price: {
select: {
contractor: group === "CONTRACTOR",
customer: group === "CUSTOMER",
frequent: group === "FREQUENT",
professional: group === "PROFESSIONAL",
vip: group === "VIP",
visitor: group === "VISITOR",
},
},
},
});
I have the following return and I want to infer the types of a single item, before I added the include bit the code worked, but now it gives me an error, how to set it up correctly? https://cdn.discordapp.com/attachments/1169329995487903764/1169329995668279377/image.png?ex=6555026c&is=65428d6c&hm=c861edd451db38375639458bda8d1aaec91421b2c98d364c603b70ef144affe4& https://cdn.discordapp.com/attachments/1169329995487903764/1169330155123114256/image.png?ex=65550292&is=65428d92&hm=06fb15ab6a5a357593f0c51d51358015e45432c031ceec672430f131daf5ef83&
0 Replies
No replies yetBe the first to reply to this messageJoin