yeah, there is an optional limit you can
# spicedb
j
yeah, there is an optional limit you can specify
c
yeah i found that option but i'm not getting like a cursor back or something right?
j
no
it chunks the deletes
if you want to specify which rels to delete, call read rels to read them, and use write rels to "manually" delete them
c
basically i want to delete a specific relationship on a resrouce for which there are millions. so now i reading relationship by 1000 and then deleting 1000 in a while loop 🫠 😓
j
so call DeleteRels with a limit of 1000
in a loop
c
and what is the condition to break out of the loop?
is it
deletionProgress = "DELETION_PROGRESS_COMPLETE"
j
yes
c
it seems to be a numerical value
j
its an enum
c
is it exposed? i don't seem to find an import for it in
@authzed/authzed-node
ah found it
v1.DeleteRelationshipsResponse_DeletionProgress
2 Views