Ibrahim
06/20/2021, 10:40 PM// schema
model User {
id Int @id @default(autoincrement())
facebookId String? @unique
googleId String? @unique
profileURL String?
}
//desired type generated on the client
export type User = {
id: number
facebookId?: string | null
googleId?: string | null
profileURL?: string | null
}
// what is really generated
export type User = {
id: number
facebookId: string | null
googleId: string | null
profileURL: string | null
}
Eric Martinez
06/21/2021, 3:31 AMRyan
06/22/2021, 6:27 AMnull
and never undefined
. There will always be a value or it would be null as per the database constraints so what you want it not possible.