99designs / 99designs/gqlgen

Illegal enum values

未关闭
#2,207 5 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
enhancement
主要语言
Go
星标
10.8k
派生
1.3k
平均合并
2 天 36 分钟
30 天内合并 PR
26

描述

### What happened?

Illegal enum values are accepted during code generation.
When you run the server and open the playground it says:
```
{
"errors": [
"Enum values cannot be named: true"
]
}
```

### What did you expect?

I expect `go run github.com/99designs/gqlgen` to return an error when reading the schema file and encountering `true`, `false` or `null` in enum values according to the [spec of October 2021](https://spec.graphql.org/October2021/#sec-Enum-Value).

### Minimal graphql.schema and models to reproduce

https://github.com/romshark/gqlgen-2207-reproduction

### versions
- `go run github.com/99designs/gqlgen version`: `v0.17.7`
- `go version`: `go1.18.2 darwin/arm64`

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。