How to make composit keys in Dgraph

Just adding to what @MichelDiz said, you could also just build the tree in Dgraph using predicates (no facets). Because each node has a unique UID, even when city names are same, they will be represented using different nodes in Dgraph with different UID. You could then use a combination of root query and filters to find the correct node that you are interested in.