Nullability


All types, including user-made ones, will have a .nullable property, which will make a type nullable both at runtime for GraphQL and compile time for TypeScript. For example:

TypeScriptGraphQL
t.string.nullablestring \| null \| undefinedString
t.float.nullablenumber \| null \| undefinedFloat
t.int.nullablenumber \| null \| undefinedInt
t.id.nullablestring \| number \| null \| undefinedID
t.boolean.nullableboolean \| null \| undefinedBoolean
Edit on GitHub