Kamil
Kamil

Reputation: 79

How to use graphs in Foxx?

I have created a graph in ArangoDB. It is possible to access the graph from Foxx?

I can create graph in following way:

var graph_module = require("@arangodb/general-graph");
var graph = graph_module._create("myGraph");

But there is not a method to load graph from ArangoDB to Foxx.

Upvotes: 1

Views: 102

Answers (1)

Tobias Gödderz
Tobias Gödderz

Reputation: 321

You can load the graph using the _graph function:

graph = graph_module._graph("myGraph");

The code works the same in arangosh and in Foxx.

It's also described in the documentation: https://docs.arangodb.com/3.11/graphs/general-graphs/management/#load-a-graph

Upvotes: 2

Related Questions