Skip to content

Introduce singleton relationsΒ #2634

@artie-shevchenko

Description

@artie-shevchenko

Problem Statement

That's basically adding a support for "at most once relationship" restriction on a relation. So that if we write a new relationship for a singleton relation that already has an existing one, the existing one is deleted automatically.

Similar to assigning a field value in a Java class - the old value just goes away. That's something everyone is so used to and that's definitely one of the first confusion points for SpiceDB newbies from my experience, that they can't enforce "at most once relationship" restriction for certain relations in SpiceDB schemas.

Solution Brainstorm

Just some sort of a marker on a relation, I don't think I have any preferences for the syntax.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/proposalSomething fundamentally needs to change

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions