How to pass query parameters when creating named graphs

I am calling algo.graph.load(node-query, relationship-query, {graph: 'cypher}) where node-query and relationship-query are both parameterized. What is the proper syntax for passing the query parameters in this case? Is it possible?

By way of illustration, let's say the node-query and relationship-query queries contain an $project parameter. I've tried two ways. Neither seem to work:

  • add query parameter to config dict in main call: ...{graph:'cypher',project:'Blah'}
  • including parameters in usual way for py2neo lib: graph.run(cypher-code, parameters = params) where cypher-code is string 'CALL algo.graph.load(,,...' and params is a dict containing project {"project": "Blah"}
1 Like

Try this:

...,{graph:'cypher', params:{project:'Blah'}}) 

and then use $project in your node and/or relationship queries.

2 Likes

Aha! Makes sense. I will give your syntax a try. Thanks very much Seyed!