Skip to content

Filtering

Filters can be applied on any navigation. The syntax used for filtering is a sub-set of Filtrera.

Below is a list of operators and keywords supported by the query engine.

OperatorDescription
==Equal
!=Not equals
<Less than
<=Less than or equal
>Greater than
>=Greater than or equal
andBoolean “and”
orBoolean “or”
not <expression>Inverse a boolean expression

Filtering by Arrays

The any keyword can be used to work with array fields. For example, let’s say you have a dynamic field containing an array of objects. You can find nodes where any element matches a certain condition:

dynamic->'myArray' any x => x.field == 'some value'

now keyword

now can be used to reference the time of the query. This can be combined with basic arithmetic and durations to query for relative ranges.

To filter for nodes created the last 7 days (assuming the node has a createdAt field):

createdAt > now - 7 days