Need help querying everything related to a DNS zone

I've created a database for our internal DNS and am trying to pull out everything related to a specific zone. I'm working my way through Graph Academy, but need to have a list sooner than I seem to be able to work it out myself :slight_smile:

I have nodes for servers and zones, with the zones having labels Zone, Domain, Forest, and Apex (to somewhat mimic our AD environment). There are five relationship types: IsOn (for zones explicitly configured on a server (meaning server is active and properly configured)), ForwardsTo (with a property of fwdFrom, to link a zone to the server it's configured on), HasNS (links zones with servers that the DNS resolution shows them on (to weed out bad configs where a server no longer exists))., and IsInZone (to show subdomains and servers named within a parent zone.

The graph below shows sort of what I want, but I'm not sure how to get the list of zones that are on the blue server nodes, like in the bottom left corner, or all of the servers from the brown zone nodes in the right corner.
Query: match (n1)-[rel1]-(n2)-[rel2]-(absg:Forest)
where absg.zonename="absg.net"
return n1, rel1,n2, rel2

Thanks!

It would be helpful for you to describe what "is on" means in your query:

"get the list of zones that are on the blue server nodes"

What relationship are you interested in only the IsOn relationship?

match (n1)-[:IsOn]->(absg:Server)
where absg.zonename="absg.net"
return n1

Elaine