vwkd / denokv-graphql

GraphQL bindings for Deno KV
https://deno.land/x/denokv_graphql
MIT License
11 stars 0 forks source link

Delete should cascade #4

Closed vwkd closed 1 year ago

vwkd commented 1 year ago

Currently references aren't updated upon deletion and left dangling.

How to do this? How to find all references to and from deleted row? What to do with circular dependencies?

Or leave finding ids to user, instead accept multiple ids and versionstamps, make one atomic transaction like in https://github.com/vwkd/graphql-denokv/issues/5

vwkd commented 1 year ago

With mutations using atomic transactions https://github.com/vwkd/graphql-denokv/commit/bb3eccd91d8f89a577b048c88210425976b21c77 the user can now delete consistently and not have dangling references, which was the main reason for suggesting cascading.

It's better to not tak the job of cascading away from the user to not take away control and also keep complexity down.