Should be able to override enum capitalization
- Lingua principale
- Go
- Stelle
- 10.8k
- Fork
- 1.3k
- Merge medio
- 2g 36m
- PR unite (30g)
- 26
Descrizione
Similar to: #1447
### What happened?
I'm using gqlgen with enums that look something like this:
```graphql
enum FilterType {
CHILDREN
IDENTITIES
}
enum PhoneType {
IPHONE
ANDROID
}
```
Unfortunately, the go 'enum' constants for these GQL enums are not... ideal...
```golang
type FilterType string
const (
FilterTypeChildren FilterType = "CHILDREN"
FilterTypeIDEntities FilterType = "IDENTITIES"
)
```
```golang
type PhoneType string
const (
PhoneTypeIPHone PhoneType = "IPHONE"
PhoneTypeAndroid PhoneType = "ANDROID"
)
```
### What did you expect?
When I say `IDENTITIES`, I mean the word 'identities', not 'ID Entities'. If I wanted to say 'ID Entities', the schema name would be `ID_ENTITIES`. The `IPHONE` example may be more contentious, because I could technically use `I_PHONE`. But I definitely would like a way to tell gqlgen how to name my enum constants, irrelevant of what abbreviations it thinks it's seeing in the names.
### versions
- `go run github.com/99designs/gqlgen version`? `v0.17.21`
- `go version`? `go version go1.19.2 linux/amd64`
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.