Comparison
Less than to read
Comparison operators are used to fetch specific objects based on greater or lesser than comparisons of a specific field.
In GraphQL, _gt (greater than), _gte (greater than or equal to), _lt (lesser than) and _lte (lesser than or equal to) are the comparison operators.
The following tables displays examples and results of applying filters with comparison operators. Some of the fields displayed are not mandatory and others have been omitted.
|
|
|
|
In the above example, the _and operator is mandatory because the two conditions - _gt and _lt - are applied to the same field.