This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
[Feature Request] Remove unmodified stubs with follow-schema #1314
Labels
You can continue the conversation there. Go to discussion →
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/amd64The text was updated successfully, but these errors were encountered: