gi-nx / getProjectFlows
ts
function getProjectFlows(): Record<string, {
dependencies: GiraffeNodeGraphFeatureDependancy[];
description?: string;
edges: GiraffeEdge[];
id: string;
inputs: Record<string, GiraffeNodeInputHandle>;
name: string;
nodes: GiraffeNode[];
outputs: Record<string, GiraffeNodeInputHandle>;
supportedShapes?: string[];
}>;Returns all flows in the current project, keyed by their id.
Returns
Record<string, { dependencies: GiraffeNodeGraphFeatureDependancy[]; description?: string; edges: GiraffeEdge[]; id: string; inputs: Record<string, GiraffeNodeInputHandle>; name: string; nodes: GiraffeNode[]; outputs: Record<string, GiraffeNodeInputHandle>; supportedShapes?: string[]; }>
A record mapping flow ids to their GiraffeNodeGraph definitions.
Example
ts
const flows = getProjectFlows();
Object.entries(flows).forEach(([id, flow]) => {
console.log(flow.name, flow.nodes.length);
});