Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add instructions for enabling autobinding #2079

Merged
merged 1 commit into from
Apr 5, 2022

Conversation

jpwilliams
Copy link
Contributor

The Getting Started guide doesn't mention that you need to enable autobinding to follow the final steps.

The gqlgen.yml file generated using the init command has autobinding disabled by default instead of enabled as the docs previously stated.

This tiny PR adjusts the guide to address this point.

I have:

  • Added tests covering the bug / feature (see testing)
  • Updated any relevant documentation (see docs)

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.05%) to 74.446% when pulling c2ff419 on jpwilliams:patch-1 into 1324c3f on 99designs:master.

@StevenACoffman
Copy link
Collaborator

So... the difficulty here is that if you have previously generated no models, then there will be an error when you run gqlgen with autobind enabled since it won't be able to bind to those nonexistant models. That's why we disabled autobind for when people run init. Can you carefully verify that these updated directions work without any issue when you start completely fresh?

@jpwilliams
Copy link
Contributor Author

jpwilliams commented Apr 2, 2022

@StevenACoffman Mm I suppose that could cause some problems if someone were to skip around the Getting Started guide rather than following every step. We could add a short note about when to enable autobinding (i.e. enable it if you've done the above step of creating a graph/model/todo.go file, otherwise don't)?

Have just tested again with a fresh repo following the adjusted Getting Started guide - works as expected.

@StevenACoffman
Copy link
Collaborator

StevenACoffman commented Apr 5, 2022

Ok, I'm going to merge this as is, but if we start to get a lot of problems, then we can add a note. Thanks!

@StevenACoffman StevenACoffman merged commit f0fdb11 into 99designs:master Apr 5, 2022
@jpwilliams jpwilliams deleted the patch-1 branch April 5, 2022 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants