soniq
soniq copied to clipboard
Feature Request: Automatically detect column types from reflections
Package
- db
Description / Use Case for a Feature
Currently, one has to define the type for postgres, graphql and typescript explicitly like @Column({ type: "integer", gqlType: "Int" }) public count: number;
.
Basic types like, number
string
boolean
or any
might be detected automatically using reflections and the postgres and graphql types will be set respectively. In contrasts, if the types do not match up, e.g. @Column({ type: "boolean", gqlType: "Int" }) public name: string;
,, warnings or errors can be logged or thrown.