Skip to contents

Add a fixed edge to a graph

Usage

add_edge(graph, from, to)

Arguments

graph

A StateGraph object.

from

Node name or START.

to

Node name or END.

Value

graph, invisibly.

Examples

schema <- workflow_state(result = list(default = NULL))
g <- state_graph(schema) |>
  add_node("step1", function(state, config) list(result = "done")) |>
  add_edge(START, "step1") |>
  add_edge("step1", END)