When the generated package name is graphql, resolvers are aliased with graphql1
- 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ả
The following settings are used in my gqlgen.yml file
```yml
exec:
filename: graphql/generated.go
package: graphql
```
When gqlgen is run and it modifies resolver files, the imports for the generated package are aliased to `graphql1`. There are no naming conflicts. If the aliases are removed and the references are updated to `graphql`, the application works as usual.
For example, the following import for a resolver file:
```go
import (
"context"
"github.com/brettski/brettskiql/graphql"
"github.com/brettski/brettskiql/graphql/model"
"github.com/brettski/brettskiql/transform"
)
```
Becomes this after the gqlgen generator is run:
```go
import (
"context"
graphql "github.com/brettski/brettskiql/graphql"
"github.com/brettski/brettskiql/graphql/model"
"github.com/brettski/brettskiql/transform"
)
```
Is there a way to keep the generator from making this update?
I much prefer to use the name `graphql` for my package than `graph`
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.