This example is very good for beginners, because it put many pieces of knowledge together. I spent more than a week studying it and I learned a lot of knowledge. It’s worth it.
I try to rewrite you case with Interface(put the Group and User into same Interface), but I give up it, becuase Dgraph didn’t support filter on Interface neither mutation on Interface, except Query.
I also try rewrite it with Union, but found that Dgraph didn’t support @hasInverse Directive on Union.
So I give up them both. I want to use your case with minor modification, I think the Type Contact should be divided into two Type. One hold the contact information, such as phone, name, etc.
the other hold an individual, business, organization, school, class, etc, it will make this schema more clear for reading.
This visual diogram base on your schema.
