You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to globally decorate all createdAt fields of *Create*Input models with HideField({input: true}) for testing purposes. Turns out that especially for HideField the arguments are not taken into account. As soon as I change HideField to HideFiel (f.ex.) everything works out as expeced.
schema.prisma
generator nestjsgraphql {
decorate_1_type = "*Create*Input"
decorate_1_field = "createdAt"
decorate_1_name = HideField
decorate_1_from = "@nestjs/graphql"
decorate_1_arguments = "['{input: true}']"
}
model User {
id Int @id @default(autoincrement())
name String
createdAt DateTime @default(now())
}
Output
@InputType()
export class UserCreateInput {
@Field(() => String, {nullable:false})
name!: string;
@HideField()
createdAt?: Date | string;
}
At the moment, my workaround is to decorate each createdAt line separately.
I tried to globally decorate all
createdAt
fields of*Create*Input
models withHideField({input: true})
for testing purposes. Turns out that especially forHideField
the arguments are not taken into account. As soon as I changeHideField
toHideFiel
(f.ex.) everything works out as expeced.schema.prisma
Output
At the moment, my workaround is to decorate each createdAt line separately.
Package Versions
The text was updated successfully, but these errors were encountered: