Skip to content

Instantly share code, notes, and snippets.

@ikwattro
Created December 5, 2014 23:42
Show Gist options
  • Save ikwattro/dcc6bed30cd59dd19e6a to your computer and use it in GitHub Desktop.
Save ikwattro/dcc6bed30cd59dd19e6a to your computer and use it in GitHub Desktop.
get subgraph cypher
match (n)-[r:KNOWS]-(m) WITH {node:n,neighbours:collect({type:type(r),node1:m})} as neighbours
UNWIND {neighbours} AS rels
create (node)-[:rels.type]->(node1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment