Skip to content

Commit

Permalink
Treat datetime as dateTime (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsodd authored Nov 14, 2022
1 parent 617afb5 commit ba28d61
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions common/types/graphql_types.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package types

import "strings"

var GRAPHQL_TYPE_MAP = map[string]string{
"string": "String",
"boolean": "Boolean",
"date": "Date",
"dateTime": "Date",
"datetime": "Date",
"float": "Float",
"double": "Double",
"long": "Long",
Expand All @@ -16,7 +18,7 @@ func GetGraphQlType(att *Attribute) string {

result := att.Type

value, ok := GRAPHQL_TYPE_MAP[att.Type]
value, ok := GRAPHQL_TYPE_MAP[strings.ToLower(att.Type)]
if ok {
result = value
}
Expand Down

0 comments on commit ba28d61

Please sign in to comment.