Closed ccpacillos closed 5 years ago
My current workaround for this is I enabled strictNulls
option by setting it to true
, and then in my entities, I defined my properties as property!: string | null
. (I needed to add !
to avoid "no initializer" error from typescript)
Just putting this into record in case someone else encounters this problem. Closing this issue for now.
I'm using TypeORM and in my entities, I got properties which are defined as
property?: string | null
so its type isstring | null | undefined
. This creates conflicts with the types I get from the generated types of nullable properties from my graphql schema.Maybe we can add an option to define nullable properties to
property?: string | null
instead of the normalproperty?: string
.