pathom

:pathom: https://github.com/wilkerlucio/pathom/ & https://pathom3.wsscode.com & https://roamresearch.com/#/app/wsscode
2020-12-15T19:06:20.489100Z

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

2020-12-15T19:07:24.489800Z

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

souenzzo 2020-12-15T20:00:59.489900Z

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

2020-12-15T21:17:46.490100Z

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

2020-12-15T21:19:14.490300Z

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

2020-12-15T21:20:22.490500Z

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

2020-12-15T21:20:49.490700Z

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