cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

How to pass query parameters when creating named graphs

hbowers
Node Link

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 ACCEPTED SOLUTION

shan
Graph Buddy

Try this:

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

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

View solution in original post

2 REPLIES 2

shan
Graph Buddy

Try this:

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

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

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