我在学Go和GraphQL。
我正在构建一个Go环境,但是当我运行gqlgen init命令时,我在终端bash: gqlgen: command not found中收到了一条消息
当我运行gqlgen init命令时,终端中出现了一条消息。
已执行的命令
$ mkdir with-apollo-api
$ cd with-apollo-api
$ go mod init github.com/yuuu/with-apollo-api
$ go get github.com/99designs/gqlgen
$ go get github.com/rs/cors
# Generate graph/schema.graphqls with gqlgen
$ gqlgen init发布于 2021-10-02 09:55:18
您没有将gqlgen作为可执行文件提供,而是作为项目中的依赖项提供。
若要安装可执行文件,请运行
go install github.com/99designs/gqlgen它将安装可执行文件,现在您可以使用它了。
gqlgen inithttps://stackoverflow.com/questions/69415443
复制相似问题