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
I will create a PR soon, just want to make sure I can TDD this by creating a failed test first. I want to make sure this line change will not affect anything else.
What happened?
A resolver is created when the field of my model has a json tag with
omitempty
, and the value is different than the property name.What did you expect?
No resolver should be created, just use my model as is.
Minimal graphql.schema and models to reproduce
My schema:
My model:
autobind
ingqlgen.yml
file, also need thestruct_tag: json
Here, my json tag has
omitempty
, my property name isDescription
, but the value in the json isnewDesc
My gqlgen.yml file
It is now generating this resolver (that I really don't need):
UPDATE:
For those having the same issue, here is how I fixed it locally at line:
gqlgen/codegen/util.go
Line 42 in 6b8c6ee
versions
go run github.com/99designs/gqlgen version
? v0.17.22-devgo version
? go1.19.3 darwin/arm64The text was updated successfully, but these errors were encountered: