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
My resolver returns JSON data using snake case, but my GQL data adheres to the standard camel case format. This forces me to define 2 separate types for each model in order to support the schema for my resolver and GQL client.
What did you expect?
The documentation mentions the use of a gqlgen struct tag to bind tags, but the json tag appears to override this feature. Basically, I expected the ability to define one model to support data in (json) and data out (gqlgen).
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
What happened?
My resolver returns JSON data using snake case, but my GQL data adheres to the standard camel case format. This forces me to define 2 separate types for each model in order to support the schema for my resolver and GQL client.
What did you expect?
The documentation mentions the use of a
gqlgen
struct tag to bind tags, but thejson
tag appears to override this feature. Basically, I expected the ability to define one model to support data in (json) and data out (gqlgen).expected models.go
Minimal graphql.schema and models to reproduce
schema.graphql
models.go
Versions
gqlgen version
? v0.9.1go version
? go version go1.12.5 darwin/amd64The text was updated successfully, but these errors were encountered: