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 those graphs.

Examples

const db = new Database();
const graphs = await db.graphs();
// graphs is an array of Graph instances