title: Return all nodes and relationships from a matched node Neo4j
body: <p>I am looking to retrieve all nodes an relationships with respect to outgoing relationships only. That is all nodes 'b' that are connected to 'a' in this manner: </p>
  
  <pre><code>(a)--&gt;(b)
  </code></pre>
  
  <p>In my situation. I have User nodes that are then connected to another node, lets label it 'work'. And from work node we relate out to many other nodes that may be labeled 'work_friends' or 'work_locations'. This User node may also have other nodes from the user node like school, which in turn would have outgoing nodes labeled 'school_friends' and others.  </p>
  
  <p>How would I return all nodes starting from the work node and return his work node and all his work friends and work locations? </p>
  
  <p>What I have been trying. </p>
  
  <pre><code>Match(a:User),(b:Work) WHERE a.UserId = 'xxxx' AND b.Work = 'JobA' Return * 
  </code></pre>
  
  <p>but this ends up only returning the two matched nodes where I want it to return all nodes from the matched work node out. </p>
  
  <p>EDIT 1:
  So, I guess writing out the problem on here helped me solve my own problem. I have gotten closer to a solution.</p>
  
  <pre><code>Match(a:User),(b:Work)--&gt;(n) Where a.UserId = 
  'xxxx' AND  b.Name = 'CompanyA' Return * 
  </code></pre>
  
  <p>So adding -->(n) in the match returned everything from (a), where (n) is all nodes connected out from (b), that is it returned: </p>
  
  <pre><code>(a)-&gt;(b)-&gt;(n) 
  </code></pre>
  
  <p>this is close to what I am looking for. I really want to return: </p>
  
  <pre><code>(b)-&gt;(n) 
  </code></pre>
  
  <p>and ignore the inbound relationship.  </p>