I have a cypher query inside a Node .post using call apoc.load.json($myNeo4jParam) yield value.
When I run this query I get an error Neo4jError: Expected parameter(s):myNeo4jParam. So my apoc call is not using my Neo4j database :param myNeo4jParam.
I realize I can just put the URL I want to hit here, but was hoping to use the :param, though I guess the more I think about it, I'm hard-coding either way?
How do I differentiate from a parameter passed from my client and wanting to use a :param that is in my Neo4j data?
Yes I'm referring to the :param that can be created in Neo4j browser (I think I'm realizing that this :param exists solely for use in the browser/desktop)...
The fuller code trying to call the Neo4j :param is...
app.post('/createX', async (req, res) => {
const {title} = req.body;
try {
const result = await session.run(\`call apoc.load.json($myNeo4jParam) yield value
...
I think the answer is No, but... Is there a way to tell Nodejs to use the Neo4j :param, not a const {param} sent from the client?
You are correct. The 'param' is only available in the browser. In fact, it goes away when the window is closed. You will need to pass your parameter in the request. You just need to follow the format. Here is an example http request body: