Skip to content

Instantly share code, notes, and snippets.

@Hkazanci93
Created October 21, 2021 20:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Hkazanci93/00c06a95f60406bde89d418d44c32dcd to your computer and use it in GitHub Desktop.
Save Hkazanci93/00c06a95f60406bde89d418d44c32dcd to your computer and use it in GitHub Desktop.
query = graph
.match(:n, from.class.name, id: from.id)
.to(:r, type)
.match(:m, to.class.name)
.delete(:r)
query.to_cypher
# => "MATCH (n:Task {id: 'c9bc52a0-c436-499c-954c-da40e82f50b2'}) -[r:blocked_by]-> (m:Task) DELETE r"
query.execute
# => []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment