I have found that the apoc.refactor.cloneSubgraph procedure does not preserve edge properties. Below is a simple recreate:
CREATE (:A)-[:R{id:"ID1"}]->(:B)
MATCH (n)-[r:R]->(oldB:B)
WITH oldB, COLLECT(DISTINCT n) AS nodes
CREATE (newB:B)
WITH oldB, newB, nodes
MATCH (m)-[r]-(n) WHERE n IN nodes
WITH oldB, newB, nodes, COLLECT(DISTINCT r) AS rels
MATCH (s) WHERE NOT s:B
WITH oldB, newB, nodes, rels, COLLECT(DISTINCT [s, s]) + [[oldB, newB]] AS standinNodes
CALL apoc.refactor.cloneSubgraph(nodes, rels, {standinNodes:standinNodes})
YIELD input, output
MATCH (old) WHERE ID(old) = input
CREATE (output)-[r:importedFrom{created_on:datetime()}]->(old)
RETURN output
I would expect that following this there would be a new "B" node with an edge to the existing A. That edge should clone the existing relationship between the original A and B. This happens, but the resulting edge does NOT contain the edge property "id" of "ID1". I would expect that all edge properties would be cloned along with the edge itself.
I'm seeing this on Neo4J v. 5.26.0, both interactive in Neo4J browser and via Java APIs