dagrejs / graphlib

A directed multi-graph library for JavaScript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing Nodes Exception when we create an Edge

punitganshani opened this issue · comments

When we create an Edge, it needs From and To nodes. I know we should first create all the Nodes (i.e. including From and To nodes).

Is there a way to handle missing nodes instead of just crashing? This is because the preProcessGraph and other methods don't consider the case where node will be null

image

One of the way it could behave is - the library raises a event to add a node when it's found missing during Edge creation