global hide_deleted: bool;
type SoftDeletable {
deleted: bool;
access policy hide_deleted
allow all
when (global hide_deleted)
using (not .deleted);
}
The above will effectively "hide" objects with `.deleted` set to `true` from all queries when the `hide_deleted` global is set to true.
[1] https://www.phoronix.com/news/Arch-Linux-WoW64-Wine