Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Zod] Field with auth() in @default() should be generated as optional in zod schemas #1265

Closed
ymc9 opened this issue Apr 17, 2024 · 1 comment
Milestone

Comments

@ymc9
Copy link
Member

ymc9 commented Apr 17, 2024

model User {
    id String @id @default(uuid())
    posts Post[]              
    @@allow('all', true)
}

model Post {
    id String @id @default(uuid())
    title String @default('xyz')
    userId String @default(auth().id)
    user User @relation(fields: [userId], references: [id])
    @@allow('all', true)
}
@ymc9
Copy link
Member Author

ymc9 commented Apr 26, 2024

Fixed in v2.0.0

@ymc9 ymc9 closed this as completed Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant