I am trying to execute following JS file using arangosh
in order to build my graph. The file executes without error but when I go into web interface, I do see a graph created but no vertices or edges in the graph.
db._dropDatabase("database");
db. _createDatabase("database", [], [{username: "admin", passwd: "admin", active: true}]);
db._useDatabase("database");
var graph_module = require("org/arangodb/general-graph");
var graph = graph_module._create("myGraph");
//Add top level documents
graph._addVertexCollection("users");
graph._addVertexCollection("positions");
graph._extendEdgeDefinitions(graph_module._relation("has_worked_at", ["users"], ["positions"]));
I save this file as database.js
and then run following command
arangosh --javascript.execute database.js