Created
October 18, 2023 15:53
-
-
Save cboulanger/d95d75c489bdd76225e07ae1ae99085a to your computer and use it in GitHub Desktop.
Neo4J Text-only equivalent for CALL db.schema.visualization()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// written with the help of ChatGPT4 | |
MATCH (n)-[r]->(m) | |
WITH DISTINCT labels(n) AS ln, type(r) AS rt, labels(m) AS lm | |
WITH "(" + apoc.text.join(ln, ":") + ")-[:" + rt + "]->(" + apoc.text.join(lm, ":") + ")" AS CypherPathExpression | |
RETURN apoc.text.join(COLLECT(CypherPathExpression), '\n') AS GraphDataModel |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment