99designs / 99designs/gqlgen

GraphQL Multiple Fields Query

Đang mở
#3,204 0 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ả

When I use a multiple fields query in GraphQL, if all the fields return success, the result from gqlgen in the resolver will return a JSON starting from data like this:

```
{
"data": {
"queryTaskConfig": {
"isTaskConfigExist": true
},
"isTaskExisted": {
"isTaskExist": true
},
"isScheduleExisted": {
"isScheduleExist": false
}
}
}
```
In the case where isScheduleExisted encounters an error, I expect only the error result of isScheduleExist because the other two elements are still functioning normally. However, the error result returned is as follows:

```
{
"errors": [
{
"message": "Connection to data source failed",
"locations": [{ "line": 7, "column": 3 }],
"path": ["isScheduleExisted"]
}
]
}
```

This is quite frustrating when implementing GraphQL Federation because an issue in the Schedule Service should not affect the Task Service or Task Config Service. So, could you please provide an explanation for this?

### versions
- `go run github.com/99designs/gqlgen v0.17.49`?
- `go version`22

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.