spicedb
spicedb copied to clipboard
request: language support for inverse relations
The ask
SpiceDB language could have native support to denote the inverse of a relationship
Example:
definition repository {
relation owner: User
}
definition user {
inverse relation repositories: repository#owner
}
The goal
- At very large scale, writing 2 tuples instead of one would incur additional COGS for the underlying database system
- It removes the burden from the client-side to maintain those two relationships. With large and complex schemas, it could be difficult to keep track of all the relationships that need to be written when a new entity is persisted in the application side. As complexity increases, there could be higher chances to have inconsistent data persisted in SpiceDB
Adding a +1 on this issue. We found ourselves needing to add inverse relationships for most of our use-cases.