Finding Out Looped Graphs
I am trying to identify situations where I have inadvertently created edges that connect to the same vertex, resulting in F -> F and also possibly G -> F -> G scenarios. What are effective Gremlin techniques for detecting and resolving these instances?
2 Replies
You most likely want to look at the
cyclicPath
step. You can then build repeat until
type queries that look for cyclicPath
happening. You will also want to limit those queries (using loops
or something similar) so they don't become long running if the graph is highly connected
Here is a very simple example
🏁