Skip to main content

expandNode

client.knowledgeGraph.expandNode(id: string, data: ExpandNodeRequest): Promise<unknown>

Expands a node to reveal its immediate connections.

Starting from a specific record, returns all directly connected records and the edges linking them. Useful for interactive graph exploration where users progressively reveal the graph structure.

Parameters​

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the graph instance
dataExpandNodeRequestYesExpansion parameters specifying which node to expand and direction

Returns​

Promise<unknown> — A promise that resolves to the connected records and edges

Example​

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

const client = new CodeBoltClient();

const result = await client.knowledgeGraph.expandNode('id', /* ExpandNodeRequest */);
console.log(result);