-
-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
Given this schema:
model Session {
id String @id
expiresAt DateTime
token String
createdAt DateTime
updatedAt DateTime
ipAddress String?
userAgent String?
userId String
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
activeOrganizationId String?
@@schema('auth')
@@unique([token])
@@auth
}I would like to be able to set the user of the @@auth model as such:
const client = zenstackClientWithPolicies.$setAuth({
...session,
user: { ... }, // <--- Type Error: user property doesn't not exist
})If I recall, this was possible in V2:
enhance(prisma, {
user: {
...session,
user,
},
}),Relevant discord discussion: https://discord.com/channels/1035538056146595961/1440320890142326926
Metadata
Metadata
Assignees
Labels
No labels