I have a query that looks like this:
query ($email: String!) {
users(where: {email: {_eq: $email}}, limit: 1) {
id
email
name
clients {
id
}
}
}
and when executed returns something like this:
{
"data": {
"users": [
{
"id": 2,
"email": "abc@gmail.com",
"name": "Billy",
"clients": [
{
"id": 1
},
{
"id": 2
},
{
"id": 3
}
]
}
]
}
}
Is there a way to modify the query and/or hasura so that the clients
array is an array of numbers instead of an array of objects so it looks like this (clients
is another table not a jsonb field)?
{
"data": {
"users": [
{
"id": 2,
"email": "abc@gmail.com",
"name": "Billy",
"clients": [1, 2, 3]
}
]
}
}