prisma-nestjs-graphql
prisma-nestjs-graphql copied to clipboard
Unsupported Prisma Fields Break Input Generation
Given a Prisma definition with an 'Unsupported' field, like this
model Feature {
/// @Validator.IsUUID()
/// @HideField({ match: 'Feature@(Create|Update)*Input' })
id String @id @unique @default(dbgenerated("gen_random_uuid()")) @db.Uuid
geometry Unsupported("geometry(Polygon, 4326)") @map("geometry")
/// @Validator.IsString()
name String
}
All of the create and update input files will not be generated.
If the Unsupported field is commented out, the create and update files are created.
I would expect adding the HideField annotation to fix the problem:
model Feature {
/// @Validator.IsUUID()
/// @HideField({ match: 'Feature@(Create|Update)*Input' })
id String @id @unique @default(dbgenerated("gen_random_uuid()")) @db.Uuid
/// @HideField({ input: true, output: true })
geometry Unsupported("geometry(Polygon, 4326)") @map("geometry")
/// @Validator.IsString()
name String
}
However, the create and update input types are still not generated.
It would be great to either ignore Unsupported fields by default during generation or respect the @HideField annotation for them.