May 18, 2021
Brett, you're totally right! But I think this is always the case with a schema-less database. My thoughts on this are if you change a type that is not backwards compatible, you should be also doing some data transforms in the DB to make sure everything is consistent :)
At all of my API endpoints I use Joi which is similar to Yup to validate data coming in.