前提
go version go1.16.15 linux/amd64 gqlgen version v0.17.5
このコマンドで生成したGraphqlのサーバーが起動せず、原因がわかりません。
go run github.com/99designs/gqlgen init
go run server.go
を叩くと、下記のようなエラーが出ております。
/app # go run server.go # github.com/99designs/gqlgen/graphql/executor /go/pkg/mod/github.com/99designs/gqlgen@v0.17.5/graphql/executor/executor.go:74:20: cannot assign error to err (type *gqlerror.Error) in multiple assignment: need type assertion /go/pkg/mod/github.com/99designs/gqlgen@v0.17.5/graphql/executor/executor.go:175:14: cannot use err (type error) as type *gqlerror.Error in argument to errcode.Set: need type assertion /go/pkg/mod/github.com/99designs/gqlgen@v0.17.5/graphql/executor/executor.go:176:29: cannot use err (type error) as type *gqlerror.Error in slice literal: need type assertion
エラーを見る限り、生成されたコード側の問題ではなく、ライブラリ側の問題のように感じます。なにか解決法などご存じであれば教えていただきたいです。
試したこと
goのバージョンを、最新の1.19から1.16にバージョンダウン
あなたの回答
tips
プレビュー