trying to create a function like :-
addChild(parent graphid,child graphid,relationship text,direction text)
merge(parent)-[r:f(relationship)]->(child) return id(r);
with a typical cal :
relid=addChild(id(a),id(b),'has','U') -- where U means up child to parent
Question is, without a very tedious switch statement , how do I associate a text version of the relationship, or edge type, with an actual edge type?
Took a bit of messing around and the syntax seems a bit last-minute but this works :
Where
parent
andchild
are graph ids andreltype
is text;