Now the another new node came in with a new label as sponsor
{Name:"test",sourceEmpId:"123",destEmpId:"333"}
Name:"test",sourceEmpId:"222",destEmpId:"444"}
So generally the node with label sponsor came later.
As soon as that sponsor node start to arrives we need to create relation between the member nodes based on the sponsor properties of source and destination emp id.
Would it make sense to modify the sponor insert transaction in such a way that it creates the relation?
match(s:Member) where s.empID="123" with s
match (d:Member) where d.empID="333" with s,d
merge(sp:MemberSponsor {Name:"test", sourceEmpId="123",destEMPId="333"}) with s,d,sp
merge (s)-[r:MyRelation]->(d)
i depending on other requirements I would model the sponsorship real like
match(s:Member) where s.empID="123" with s
match (d:Member) where d.empID="333" with s,d
merge(sp:MemberSponsor {Name:"test"}) with s,d,sp
merge (s)-[p:MyRelation]->(sp)-[s:MyRelation]->(d)
This could probably better leverage the benefit of graph libraries.