79738870

Date: 2025-08-18 14:30:28
Score: 0.5
Natty:
Report link

The real configuration is to set up ? for your args but also add nullable: false (FALSE, NOT TRUE) in order to get your arg to be string or undefined but NOT null.

import { Args, ID } from "@nestjs/graphql";

// ...
@Args("id", { type: () => ID, nullable: false }) id?: string; // type: string | undefined.
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Hugo Bayoud