Initialisms with digits in the middle of them aren't recognized
- 主要语言
- Go
- 星标
- 10.8k
- 派生
- 1.3k
- 平均合并
- 2 天 36 分钟
- 30 天内合并 PR
- 26
描述
### What happened?
In an application, there's a certain query type called "p2p". During generation, the function name for the query resolver gets converted to pascal case and becomes "P2p" which is undesirable. So I declared the initialism "P2P" in `gqlgen.yml` to fix this issue, but the initialism seems to be ignored and the expected resolver field name is still "P2p".
### What did you expect?
I expected the "P2P" initialism to be applied to the "p2p" query type upon capitalization, yielding the resolver name "P2P", not "P2p".
### Minimal graphql.schema and models to reproduce
```graphql
type P2PModel {
id: ID!
text: String!
}
type Query {
p2p(id: ID!): P2PModel!
}
input NewP2P {
text: String!
}
type Mutation {
create_p2p(input: NewP2P!): P2PModel!
}
```
In **gqlgen.yml**, include the following:
```yaml
go_initialisms:
initialisms:
- "P2P"
```
### versions
- `go run github.com/99designs/gqlgen version`: `v0.17.49`
- `go version go1.22.1 linux/amd64`
贡献指南
评估
这个 Issue 还没有评估数据。