For the purpose of the example, we'll generate the following graph:
The first step is to generate the 3 schemas:
Add the necessary fields and edges for the schemas:
Let's write the code for populating the vertices and the edges to the graph:
Let's go over a few traversals, and show the code for them:
The traversal above starts from a
Group entity, continues to its
continues to its
friends (edge), gets their
pets (edge), gets each pet's
and requests their owners.
What about the following traversal?
We want to get all pets (entities) that have an
edge) that is a
(edge) of some group
The full example exists in GitHub.