Check if an edge exists from fromId to toId.
fromId
toId
bool hasEdge(String fromId, String toId) { final fromNode = _nodes[fromId]; return fromNode != null && fromNode.imports.contains(toId); }