I have a requirement where I need two operators(_and and _or) based on the inputs.
So is it possible to pass operator as variable/parameter in hasura graphql?
I am passing "match" variable, the requirement is I should be able to pass "_or" or "_and" based on the some click and also if this is possible then please write down the "Type" of the operator.
query Search($match: String) {
restaurants(where: {_or: [{cuisine: {_ilike: $match}}, {name: {_ilike: $match}}]}) {
cuisine
id
name
reviews {
body
}
}
}
#variable
{
"match":"%woodland%"
}