Chris Tsongas
05/19/2022, 9:31 PMfullName column similar to this post https://github.com/prisma/prisma/discussions/8891 with the following Prisma schema (abbreviated here for clarity):
model Employee {
id String @id @default(uuid()) @db.Uuid
firstName String
preferredFirstName String?
lastName String
fullName String?
}
I have a trigger that computes the full name based on the required first name, optional preferred first name, and required last name, so there will ALWAYS be a full name value. Trouble is, if I make fullName not null, then Prisma requires it to be passed in, which I don't want to do. If I make fullName nullable as shown above, then I can't make it required in my GraphQL schema because Prisma says it could be null, which is inaccurate because the trigger always gives it a value. Any ideas?Nurul
05/24/2022, 2:35 PMChris Tsongas
05/25/2022, 4:20 PM