Skip to main content

graph

client.git.graph(data?: GitGraphRequest): Promise<GitCommit[]>

Retrieves the commit graph (history) of the repository.

Returns an array of commits representing the repository's history. Useful for rendering commit timelines or inspecting past changes.

Parameters

ParameterTypeRequiredDescription
dataGitGraphRequestNoOptional parameters to filter the graph (e.g., branch, limit)

Returns

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

Example

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

const client = new CodeBoltClient();

const result = await client.git.graph();
console.log(result);