Category "class-transformer"

using validation pipe in nestjs gives me an classTransformer.plainToclass is not a function error

i am using nestjs/graphql, and i made a dto for a graphql mutation where i used class-validator options like @IsString() and @IsBoolean(). for this i installed

class validator not working with class transformer's type function

class Product { @Min(0, { message: 'should be positive number' }) @IsNotEmpty({ message: 'should not be empty' }) @Type(() => Number) price: number;

How to have class-transform converting properly the _id of a mongoDb class?

I've the following mongoDb class: @Schema() export class Poker { @Transform(({ value }) => value.toString()) _id: ObjectId; @Prop() title: string;