Command doesn't work after upgrade
- 主要语言
- Go
- 星标
- 10.8k
- 派生
- 1.3k
- 平均合并
- 2 天 36 分钟
- 30 天内合并 PR
- 26
描述
### What happened?
My project just did a library upgrade. The gqlgen's version upgrade from 0.13.0 -> 0.17.49, after upgrade I found some errors comes from graphql genrated.go. The error looks like this
```
../../graph/generated/generated.go:3734:2: not enough arguments in call to out.Dispatch
have ()
want (context.Context)
```
Then I tried to regenerate all related files. But the gqlgen give me this error
```
gqlgen.yml already exists
exit status 1
```
When I change the command from init to **generate**, there is new error
`generating core failed: unable to load $SOMEPATH/graph/model - make sure you're using an import path to a package that exists`
I'm not sure if I should update the path itself or something else?
### What did you expect?
The tool can generate right go files for graphql
### Minimal graphql.schema and models to reproduce
```
"The `Status` type, represent job execution status"
type Status {
"Job running user"
user: String!
.....
}
```
### versions
- `go run github.com/99designs/gqlgen version`? 0.17.49
- `go version`? go1.22.4
贡献指南
调研方向
这个 issue 涉及从 0.13.0 升级到 0.17.49 后导致的生成错误。首先,检查 gqlgen.yml 配置文件和 graph/model 包的导入路径。运行 'go run github.com/99designs/gqlgen generate' 以查看确切的错误。查看 generated.go 文件的第 3734 行,以了解 Dispatch 签名不匹配的原因。检查项目的 graphql schema 和模型定义是否与新版本兼容。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- go, graphql
- 领域
- api, backend, devtools
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100