# Implement 2 interfaces

**URL:** <https://discuss.dgraph.io/t/implement-2-interfaces/10375>\
**Category:** GraphQL\
**Tags:** status:accepted, kind:bug, ticket:created\
**Created:** [September 15, 2020, 2:26pm UTC](https://discuss.dgraph.io/t/implement-2-interfaces/10375 "2020-09-15T14:26:34Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![spinelsun](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/spinelsun/32/4596_2.png) [@spinelsun](https://discuss.dgraph.io/u/spinelsun)\
**Post date:** [September 15, 2020, 2:26pm UTC](https://discuss.dgraph.io/t/implement-2-interfaces/10375/1 "2020-09-15T14:26:34Z")

</div>

Hi,

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

```auto
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

---

<div class="post-metadata">

**Author:** ![chewxy](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/chewxy/32/4339_2.png) [@chewxy](https://discuss.dgraph.io/u/chewxy)\
**Post date:** [September 15, 2020, 7:06pm UTC](https://discuss.dgraph.io/t/implement-2-interfaces/10375/2 "2020-09-15T19:06:06Z")

</div>

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…)

---

<div class="post-metadata">

**Author:** ![spinelsun](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/spinelsun/32/4596_2.png) [@spinelsun](https://discuss.dgraph.io/u/spinelsun)\
**Post date:** [September 16, 2020, 6:13am UTC](https://discuss.dgraph.io/t/implement-2-interfaces/10375/3 "2020-09-16T06:13:01Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![abhimanyusinghgaur](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/abhimanyusinghgaur/32/2980_2.png) [@abhimanyusinghgaur](https://discuss.dgraph.io/u/abhimanyusinghgaur)\
**Post date:** [September 16, 2020, 6:17am UTC](https://discuss.dgraph.io/t/implement-2-interfaces/10375/4 "2020-09-16T06:17:39Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![spinelsun](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/spinelsun/32/4596_2.png) [@spinelsun](https://discuss.dgraph.io/u/spinelsun)\
**Post date:** [November 15, 2020, 10:54am UTC](https://discuss.dgraph.io/t/implement-2-interfaces/10375/6 "2020-11-15T10:54:44Z")

</div>

@abhimanyusinghgaur any news about it?

---

<div class="post-metadata">

**Author:** ![pawan](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/pawan/32/1946_2.png) [@pawan](https://discuss.dgraph.io/u/pawan)\
**Post date:** [November 17, 2020, 10:07am UTC](https://discuss.dgraph.io/t/implement-2-interfaces/10375/7 "2020-11-17T10:07:23Z")

</div>

This is something that we’ll look into after the 20.11 release is done. I can’t give you an ETA for this right now. If other folks are running into this issue, please let us know.

---

<div class="post-metadata">

**Author:** ![JatinDevDG](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/jatindevdg/32/3417_2.png) [@JatinDevDG](https://discuss.dgraph.io/u/JatinDevDG)\
**Post date:** [December 8, 2020, 6:10am UTC](https://discuss.dgraph.io/t/implement-2-interfaces/10375/8 "2020-12-08T06:10:54Z")

</div>

Hi @spinelsun, We added support to repeat the field name of `ID` type. You can now have field of ID type and of same name in multiple implementing interfaces.This fix is currently avaliable in master branch and will also be avaliable in 20.11 release.  
PR:[fix(GraphQL): This PR allows repetition of fields inside implementing type which are present in interface and also allow to inherit field of same name of type ID from multiple interfaces. by JatinDevDG · Pull Request #7053 · dgraph-io/dgraph · GitHub](https://github.com/dgraph-io/dgraph/pull/7053)
