title: Find Longest Path in Graph
body: <p>I have been trying hard to find out longest path in a complex network. I have been through many questions in StackOverflow and Internet, but none could help me. I have written a CQL as </p>
  
  <pre><code>start n=node(*)
  match p = (n)-[:LinkTo*1..]-&gt;(m)
  with n,MAX(length(p)) as L
  match p = (n)-[:LinkTo*1..]-&gt;(m)
  where length(p) = L
  return p,L
  </code></pre>
  
  <p>I don't get any solution. Neo4J would keep running for the answer, and I also tried executing it in Neo4J Cloud Hosting. I didn't any solution even there, but got an error 
  "Error undefined-undefined"
  I am in dire need of a solution. The result for this answer will help me complete my project. So, anyone please help me in correcting the query.</p>