Replies: 2 comments 1 reply
-
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. |
Beta Was this translation helpful? Give feedback.
0 replies
-
This isn't implemented. It is just a convenience feature when prototyping and designing the API. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What happened?
When working with the
layout: follow-schema
option turned on, if I get over eager about running gqlgen, and add a new field name,gqlgen
, rename it, andgqlgen
again, I get stubs added for each name it has ever had added to the end of the file under the!!! WARNING !!!
section.It is a minor inconvenience to have to remove those resolver stubs manually.
What did you expect?
The unimplemented resolvers are detected as such and removed.
I'd think that the resolver generator checks for method bodies that contain
panic("not implemented")
orpanic(fmt.Errorf("not implemented"))
after trimming whitespace. (The first one is what and older version of the generator produced.) If the body contains only that string, it is ignored after it reads the source code and will be regenerated if it's still in the schema, and removed it it's not. That would have a side effect of "updating" the stubs using the old string.versions
gqlgen version
? v0.11.3go version
? go version go1.15 linux/amd64Beta Was this translation helpful? Give feedback.
All reactions