Hi everyone 👋 What’s the cleanest way to delete ...
# spicedb
j
Hi everyone 👋 What’s the cleanest way to delete all
user → group#editor
tuples for a given group without changing the schema? Current schema (simplified):
Copy code
definition user {}

definition group {
  relation parent:  group
  relation editor:  user

  permission edit = editor + parent->editor
}
I see two approaches: 1. Lookup + batch delete -
LookupSubjects(group:Foo, editor)
→ 1 000 users - Build 1 000
RelationshipUpdate{DELETE …}
entries and write them. 2. Allow wildcard subjects - Change to
relation editor: user | user:*
and delete
group:Foo#editor@user:*
in one call. Option 1 is heavy; option 2 means broadening the schema. Is there a third way to drop all
editor
edges in a single request while keeping the current schema? Thanks!
8 Views