Hi! I am trying to create relationship between two nodes using apoc.merge.relationship, but it creates two same relationships, which I can see by search. I hope someone can show me what is wrong with my cypher query
UNWIND [{
color:'#82abd1', direction:'true', id:'q', index:0, linkType:'a',
source:'46166.a690c888-e3d5-41ed-8469-79a88cce8388', status:'approved',
target:'46163.a690c888-e3d5-41ed-8469-79a88cce8388', type:'Applies for', value:2
}] AS newLink
MATCH
(fNode:Node {id: newLink.source}),
(sNode:Node {id: newLink.target})
CALL apoc.merge.relationship(
fNode,
'Label',
{id: newLink.id},
apoc.map.clean(newLink, ['id','type'],[]),
sNode,
apoc.map.clean(newLink, ['id','type'],[])
)
YIELD rel
RETURN DISTINCT 'true';