While calling through the following query in neo4jBrowser
call apoc.cypher.runFile("toolQuery.cyp",{parameters: {transitionType: 'SERVICEDESK'}})
There were no response no record and no changes exist. But without parameter , its working as expected.
Note: - toolQuery.cyp has contain my cypher query details. here is the parameter query am passing MATCH p=(n)-[r:$transitionType]->(m).
kindly go through is there any mistake i did.
Dynamic relationship data will change from my frontend. so, I have to pass the parameter in this cypher query.But this below syntax didn't work in neo browser ,
No. Node,labels and relationships are already created in neo4j db.
Only need to call apoc.cypher.runFile("toolQuery.cyp",{parameters: {transitionType: 'xxx'}})
with following param of either xxx, yyy or zzz.
dynamically cypher query should accept the either of this value.
MATCH p=(n)-[r:$transitionType]->(m)
While you can't use parameters as labels directly, you can use CALL apoc.create.addLabels( [node,id,ids,nodes], ['Label',…]) to apply labels based on an array of values, and those array of values can come from parameters.
Example - this won't work:
MATCH (n) where id(n) = 3
SET n:$LabelParameter
RETURN n