Autobinded packages which contain interfaces that are in the scheme, are not implemented properly in the models
- 主要言語
- Go
- スター
- 10.8k
- フォーク
- 1.3k
- 平均マージ
- 2日 36分
- マージ済み PR(30日)
- 26
説明
### What happened?
When auto-binding packages that contain interfaces which are used in the schema, they are not implemented properly in the generated models of the Graphql types that implement them.
### What did you expect?
That the types which implement the interfaces have their getter methods implements properly in the generated models file.
**If I remove the auto-bind from the config, the interface is implemented properly.**(but then I have two appearances of it, one in the auto-binded package and one in the generated one)
### Minimal graphql.schema and models to reproduce
```gql
interface Node {
id: ID!
}
type MyType implements Node {
id: ID!
}
```
```yaml
...
autobind:
- github.com/my-custom-types/model
...
```
Only file "github.com/my-custom-types/model":
```go
package model
type Node interface {
IsNode()
GetID() string
}
```
Expected generated models:
```go
type MyType struct {
Id string
}
func (MyType) IsNode() {}
func (this MyType) GetID() string { return this.Id }
```
Actual generated models:
```go
type MyType struct {
Id string
}
func (MyType) IsNode() {}
```
### versions
- `go run github.com/99designs/gqlgen version`? v0.17.25
- `go version`? go1.19.5 linux/arm64
コントリビューションガイド
評価
この issue はまだ評価されていません。