Jamie McHale
Jamie McHale
PPrisma
Created by Jamie McHale on 5/22/2024 in #help-and-questions
Typing custom property on a method
I want to add a custom property to a findMany on a particular model to ensure that the user has access to the returned resources (passing in authorizeUser which has { read: [...ids] } which is used to filter the returned resources. I am following: https://www.prisma.io/docs/orm/prisma-client/client-extensions/type-utilities#add-a-custom-property-to-a-method I have the query set up and working correctly, but am unsure how to add the types for a particular model, rather than the generic $allModels. Can someone point me to an example for a single model?
1 replies