Skip to content

Commit

Permalink
Merge pull request #66 from web-ridge/fix/id-bug
Browse files Browse the repository at this point in the history
remove lowercasing of name
  • Loading branch information
arjendevos authored Nov 25, 2022
2 parents ba0d775 + ca6d2bc commit 66ad9b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sqlboiler_graphql_schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -713,14 +713,14 @@ func toGraphQLName(fieldName string) string {
}

func toGraphQLType(boilerField *BoilerField) string {
lowerFieldName := strings.ToLower(boilerField.Name)
// lowerFieldName := strings.ToLower(boilerField.Name)
lowerBoilerType := strings.ToLower(boilerField.Type)

if boilerField.IsEnum {
return boilerField.Enum.Name
}

if strings.HasSuffix(lowerFieldName, "id") {
if strings.HasSuffix(boilerField.Name, "ID") {
return "ID"
}
if strings.Contains(lowerBoilerType, "string") {
Expand Down

0 comments on commit 66ad9b9

Please sign in to comment.