Hi:
I am new to ArangoDB. I am using following controller in a Foxx App.
I am not able to get startPoints as an array. Can you provide right syntax and also, I am assuming format of data in the body should be:
["x", "y", "z"]
?
controller.get("/executeNeighbors", function (req, res) {
res.set("Content-Type", "text/plain; charset=utf-8");
var mygraph = 'mygraph_c';
var graph = graph_module._graph(mygraph);
var rii = db._collection("rii_11");
var start = req.param("startPoints"); // We load the body by the name defined later
var query = aqlQuery`RETURN GRAPH_NEIGHBORS("mygraph_c", ${start}, {includeData: false, direction: "outbound", maxDepth: 10000000, minDepth: 1})`;
var cursor = db._query(query);
res.json(cursor.toArray());
}).bodyParam("startPoints", joi.array());
Thanks,
CP