Dallas Slieker
04/13/2021, 3:43 PMDallas Slieker
04/13/2021, 3:44 PMRuleSet with rules on itRyan
04/13/2021, 4:25 PMPrisma.RuleSetGetPayload<{
include: { rule: true }
}>Dallas Slieker
04/13/2021, 8:26 PMimport { Prisma } from '@prisma/client'
// Define a type that includes the relation to `Post`
const userWithPosts = Prisma.validator<Prisma.UserGetPayload>()({
include: { posts: true }
})
// Define a type that only contains a subset of the scalar fields
const userPersonalData = Prisma.validator<Prisma.UserGetPayload>()({
select: { email: true; name: true }
})Dallas Slieker
04/13/2021, 9:06 PMtype RuleSetWithRules = Prisma.RuleSetGetPayload<{ include: { rules: true } }>;
This works. Am I missing something, or are the docs misleading?Ryan
04/14/2021, 7:09 AMDallas Slieker
04/15/2021, 6:43 PM