I believe that, as of today, the only way to do this with Apache AGE is to set the edge with a property that resembles this undirection or set it as bidirectional.
Considering that, both of the following examples doesn't work:
-- EXAMPLE 1 : UNDIRECTED EDGE (DOES NOT WORK)
SELECT * FROM cypher ('demo', $$
MATCH (a:Country), (b:Country)
WHERE a.name = "India" AND b.name = "Bangladesh"
CREATE (a)-[e:BORDERS_WITH]-(b)
RETURN e
$$) as (e agtype);
ERROR: only directed relationships are allowed in CREATE
LINE 4: CREATE (a)-[e:BORDERS_WITH]-(b)
-- EXAMPLE 2 : BIDIRECTIONAL EDGE (DOES NOT WORK)
SELECT * FROM cypher ('demo', $$
MATCH (a:Country), (b:Country)
WHERE a.name = "India" AND b.name = "Bangladesh"
CREATE (a)<-[e:BORDERS_WITH]->(b)
RETURN e
$$) as (e agtype);
ERROR: syntax error at or near ">"
LINE 4: CREATE (a)<-[e:BORDERS_WITH]->(b)
But this works:
-- EXAMPLE 3 : SET BIDIRECTIONAL EDGE AS PROPERTY (WORKS)
SELECT * FROM cypher ('demo', $$
MATCH (a:Country), (b:Country)
WHERE a.name = "India" AND b.name = "Bangladesh"
CREATE (a)-[e:BORDERS_WITH{ type:"<->" }]->(b)
RETURN e
$$) as (e agtype);
e
--------------------------------------------------------------------------------------------------------------------------------------------------
{"id": 2533274790395905, "label": "BORDERS_WITH", "end_id": 2251799813685249, "start_id": 2251799813685250, "properties": {"type": "<->"}}::edge
(1 row)
demo=#
Then, if you want to find which edges are of type "<->" you just have to type this query:
SELECT * FROM cypher ('demo', $$
MATCH (a)-[e:BORDERS_WITH]->(b)
WHERE e.type = "<->"
RETURN e
$$) as (e agtype);
e
--------------------------------------------------------------------------------------------------------------------------------------------------
{"id": 2533274790395905, "label": "BORDERS_WITH", "end_id": 2251799813685249, "start_id": 2251799813685250, "properties": {"type": "<->"}}::edge
(1 row)