Skip to content

Instantly share code, notes, and snippets.

@Hkazanci93
Created November 18, 2021 16:21
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/4f08941bf35488f44d426a0bbc89a953 to your computer and use it in GitHub Desktop.
Save Hkazanci93/4f08941bf35488f44d426a0bbc89a953 to your computer and use it in GitHub Desktop.
MATCH (me:Person), (post:Post)
WHERE me.userid = $userid
AND ID(post) = $onPost
CREATE (me)-[:commented]->(comment:Comment {text:$text,created:$now})
CREATE (post)-[:hasComment]->(comment)
RETURN post
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment