mirror of https://gitee.com/bigwinds/arangodb
921 B
921 B
layout | description |
---|---|
default | These functions implement theHTTP API for accessing general graphs |
Accessing graphs
These functions implement the HTTP API for accessing general graphs.
database.graph
database.graph(graphName): Graph
Returns a Graph instance representing the graph with the given graph name.
database.listGraphs
async database.listGraphs(): Array<Object>
Fetches all graphs from the database and returns an array of graph descriptions.
Examples
const db = new Database();
const graphs = await db.listGraphs();
// graphs is an array of graph descriptions
database.graphs
async database.graphs(): Array<Graph>
Fetches all graphs from the database and returns an array of Graph instances for the graphs.
Examples
const db = new Database();
const graphs = await db.graphs();
// graphs is an array of Graph instances