I have maybe silly question but regardless..
The query is the following:
MATCH (c:Category)<-[:CATEGORY_PERMISSION]-(p:Permission) OPTIONAL MATCH (c)<-[:CATEGORY_STRUCTURE]-(child:Category)<-[:CATEGORY_PERMISSION]-(p2:Permission) RETURN p, p2
I get category and its permissions, then I get children of the category and its permissions.
I want to merge them together when returning and only get distinct values so I have all permissions flattened.