Last active
February 20, 2022 10:44
-
-
Save vladbatushkov/1ae3522a6efc06c2950913f0833d887b to your computer and use it in GitHub Desktop.
Detect n-deep dependencies from the outside
This file contains hidden or 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
UNWIND ['module1.*', 'module2.*', 'module3.*'] as module | |
CALL { | |
WITH module | |
MATCH (s:File)-[:DEPENDS_ON*]->(d:File) | |
WHERE s.name =~ module | |
AND NOT d.name =~ module | |
AND NOT d.name =~ 'common.*' | |
RETURN DISTINCT s.name as subject, | |
collect(DISTINCT d.name) as dependencies | |
} | |
RETURN subject, dependencies | |
ORDER BY subject |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment