From ba28d61a61b57ba1ac8345ca7e2afb5d5ff2ac51 Mon Sep 17 00:00:00 2001 From: Nils-Odd Solberg <33060326+nilsodd@users.noreply.github.com> Date: Mon, 14 Nov 2022 13:47:40 +0100 Subject: [PATCH] Treat datetime as dateTime (#5) --- common/types/graphql_types.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/types/graphql_types.go b/common/types/graphql_types.go index 98335be..caa2ca0 100644 --- a/common/types/graphql_types.go +++ b/common/types/graphql_types.go @@ -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", @@ -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 }