Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Deprecate gqlgen Binary #415
Currently we ship a binary with gqlgen, but increasingly we're running into several issues with it:
We're attempting to address the getting started issues at the moment with documentation, but we'd also like to make this code change at the same time. So starting from the next release out recommendation will be that you integrate gqlgen into your project by calling a new method in the
This approach isn't set in stone yet, and I'm open to any other suggestions people might have. We've already seen a few projects do something similar, calling into the
referenced this issue
Nov 6, 2018
Can't agree enough. I hacked my way into this approach by copy/pasting internal code from gqlgen (see https://github.com/MichaelMure/git-bug/blob/master/graphql/gen_graphql.go), it works really well, no risk of version mismatch and go dep will vendor anything that might be required.
That said, why the
We want to make sure there are no breaking changes here, so once someone copies the stub in they should only need to change it again if they want to add a plugin.
Secondly, we need to expose at least two commands, init and generate. Maybe we can package up init separately or get users to write a second entry point but it's additional work, and more surface area makes forward compatibility harder.
We also thought about changing the root package, but it would be a breaking change for everyone currently using gqlgen.
We should still make programmatic access to codegen a little cleaner, but we are focusing on improving the bootstrapping process which currently generates a few recurring issues (and probably causes some level of abandonment too)
@emil-nasso nice job, that will get you across the line currently. The main issue you might eventually run into with your approach is that we may remove the
#416 has a new getting started document that also works without