Skip to content

Instantly share code, notes, and snippets.

@Ramko9999
Created February 21, 2020 02:04
Show Gist options
  • Save Ramko9999/e1c9cadf3e3752911e15f7d9378a12c0 to your computer and use it in GitHub Desktop.
Save Ramko9999/e1c9cadf3e3752911e15f7d9378a12c0 to your computer and use it in GitHub Desktop.
Edge Retrieval
Map result = await client.getEdge("SOURCE VERTEX", "EDGE NAME", "TARGET VERTEX (OPTIONAL)");
/*
For example, consider I have in Graph Schema the Vertex Person has an Edge to Vertex Phone called "HAS_PHONE"
If I wanted to get that edge, here is how that would look.
*/
Vertex source = Vertex("Person", "1");
Vertex target = Vertex("Phone", "612-391-2389");
String edge = "HAS_PHONE";
Map result = await client.getEdge(source, edge, to:target);
/*
Moreover, the Target Vertex is actually optional. If I don't pass anything to the target vertex parameter,
The call will return all edges stemming from the "source" that are of passed in edge
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment