MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / fetchNodeRefs

Function fetchNodeRefs

ui/src/lib/api.ts:75–84  ·  view source on GitHub ↗
(ids: readonly string[], signal?: AbortSignal)

Source from the content-addressed store, hash-verified

73 * answers, so the ids go out in batches and the answers are merged (#1976).
74 */
75export async function fetchNodeRefs(ids: readonly string[], signal?: AbortSignal): Promise<WireNodeRefs> {
76 if (ids.length <= NODE_REFS_PER_REQUEST) return getGraphAdapter().nodes(ids, signal);
77 const merged: WireNodeRefs = { items: [], missing: [] };
78 for (let i = 0; i < ids.length; i += NODE_REFS_PER_REQUEST) {
79 const batch = await getGraphAdapter().nodes(ids.slice(i, i + NODE_REFS_PER_REQUEST), signal);
80 merged.items.push(...batch.items);
81 merged.missing.push(...batch.missing);
82 }
83 return merged;
84}
85
86export function fetchEntryPoints(
87 opts: { limit?: number; routes?: number } = {},

Callers 1

resolveTrailNamesFunction · 0.90

Calls 3

getGraphAdapterFunction · 0.90
pushMethod · 0.80
nodesMethod · 0.65

Tested by

no test coverage detected