Skip to content

package github.com/99designs/gqlgen: no Go files in #800

Description

@coderste

What happened?

When running go mod vendor and then adding //go:generate go run -mod=vendor github.com/99designs/gqlgen to the top of my resolver.go file when I try and run go generate -mod=vendor ./... I get the following error

package github.com/99designs/gqlgen: no Go files in /Users/shi03/code/projects/gs/common-api/vendor/github.com/99designs/gqlgen

What 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.1
  • go version? go version go1.12.6 darwin/amd64
  • dep or go modules? go modules

Unsure 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions