Is is possible to get field directives in mutation hook?
Đang mở
- 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?
According to https://gqlgen.com/recipes/modelgen-hook/ we can mutate generated models file.
### What did you expect?
I want to add some tags into struct fields depending on existing directives.
### Minimal graphql.schema and models to reproduce
```gql
directive @testDirective(value: Int!) on INPUT_FIELD_DEFINITION
input SomeInput {
someField: Int! @testDirective(value: 100)
}
```
Expected struct:
```go
type SomeInput struct {
SomeField int `json:"someField" test:"100"`
}
```
### versions
- `gqlgen version`? 0.12.2
- `go version`? 1.15
- dep or go modules? go.mod
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.