node.js – How to Require WITH statements with arangojs

I have set up an arango cluster deployment recently. when I connected with DB from my Nodejs code, it threw an error ‘use WITH vertexName in the first line of your query’.

So, I tried adding it to the existing graph traversal queries after checking this: www.arangodb.com/docs/3.8/aql/graphs-traversals.html#graph-traversals-in-a-cluster

Now, the issue is, that my development DB has a single server instance so it’s not throwing that error. I found that I can specifically add an option --query.require-with value
to DB (arango-cli) like this: www.arangodb.com/docs/stable/programs-arangod-query.html#requiring-with-statements

How can I enable that with arangojs in my NodeJs code?

Read more here: Source link