Skip to main content



The runGraph function runs a graph for a given project with specific options. This is useful when you have loaded a Project separately from a file or string, and want to run a graph in that project.


function runGraph(project: Project, options: RunGraphOptions): Promise<Record<string, DataValue>>;


  • project (Project): The project in which the graph will be run. This should be a valid Project instance.

  • options (RunGraphOptions): The options for running the graph. This should be an instance of RunGraphOptions.


Returns a Promise that resolves to a Record<string, DataValue>. The record represents the outputs of the graph after it has been processed. Each key in the record is the name of an output node id in the graph, and the value is the value is the data which was input to that node.


const project = await loadProjectFromFile('./path/to/project.json');
const outputs = await runGraph(project, {
graph: 'My Graph',
inputs: {...},
context: {...},
// other options...

See Also