-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
package github.com/99designs/gqlgen: no Go files in #800
Comments
go run behaves a bit weird in vendor mode, I wrote gorunpkg to work around this behaviour. I haven't updated it to packages yet but if your still vendoring it might just work? We ended up moving away from it in the getting started guide in favour of a local binary entry point. |
I've tried install Unfortunately I still get the same error:
I've opened an issue on the Go repo golang/go#33240 to see what they recommend. As this isn't an issue with the gqlgen package I'm happy for you to close this issue :) |
i've been using gohack, not sure if it would work for you |
So just thought I'd come back and post the solution to this. Based on information from golang/go#29516 what we can is the following: Create a
See here how we use That's because What Then inside the
This will then have |
As a workaround I did |
jesus no matter what i do none of this solutions works for me, i'm already feeling dumb. |
@leandroruel just follow this tutorial https://gqlgen.com/getting-started/ |
thanks @khanakia now i fixed it. \o/ |
@leandroruel how exactly did you fix this ? Can you leave some information here so it will be helpful for other users in case they face the same issue in future. |
HERE's THE SOLUTION: create a new file called
now run this commands
OR you can used the command as generator by placing this code in your main.go
after that you can simply run |
I'm running into the same issue here. After trying the solution, I'm getting the following error:
My go.mod is showing gqlgen version |
@renxinhe executing |
What happened?
When running
go mod vendor
and then adding//go:generate go run -mod=vendor github.com/99designs/gqlgen
to the top of myresolver.go
file when I try and rungo generate -mod=vendor ./...
I get the following errorWhat did you expect?
I expected the
go generate -mod=vendor ./...
to re-generate the gql generated files.Minimal graphql.schema and models to reproduce
versions
gqlgen version
? v0.9.1go version
? go version go1.12.6 darwin/amd64Unsure if this is an error on my end. But because I vendor all my dependancies when running any Go commands I add the
-mod=vendor
flag[1] to every command so that Go using the dependancies inside the vendor folder rather than the cache/downloading them.[1] - https://github.com/golang/go/wiki/Modules#how-do-i-use-vendoring-with-modules-is-vendoring-going-away
The text was updated successfully, but these errors were encountered: