Filtering
Basic
Supported by:
Basic filtering by field(s) values:
{people(country: "🇺🇸USA",vegan: true) {name}}
You can also filter List-based values such as Multi-selects, Lookups and Relationships (by default an AND operation, if you need more advanced filtering see DSL below):
{people(friends: ["daniel", "peter"]) {namefriends {name}}}
Advanced DSL
Supported by:
We support a filtering DSL similar to MongoDB (opens in a new tab) and Hasura (opens in a new tab) via _filter
operator:
{people(_filter: {_and: [{_or: [{vegan: {_eq: true}}{city: {_nin: ["Los Angeles", "Monterrey"]}}]},{netWorth: {_gte: 5000}}]}) {name}}
Supported Operators
Comparison
- Equality:
_eq
,_ne
- Greater than or less:
_gt
,_gte
,_lt
,_lte
- List-based:
_in
,_nin
Logical
- Group:
_and
,_or