What about complex predicates (and, or)?
The language seems rather limited.
What about complex predicates (and, or)?
The language seems rather limited.
For example, we might have the following query on Facebook's GraphQL schema:
{
user(id: 4) {
followers(isViewerFriend: true, birthdaysInRange: {before: -2, after: 2} orderBy:NAME) {
name
}
}
}
EDIT: fix code formattingWhich fetches Zuck's followers, and filters it to only my friends, and only those friends whose birthdays are within two days of today, and then orders them by name.
The `isViewerFriend`, `birthdaysInRange` and `orderBy` parameters were explicitly added to the API by the API developer for clients to use.
So clients don't have the ability to do arbitrary operators, but we also know that the client is only using functionality in the API that the API developer chose explicitly to allow.
Unless I am missing something, the above query wouldn't work in Relay.
But arbitrary arguments on any other field are totally supported.