Open Vilsol opened 3 weeks ago
Gotta agree, I don't really understand what the intention behind this change was. My situation isn't as dramatic as in Vilsol's example, I just added some fields to the Resolver
which I probably have to pass by ctx
by now, of with some global variables, or come up with my own RootResolver
and drop the generated one.
But what's the gain of this change? It feels like it only introduces new incompatibilities and a huge complexity for the repos's maintainers to face, but with little benefit. It makes me a bit anxious that more Resolver
changes might come and screw my code beyond recovery.
Edit: After reading the PR and the discussion it seems that there's it's somehow related to resolver.layout=follow-schema
vs resolver.layout=single-file
, but I cannot find any information about what any of these settings mean, and from the PR it reads like the changes only apply for single-file
but not for follow-schema
. single-file
seems to be the default, in opposite to what the documentation suggests. No clue how follow-schema
works though, it doesn't seem to generate any resolver file at all with the documentation's setup.
Yeah i feel you, behaviour altering changes should be behind configuration option usually opt-in
I have hit a major issue due to this undocumented breaking change (https://github.com/99designs/gqlgen/pull/3243), which was introduced in a patch version bump.
This is how the
resolver.go
looked like before on versionv0.17.49
: https://github.com/satisfactorymodding/smr-api/blob/179d26156ff1bfc48119ab24ee8a4740d2a2a18b/gql/resolver.goThis is how it looks like after running the generator on version
v0.17.50
: https://gist.github.com/Vilsol/1d7ac5dabd75933604449e1d6faa3323Is there some config options I can change to make this work with newer versions? Or is my only possible path to not upgrade?