unlight / prisma-graphql-type-decimal

GraphQL type for Prisma's Decimal scalar, wrapper around decimal.js
17 stars 0 forks source link

Getting empty Decimal property #9

Closed uncleDimasik closed 6 days ago

uncleDimasik commented 1 year ago

It's not an issue!!! Just a tip. If you use this package with "prisma-nestjs-graphql" codegen and "class-validator", add the "transform: true" option to the validation configuration.

my nestjs example

  app.useGlobalPipes(
    new ValidationPipe({
      enableDebugMessages: isDevelopment,
      skipUndefinedProperties: true,
      transform: true, // !!! important
    }),
  );

P.S. I lost 5 hours on this

unlight commented 6 days ago

It`s enabled by default.