I'm querying some data which have nodes of class 'Record' and relationships of class 'RecordAssociation'. These associations have labels on.
From a starting point I need to find every node with an incoming relation to that starting point, plus every node pointing to those nodes, etc. etc., with both node and relationship constrained to those of a particular label.
Looking at Expand paths - APOC Extended Documentation, I'd guess that the relationship and node filters might help here. I'm already using this statement to find all incoming and outgoing relations to a particular node:
MATCH (r:Record {record_id: $id}) CALL apoc.path.expand(r, null, null, 0, 3) YIELD path RETURN path, length(path) AS hops ORDER BY hops;
What's not clear to me from that documentation is how I might construct filters for nodes on a specific field ('registry') and also relations ('label'). Can anyone suggest how?
Of course, APOC might not be the correct solution so any other suggestions would be welcome.