Skip to content
This repository was archived by the owner on Dec 3, 2020. It is now read-only.

Commit 34d42df

Browse files
1 parent 96a5079 commit 34d42df

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

main.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -755,13 +755,14 @@ func toGraphQLName(fieldName string) string {
755755
func toGraphQLType(fieldName, boilerType string) string {
756756
lowerFieldName := strings.ToLower(fieldName)
757757
lowerBoilerType := strings.ToLower(boilerType)
758+
759+
if strings.HasSuffix(lowerFieldName, "id") {
760+
return "ID"
761+
}
758762
if strings.Contains(lowerBoilerType, "string") {
759763
return "String"
760764
}
761765
if strings.Contains(lowerBoilerType, "int") {
762-
if strings.HasSuffix(lowerFieldName, "id") {
763-
return "ID"
764-
}
765766
return "Int"
766767
}
767768
if strings.Contains(lowerBoilerType, "decimal") || strings.Contains(lowerBoilerType, "float") {

0 commit comments

Comments
 (0)