Hello. Are these docs current? <https://www.prisma...
# orm-help
Here's the schema. I'm just trying to get a generated type of
RuleSet
with
rules
on it
r
@Dallas Slieker đŸ‘‹ Yes they are correct. You need to pass what you require like this:
Copy code
Prisma.RuleSetGetPayload<{
  include: { rule: true }
}>
d
@Ryan Thank you. it appears the documentation is different?
Copy code
import { 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 }
})
Aha!
type RuleSetWithRules = Prisma.RuleSetGetPayload<{ include: { rules: true } }>;
This works. Am I missing something, or are the docs misleading?
r
Yeah that’s what I sent you.
d
@Ryan Yes, thank you. I am speaking now about the documentation. It does not have the code you sent me in it, and the code that is in the documentation does not seem to work. I am suggesting that maybe the documentation be updated with the code you provided.