Fork me on GitHub
#pathom
<
2020-12-15
>
royalaid19:12:20

Hey all, what is the best pratice around handling a very general operation like dissocing a key via pathom?

souenzzo20:12:59

What you are trying to do? Can't you just dissoc from final result?

royalaid21:12:46

A mutation in the db, we want to actually dissoc from the data at rest

royalaid21:12:14

and we can’t depend the absence of a key corresponding to an implied dissoc in the case of an update because partial updates are possible

royalaid21:12:22

so client sends up (entity/update {:e/uuid "XXX" :e/joined-obj :pathom.ops/dissoc})

royalaid21:12:49

and it would remove the :e/joined-obj key from the object at rest

royalaid19:12:24

Current ideas we have had were using something like an op value such as ::pathom.op/dissoc or overloading nil