Is there a way in Hasura to run something such as a having
which filters the results after all the data is returned after the where?
query {
applications {
permissions {
user {
id
first
last
}
}
}
}
I have a query where I want to return an application only if the current user is in the list of applications.permissions.user
.
The below pseudo sql is something that I am looking for.
select * from ... where ... having applicaitons.permissions.user in permissions;
As of now I am getting an array that looks something like this:
{
"applications": [
{
"permissions": [
{ "user": null }
]
},
{
"permissions": [
{ "user": {"id":123,"first":"Billy","last":"Joe"} }
]
}
]
}
What I would like is an array that looks like this (where "id" is the current user):
{
"applications": [
{
"permissions": [
{ "user": {"id":123,"first":"Billy","last":"Joe"} }
]
}
]
}