You say "two semantic Knowledge Graphs" which leads me to think you have two Neo4j databases, but your code implies you have one graph database with (possibly) two different sets of data. I'll assume it's the latter.
Your code, as is, won't work the way you intend. By saying r1 = r2, you're establishing that these are the exact same relationship object. You might want type(r1) = type(r2), but that would be better specified as:
MATCH (n1)-[r1:MY_REL_TYPE]-(c1)
MATCH (n2)-[r2:MY_REL_TYPE]-(c2)
Further, saying n1 = n2 and c1 = c2 implies you are looking for nodes that have two MY_REL_TYPE relationships between them with the different properties. If that's what you want, it would be simpler as:
MATCH (n1)-[r1:MY_REL_TYPE]-(c1)
MATCH (n1)-[r2:MY_REL_TYPE]-(c1)
WHERE r1.filePath = "../data/graph1.json"
AND r2.filePath = "../data/graph2.json"
RETURN n1, r1, r2, c1
However, if n1 and n2 are intended to be separate nodes, you probably want the labels to match:
MATCH (n1:MyNodeLabel)-[r1:MY_REL_TYPE]-(c1:MyOtherNodeLabel)
MATCH (n2:MyNodeLabel)-[r2:MY_REL_TYPE]-(c2:MyOtherNodeLabel)
WHERE r1.filePath = "../data/graph1.json"
AND r2.filePath = "../data/graph2.json"
RETURN n1, n2, r1, r2, c1, c2
Finally, yes there are algorithms to find graph similarity, but I'm not sure that's your goal here since you want specific things to match, not an overall picture.
Hope that helps. :)