title: Extract subgraph in neo4j using cypher query
body: <p>I'm using neo4j 3.1 with java 8 and I want to extract a connected subgraph as to store it as a test database. 
  Is it possible to do it and how? 
  How to do it with the clause Return which returns the output. So, I had to create new nodes and relations or just export the subgraph and put it in a new database.</p>
  
  <p>How can I extract a connected subgraph since I have a disconnected graph.</p>
  
  <p>Thank you</p>