title: Exclude a vertex and its children in a traversal [Gremlin API]
body: <p>In my graph <code>product</code> vertex can have a <code>composed_of</code> edge from another <code>product</code> vertex.</p>
  
  <p>Now I am trying to exclude a vertex and its children with <code>composed_of</code> edge when selecting all vertex with label <code>product</code>.</p>
  
  <p><strong>initially i have the id of the vertex to be excluded, but i dont know how to exclude it and its children when selecting all the <code>product</code> vertex in one query.</strong></p>
  
  <p>Seed db:</p>
  
  <pre><code>//add product vertex
  g.addV('product').property('id', 'product1').property('pk', 'product1');
  g.addV('product').property('id', 'product2').property('pk', 'product2');
  g.addV('product').property('id', 'product3').property('pk', 'product3');
  g.addV('product').property('id', 'product4').property('pk', 'product4');
  g.addV('product').property('id', 'product5').property('pk', 'product5');
  
  
  //add composed_of edge
  g.V('product1').addE('composed_of').to(g.V('product2'))
  g.V('product1').addE('composed_of').to(g.V('product3'))
  
  </code></pre>
  
  <p>now i want to be able to select <code>product4</code> and <code>product5</code> by excluding product1 and its children with <code>composed_of</code> edge.</p>
  
  <p>note: im sorry if this commands wont work with your gremlin console because i first started learning gremlin using cosmosDB.</p>