gqlgen generates non compilable code when schema has Entity interfaces
- Dominant language
- Go
- Stars
- 10.8k
- Forks
- 1.3k
- Avg merge
- 2d 36m
- Merged PRs (30d)
- 26
Description
### What happened?
gqlgen generates non compilable code when schema has [Entity interfaces](https://www.apollographql.com/docs/federation/federated-types/interfaces/).
I've noticed this after trying to upgrade gqlgen from `v0.17.31` -> `v0.17.34`
### What did you expect?
It should generate compilable code
### Minimal graphql.schema and models to reproduce
```graphql
interface User @key(fields: "id") {
id: ID!
name: String!
email: String!
}
type Customer implements User @key(fields: "id") {
id: ID!
name: String!
email: String!
}
extend type Query {
me: User!
}
```
gqlgen is generating this model for the interface, but it doesn't implement the `fedruntime.Entity` interface.
```go
type User interface {
IsUser()
GetID() string
GetName() string
GetEmail() string
}
```
### versions
- `go run github.com/99designs/gqlgen version`? `v0.17.34`
- `go version go1.20.5 darwin/arm64`
Contributor guide
Assessment
This issue has not been assessed yet.