Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

request: language support for inverse relations #356

Open
vroldanbet opened this issue Dec 28, 2021 · 1 comment
Open

request: language support for inverse relations #356

vroldanbet opened this issue Dec 28, 2021 · 1 comment
Labels
area/schema Affects the Schema Language priority/4 maybe This might get done someday state/gauging interest This needs to be championed before being worked on state/needs discussion This can't be worked on yet

Comments

@vroldanbet
Copy link
Contributor

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
@jzelinskie jzelinskie added area/schema Affects the Schema Language priority/4 maybe This might get done someday state/gauging interest This needs to be championed before being worked on labels Dec 28, 2021
@josephschorr josephschorr added the state/needs discussion This can't be worked on yet label Dec 28, 2021
@jhalleeupgrade
Copy link

Adding a +1 on this issue. We found ourselves needing to add inverse relationships for most of our use-cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/schema Affects the Schema Language priority/4 maybe This might get done someday state/gauging interest This needs to be championed before being worked on state/needs discussion This can't be worked on yet
Projects
None yet
Development

No branches or pull requests

4 participants