In the docs, .patch() is listed for partial updates, .update() for "whole objects."
So if I'm updating 9 of the 10 fields in an object, I guess I use .patch() - but then if I decide to update the last field too I refactor the code to use .update().
Why not just use .patch() all the time? It seems like unnecessary mental cycles to need to remember what .patch() and .update() are for.
We love this library, thanks!
In my mind, it really comes down to consistency/validation. I think the short of it is this: use update() if you are replacing an entire record _and want to validate required attributes as being required_. Otherwise, use patch()! Admittedly I find myself using patch() much more often than update().
You don't need to use update ever. Only use if you want to use json schema's required property.
Most helpful comment
You don't need to use update ever. Only use if you want to use json schema's
requiredproperty.