Your First Small Graph
Start with a few facts that can change, derive one useful result, and put the outward effect at the edge.
1. Name what can change
Begin with the facts your feature receives: a form value, a price, an event, a status, or a result from outside the process. Naming them makes the starting points of change visible.
- Use real product facts rather than lifecycle placeholders.
- Keep files, network calls, and other outside work at a clear boundary.
- Start small; one troublesome flow is enough.
2. Describe what depends on those facts
Add the calculations that turn the inputs into something useful. Their declared connections show which result depends on which fact, so a future reader does not have to rediscover the relationship from control flow.
- Use a node for one focused calculation.
- Declare dependencies instead of manually triggering the next step.
- Let the graph coordinate branches that meet again.
3. Put effects at the edge
Rendering a view, writing a file, calling another system, or reporting a result changes the outside world. Keeping that work at the edge leaves the calculations in the middle easier to test and explain.
- Choose TypeScript, Python, or Rust for runnable syntax.
- Inspect the graph as it grows.
- Add boundaries only where work truly leaves the graph.