im using Hasura with Postgres
Its possible to allow the users to increment a column in a table only by one and not letting them change the whole number ?
For example im afraid that letting the user "update" the "likes"
mutation update_likes {
update_article(
where: {id: {_eq: 1}},
_inc: {likes: 1}
) {
affected_rows
returning {
id
likes
}
}
}
im scared that the user will be able to modify the query and update the likes to the number he wants.
Thanks!
P.S the code is an example from the official hasura website: https://hasura.io/blog/updating-data-using-mutations-on-hasura-graphql-87c7e22503bc/