Advanced Querying

It is possible to construct advanced GraphQL queries using the following features.

Comparison Operators

A comparison operator field allows you to define a condition that is more complex than exact equality, such as a range query.

OperatorDescription
gtFinds results where the field is greater than the specified value.
gteFinds results where the field is greater than or equal to the specified value.
ltFinds results where the field is less than the specified value.
lteFinds results where the field is less than or equal to the specified value.
neFinds results where the field is not equal to the specified value.
inFinds results where the field is equal to any value in the specified array.
ninFinds results where the field is not equal to any value in the specified array.
existsFinds documents where the field is not null.

Logical Operators

A logical operator field allows you to define logical combinations of independent QueryInput objects.

OperatorDescription
ANDFinds documents that match all of the provided QueryInput objects.
ORFinds documents that match any of the provided QueryInput objects.
AND Example
OR Example
Copy

Sorting

You can sort in ascending and descending order by any root-level field that does not have a type of object or array.

Example
Copy
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard
  Last updated by Gareth Davies