Context:
As a result of implementing the initial version of GraphUtil -> getAllPaths, we can now retrieve all the possible paths from a vertex in a JSON graph. In addition to getting the paths, it should also run a validation in prior to creating a pipeline to check any cyclic paths. Example of a cyclic-graph is

In the diagram, cycle happens for 0 -> 2 -> 1 and 0 -> 3 -> 4.
I think we should not allow any cyclic tasks due to the potential performance issue caused by the infinite loop.
TODO:
References: