graphql-go-tools icon indicating copy to clipboard operation
graphql-go-tools copied to clipboard

Update gqlgen (and remove packr generate)

Open StevenACoffman opened this issue 10 months ago • 3 comments

I ran a script that found every go.mod file in the repository, updated it to the latest gqlgen (using gomajor which is nice btw), ran go mod tidy, and then did a go generate ./...

Since this turns out to be non-trivial, I am leaving this PR here to track the work in breaking it up into smaller PRs.

  • [x] - ~~It choked on an old packr reference that appears unneeded, so I removed that, but otherwise made this draft PR without even running the tests locally just to see where things are at initially.~~ #1093
  • [ ] - update gqlgen in v2/go.mod
  • [ ] - update gqlgen in examples/federation/go.mod
  • [ ] - update gqlgen in execution/go.mod

One issue is that in 99designs/gqlgen#3507 there were some changes that where made to support @oneOf and @deprecated on input values

For instance, the codegen config and introspection changed https://github.com/99designs/gqlgen/pull/3507/files#diff-a15c78971c63172759db98d59084361fa1aec24b37dd739d2680514021975c76R160

Signed-off-by: Steve Coffman [email protected]

StevenACoffman avatar Feb 24 '25 17:02 StevenACoffman

Ok, it looks like this is non-trivial, so I'm going to split this up into some smaller PRs and do this more incrementally, but I'll leave this PR around for a while to remind me of some of the files that are going to need be affected.

StevenACoffman avatar Feb 25 '25 13:02 StevenACoffman

Hi @StevenACoffman

thanks for the try Latest gqlgen requires some changes in the resolver, as the generated code changed a bit

also, you could remove this line here https://github.com/wundergraph/graphql-go-tools/blob/16602c669d4fcd4c66cf52586d5cbfd6324c2bc9/pkg/astvalidation/reference/main.go#L14

to not produce unnecessary changes

devsergiy avatar Feb 25 '25 18:02 devsergiy

Sure. Thanks for merging that other PR, btw.

StevenACoffman avatar Feb 25 '25 20:02 StevenACoffman