Skip to main content

listEdges

client.knowledgeGraph.listEdges(id: string, params?: Record<string, unknown>): Promise<KGEdge[]>

Lists all edges in a knowledge graph instance.

Returns the relationships between records with their types and endpoint references. Use optional parameters to filter by type.

Parameters

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the graph instance
paramsRecord<string, unknown>NoOptional query parameters for filtering or pagination

Returns

Promise<KGEdge[]> — A promise that resolves to an array of objects

Example

import { CodeBoltClient } from '@codebolt/clientsdk';

const client = new CodeBoltClient();

const result = await client.knowledgeGraph.listEdges('id');
console.log(result);