99designs / 99designs/gqlgen

`mutation` with duplicate fields does not throw validation error

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

描述

### What happened?

The following mutation:

```graphql
mutation {
evaluate(
expressions: {
date: "1"
}
)
evaluate(
expressions: {
date: "2"
}
)
}
```

Executes first mutation field only and returns:

```json
{
"data": {
"evaluate": {
"date": 1
}
}
}
```

### What did you expect?

An error similar to how `query` behaves. IE

```
Fields \"evaluate\" conflict because they have differing arguments. Use different aliases on the fields to fetch both if this was intentional.
```

The spec may have some definition of how this should be handled. Regardless, only executing one of the two mutations was unexpected.

### Versions

`v0.17.37`

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

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