99designs / 99designs/gqlgen

`mutation` with duplicate fields does not throw validation error

Đang mở
#3,066 4 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Go
Star
10.8k
Fork
1.3k
Merge trung bình
2 ngày 36 phút
Pull request đã merge (30 ngày)
26

Mô tả

### 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`

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.