Check/Trigger equivalent to ensure the value of a predicate is always within certain bounds

Hi community, I been working with dgraph and learning more about it.

I want to know if there is a strategy to “protect” the values of a predicate and ensure is never outside a bound, lets say an integer predicate never goes below 0 and if a mutation attempts to set this value, get an error.

Thanks in advance

Hi @ChStark, sorry, we don’t have support for this feature as of now.But we will discuss this internally and check if we can add it.

I hope this can be added soon since it seems relative easy and useful, so a predicate can be protected across mutations