When I tried using gqlgen to use Apollo Federation for microservices, I got a ʻunable to bind to interface error on
go run github.com/99designs/gqlgen`.
I was mapping a go struct to a schema, and I was getting an error there. Looking at the gqlgen code, it seems that the interface cannot be satisfied unless it is added to the go struct, so when I added the IsEntity () method as shown below, the error disappeared.
type User struct {
ID: int
Name: string
}
func (m User) IsEntity() {}
Recommended Posts