You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The resolver interface types that get generated and the functions to get those resolvers from the ResolverRoot don't follow the standard Go conventions on capitalization, even though these appear to get followed for the generated field names within model structs. This causes issues with linters such as revive since they'll trip the naming convention rules on the files that have the resolver implementations.
On a similar note, this also happens for generated model names, but that's less of an issue since they live within a generated file which linters are able to detect easily so they don't trip the rules.
What did you expect?
All generated types and names are capitalized consistently.
What happened?
Somewhat related to #1383.
The resolver interface types that get generated and the functions to get those resolvers from the
ResolverRoot
don't follow the standard Go conventions on capitalization, even though these appear to get followed for the generated field names within model structs. This causes issues with linters such asrevive
since they'll trip the naming convention rules on the files that have the resolver implementations.On a similar note, this also happens for generated model names, but that's less of an issue since they live within a generated file which linters are able to detect easily so they don't trip the rules.
What did you expect?
All generated types and names are capitalized consistently.
Minimal graphql.schema and models to reproduce
GraphQL schema:
Config:
Generated resolver.go:
Note the capitalization differences for "vm":
versions
go run github.com/99designs/gqlgen version
?v0.17.20
go version
?go version go1.19 linux/amd64
The text was updated successfully, but these errors were encountered: