title: In ArangoDB, how to use a complex conditions in PRUNE condition?
body: <p>In ArangoDB, during a traversal, I'd like to PRUNE with some complex condition, including the need of subqueries.
  AQL won't let me put a subquery in the prune condition. It cannot use a predefined variable either.</p>
  <p>But I'm pretty stuck. During my research, I stumbled upon articles about the ancient &quot;custom visitors&quot; feature, which has been removed a very long time ago (in ArangoDB v3).
  This really seems to be what I was looking for, being able to do whatever I want to define if I should prune or not when I'm on a vertex.</p>
  <p>How I could achieve such results today?</p>
  <p>To give some context, here is my (simplified) use case:
  My graph is a tree which looks like this</p>
  <pre><code>├── A ---&gt; [document 1]
      └── B ---&gt; [document 2]
          └── C ---&gt; [document 3]
      └── D ---&gt; [document 4]
  </code></pre>
  <p>Each vertex (A, B, C) is linked to an other document.
  To determine if I should prune a vertex, I have to check some data on linked doc. I'm able to filter out using a subquery, but it's not totally similar to pruning: if <code>document 2</code> says it should not be traversed then I don't want <code>C</code> in my result, no matter the data on <code>document 3</code></p>
  <p>Thanks for your help!</p>