@ultipa-graph/ultipa-driver
Version:
NodeJS SDK for Ultipa GQL
33 lines (32 loc) • 854 B
TypeScript
/**
* Graph service handles graph management operations.
*/
import { ServiceContext } from './service-context';
import { GraphInfo, GraphType } from '../types';
/**
* Graph service for managing graphs.
*/
export declare class GraphService {
private ctx;
constructor(ctx: ServiceContext);
/**
* Create a new graph.
*/
createGraph(name: string, graphType?: GraphType, description?: string): Promise<void>;
/**
* Delete a graph.
*/
dropGraph(name: string, ifExists?: boolean): Promise<void>;
/**
* Set the current graph for the session.
*/
useGraph(name: string): Promise<void>;
/**
* Return all available graphs.
*/
listGraphs(): Promise<GraphInfo[]>;
/**
* Return information about a specific graph.
*/
getGraphInfo(name: string): Promise<GraphInfo>;
}