Autobind error message is wrong
- 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?
```graphql
type User {
tags: [String!]!
}
```
```go
type User struct {
tags string
}
```
If I exec gqlgen, I get the following error.
`2023/06/22 03:31:20 String is incompatible with string`
The reason for this is not clear, since `String` and `string` are supposed to be bindable.
### What did you expect?
`2023/06/22 03:31:20 [String!]! is incompatible with string`
It is also more desirable if the corresponding file and line are output.
`2023/06/22 03:31:20 user.graphql:2 [String] is incompatible with string`
### Minimal graphql.schema and models to reproduce
```graphql
type User {
tags: [String!]!
}
```
### versions
- `go run github.com/99designs/gqlgen version`? v0.17.28
- `go version`? 1.20
Hướng dẫn đóng góp
Hướng nghiên cứu
Thông báo lỗi được tạo trong logic sinh mã hoặc validation. Hãy tìm nơi các lỗi không tương thích type được format, có thể trong một package như 'codegen' hoặc 'validation'. Issue hiển thị output hiện tại 'String is incompatible with string' nhưng mong đợi '[String!]! is incompatible with string' kèm file và dòng. Bắt đầu bằng cách tìm function in ra lỗi này, sau đó trace cách nó resolve types. Kiểm tra các test files về thông báo lỗi để hiểu format được mong đợi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- go, graphql
- Lĩnh vực
- backend-api-design, devtools
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 45/100