From 47015f12e3aa26af251fec67eab50d3388c17efe Mon Sep 17 00:00:00 2001 From: Cliff Tawiah Date: Tue, 4 Jan 2022 20:10:18 -0600 Subject: [PATCH] Added pointer to a solution for `no Go files` err (#1747) 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. --- docs/content/getting-started.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/content/getting-started.md b/docs/content/getting-started.md index cea5c11f17..bb66277199 100644 --- a/docs/content/getting-started.md +++ b/docs/content/getting-started.md @@ -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) {