Adds support for go modules outside of GOPATH #548
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #547
I have:
The 'Getting Started' guide needed a few touch-ups to remove 'dep' and use 'go mod'
If you follow the steps in the Getting Started guide, or the Steps to Reproduce listed in #547, be aware that you will need to add the following command after running
go mod init
Otherwise
go mod
will pull in the latest release of gqlgen that doesn't have the fix! Once this PR is merged and released, that extra step should no longer be necessary.Also I added a line to 'Getting Started' to
mkdir server
. If that directory did not exist, the generator would panic. I fixed it in the documentation because I wasn't sure if that was the desired behavior or if the template system should be creating the directory if it doesn't exist.