Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save lennertVanSever/ed7e4255a43c9692373af94bb7115b76 to your computer and use it in GitHub Desktop.
Save lennertVanSever/ed7e4255a43c9692373af94bb7115b76 to your computer and use it in GitHub Desktop.
await session.run(
`
MATCH(country: Country { name: $name })
MERGE(subregion: Subregion { name: $subregion })
MERGE(region: Region { name: $region })
MERGE(country)-[:hasSubregion]->(subregion)
MERGE(subregion)-[:hasRegion]->(region)
`, {
name, region, subregion
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment