It doesn't work when input argument is null
- 主要语言
- Go
- 星标
- 10.8k
- 派生
- 1.3k
- 平均合并
- 2 天 36 分钟
- 30 天内合并 PR
- 26
描述
### What happened?
**The input schema**
```
extend type Query {
apiResponse(id: ID!,filter:MakerFilterInput): Any
}
```
** when run the query**
query httpresp {
apiResponse(id:"xxxx") // The arg "filter" is null, get the error: but if the filter is not null.it works well
}
**error**:
```
{
"errors": [
{
"message": "internal system error",
"path": [
"apiResponse"
]
}
],
"data": {
"apiResponse": null
}
}
```
### What did you expect?
### Minimal graphql.schema and models to reproduce
### versions
- `go run github.com/99designs/gqlgen version`? v0.17.14
- `go version`? 1.18
贡献指南
调研方向
该 issue 涉及一个 GraphQL 查询:当省略 nullable 输入参数时(将其视为 null),查询会失败。查看输入处理的代码生成部分,可能位于 resolver 中,或位于为 'apiResponse' 字段生成的代码中。检查 resolver 签名和内部逻辑如何处理 null 参数。运行提供的最小 schema 和查询,以复现 'internal system error' 并跟踪堆栈。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- go, graphql
- 领域
- api, backend
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100