Obtain vertices from n classes

Hello, good morning. I’m doing a consultation and I would like to know if there is any way to get vertices of n types using match. For example, let’s think that we have an arrangement of classes [‘Users’, ‘People’, ‘Managers’].
I would like to use this arrangement to limit the results to only those classes.
MATCH {class: [‘Users’, ‘People’, ‘Managers’] } RETURN $matches
Is there anything that could be adapted to this?
Thank you.

Hi @isaactzab

as of now, MATCH does not support multiple classes as target, so you have to use a work-around.

Of course, if you have a class hierarchy, you can use a superclass so that the query will also apply to subclasses.

An alternative is to do multiple queries with LET statements and use a unionAll(), eg.

SELECT unionAll($a, $b, $c)
LET
$a = (select …),
$b = (select …),
$b = (select …)

I hope it helps

Thanks

Luigi