I have a following situation:
MATCH (post: Post)<-[postRule:POST_RULE]-(rule: Rule) <-[catRule: RULE_CATEGORY]-(category:Category) RETURN post, category
Post has many rules
Rules have many categories
I have an array of allowed categoryIds.
How would I return only the posts that has atleast 1 category per rule of the post?
Graph looks like this:
Red is the post.
Blue is rules (4) of them
Yellow (or brown idk) are categories.
I need my array to match at least 1 yellow one for each blue one