Create Edge between two vertex using IDs only

26 views
Skip to first unread message

Ali Alrahahleh

unread,
Mar 2, 2015, 8:06:02 PM3/2/15
to aureliu...@googlegroups.com
Can I create Edge between two vertex knowing only the String id for each vertex using blueprint API  ? or any other way ? 

Regards

Etienne Couritas

unread,
Mar 3, 2015, 3:42:08 AM3/3/15
to aureliu...@googlegroups.com
I suppose you could get your vertex like this graph.getVertices("id",yourString) and associate them.

Jean-Baptiste Musso

unread,
Mar 3, 2015, 11:54:02 AM3/3/15
to aureliu...@googlegroups.com
Hi Ali,

Wouldn't the following work for your use case? (assuming id1 and id2 are vertex ids)

g.addEdge(g.v(id1), g.v(id2), "someLabel", [foo: "bar"])

Jean-Baptiste
Reply all
Reply to author
Forward
0 new messages