graph-explorer
graph-explorer copied to clipboard
[Task] Simplify "All" node types search query
When searching using the "All" node label type, we must ensure the resulting set of nodes has a label.
Rather than enforcing all label types:
MATCH (v)
WHERE (v:`Airport` OR v:`Country` OR v:`Region`)
RETURN v AS object
LIMIT 10
We can filter out unlabelled nodes by checking the label set size
MATCH (v)
WHERE size(labels(v)) > 0
RETURN v AS object
LIMIT 10