Hi, I try create database via dgraph, .net driver and JSON. I have 3 cities and distances between them in my list. I would like one complete graph without duplicates but finally I’ve got 3 different graphs (with nodes and edges ofc). Can I do one big complete graph?
I see that your data is represented very much like an adjacency list. And there is no way for dgraph to know that the item in the list is corresponding to some other node. So you are getting three different graphs.
I would rather suggest to not represent the data as adjacency list. You can represent it like this:
Or rather than having edges in both direction you can even have an edge in just one direction and use @reverse directive. That completely depends on your usecase.
Let me know what do you think about this kind of representation.