-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
gqlgen incorrectly extracts module name from go.mod #2298
Comments
Can you PR please? |
mobiletoly
added a commit
to mobiletoly/gqlgen
that referenced
this issue
Jul 21, 2022
1 task
Sure. Done: |
Sorry for the inconvenience, but Thanks so much for the PR! |
StevenACoffman
pushed a commit
that referenced
this issue
Jul 21, 2022
Closed by #2299. |
thank you for such a great tool (gqlgen), really helps me a lot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Costed me few hours today.
I was building a template (example) project for my team, so they could copy it, replace module name to what they need, fix few imports and run it.
While I was building it I was running
go run github.com/99designs/gqlgen generate --verbose --config ./graph/gqlgen.yml
to generate code from my schema and was getting this error:I was really puzzled where this "name" comes from in front of "internal/...". Ended up being that first few lines in my go.mod were
so looks like gqlgen saw the word "module" and word "name" in comment and thought that "name" is actually a module name. I guess fix could be to ignore first lines if they are comments. Luckily go.mod syntax supports only
//
style comments, so no parsing of/* ... */
is needed.The text was updated successfully, but these errors were encountered: