Skip to content

Commit

Permalink
Added pointer to a solution for no Go files err (#1747)
Browse files Browse the repository at this point in the history
While following the instructions in this getting started guide I run into this error `package github.com/99designs/gqlgen: no Go files` which was pretty annoying to fix. Its a golang issue but for people who are unfamiliar with how the `go generate` command works in vendored projects its a blocker trying to follow the rest of this guide. It will be really nice to at least have a pointer in the guide for people to find a possible solution to the issue while going through the guide. I'm sure many folks have run into this issue given vendoring is now very popular with the latest go releases.
  • Loading branch information
aircliff committed Jan 5, 2022
1 parent 27a2b21 commit 47015f1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/content/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ type Todo struct {
And run `go run github.com/99designs/gqlgen generate`.

>
> If you run into this error `package github.com/99designs/gqlgen: no Go files` while executing the `generate` command above, follow the instructions in [this](https://github.com/99designs/gqlgen/issues/800#issuecomment-888908950) comment for a possible solution.
Now if we look in `graph/schema.resolvers.go` we can see a new resolver, lets implement it and fix `CreateTodo`.
```go
func (r *mutationResolver) CreateTodo(ctx context.Context, input model.NewTodo) (*model.Todo, error) {
Expand Down

0 comments on commit 47015f1

Please sign in to comment.