Skip to content
Permalink
Browse files

fix(db-types): add additional db types (#192)

  • Loading branch information
goldcaddy77 committed Aug 14, 2019
1 parent 35348d3 commit 8b37e2bedc35e4ce469f4743de3a3602d1add2f7
Showing with 11 additions and 7 deletions.
  1. +11 −7 src/schema/TypeORMConverter.ts
@@ -54,19 +54,22 @@ export function columnToGraphQLType(column: ColumnMetadata): GraphQLScalarType |
const type = (column.type as any).name ? (column.type as any).name : column.type;

switch (type) {
// case String:
// TODO: clean up unused types (String and 'String')
case String:
case 'String':
case 'varchar':
case 'text':
case 'uuid':
return GraphQLString;
// case Boolean:
// case 'Boolean':
// TODO: clean up unused types (Boolean and 'Boolean')
case Boolean:
case 'Boolean':
case 'boolean':
case 'bool':
return GraphQLBoolean;
// case Number:
// case 'Number':
// TODO: clean up unused types (Number and 'Number')
case Number:
case 'Number':
case 'float':
case 'float4':
case 'float8':
@@ -89,8 +92,9 @@ export function columnToGraphQLType(column: ColumnMetadata): GraphQLScalarType |
case 'int4':
case 'int8':
return GraphQLInt;
// case Date:
// case 'Date':
// TODO: clean up unused types (Date and 'Date')
case Date:
case 'Date':
case 'timestamp':
case 'datetime':
return GraphQLISODateTime;

0 comments on commit 8b37e2b

Please sign in to comment.
You can’t perform that action at this time.