prisma-nestjs-graphql
prisma-nestjs-graphql copied to clipboard
Required `id` field in `UpdateInput`?
trafficstars
Is it possible to make the id field required for all UpdateInput classes?
@InputType()
export class UserUpdateInput {
- @Field(() => String, { nullable: true })
- id?: string
+ @Field(() => String, { nullable: false })
+ id!: string
@Field(() => String, {nullable:true})
name?: string;
@Field(() => String, {nullable:true})
email?: string;
}
By doing some configuration - no possible, data for fields is coming from Prisma. All fields are optional in *UpdateInput types.