I've followed the following guide to find a longest path when a single relationship is at play https://neo4j.com/developer/kb/achieving-longestpath-using-cypher/.
However my model, of DNS resolution, looks like the following:
Any host outside of our DNS is the final destination e.g. a heroku app or S3 bucket.
I want to write a query that, given a host, traverses as far as the final host that does not have an
There is the simple case of non-bifurcating chains, but there is also the bifurcating case to consider (for geo-specific DNS routing a host may be an alias for multiple
As a nice to have, it'd be good if it could handle chains of length 1 (i.e. the Host provided has no
The only way of tackling this problem I can think of is APOC virtual relationships https://neo4j.com/docs/labs/apoc/current/virtual/, but I wonder if there is a native cypher way?