I'm a newbie in GraphQL and I was wondering if there is a easy way to query with "dynamic conditions".
For exemple, on GraphiQL I can query for :
query {
users{
name
age
}
}
And It will bring me a list of all users
{
"data": {
"users": [
{
"name": "Luis Coimbra",
"age": 15
},
{
"name": "Sebastião Campagnucci",
"age": 50
},
{
"name": "Giovana Ribeiro",
"age": 30
}
]
}
}
But is there an easy way for me to bring only, for example, users who are above 18 or any other age ?
An expected solution would be:
query {
users{
name
age > 18
}
}
Haven't found anything like that on documentation...
minAge
,maxAge
- it's resolver role to 'react' (use) conditionally when this optional parameters are defined. – Sentimentalism