soniq icon indicating copy to clipboard operation
soniq copied to clipboard

Feature Request: Automatically detect column types from reflections

Open davidsparkles opened this issue 5 years ago • 0 comments

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.

davidsparkles avatar Jul 23 '19 09:07 davidsparkles