python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
How can I sanitize / serialize input data with @nestjs/graphql
I'm working on a NestJs app with graphql, and I'm trying to sanitize my resolvers inputs with class-transformer like this :
@InputType()
export class CreateUserInput {
@Field(() => String)
@Tra...
Hbd770
Votes: 0
Answers: 1
class-transformer does not work : Transform function is not called
I try to use class-transformer but i can't do it.
I also use type-graphql and @typegoose/typegoose
Here's my code:
My Decorator
import { Transform } from 'class-transformer';
export function Trim() {...
Samuel Sitruk
Votes: 0
Answers: 1
Exposing a custom getter in a Response DTO does not work
I've tried to define a custom getter like this:
import { Expose } from 'class-transformer';
export class MyDTOResponse {
@Expose()
id: string;
@Expose()
name: string;
@Expose()
get this...
FooBar
Votes: 0
Answers: 1
nestJS with typeorm : @Expose not work when entity nested
In my project,
there are two entities; Profile and Project.
Entity Project has field "collaborators", which is array of Profile. -> code
Entity Profile has two @Expose fields, "nickn...
victory
Votes: 0
Answers: 1