Created
February 21, 2020 02:04
-
-
Save Ramko9999/e1c9cadf3e3752911e15f7d9378a12c0 to your computer and use it in GitHub Desktop.
Edge Retrieval
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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