Implement 2 interfaces

Hi,

What will happen if two interfaces have the same fields for example

enum Color{
   Blue
   Green
   Brown
   Gray
   Balck
}
interface IFish{
    id: ID!
    eyesColor: Color
}
interface IBird{
    id: ID!
    eyesColor: Color
}
type Penguin implements IFish & IBird{
    legsNumber: Int!
}

Thanks,
Or

1 Like

Interesting question - I’d like to know the answer too. However it seems to me the immediate problem could be solved by putting legsNumber under IBird and have Penguin implement both IFish and IBird with no fields under it.

(a penguin is a bird and not a fish in real life…)

Thanks for your response,

The types are not part of a real use case.
I just wanted to clarify my question by showing an example.

Anyway do you know who can have the answer?

Bets,
Or

Syntactically, that is correct. GraphQL spec allows that behavior.
But unfortunately, we haven’t yet handled this case in our implementation. Thanks for bringing this to our notice.

Marking it as a bug for now.