Is it a good practice to mutate or transform data inside a resource like the price calculation?. I always try to keep the resource clear and just use it as mapping..
It's your personal preference on which level to transform the data.
Resources were created instead of API data transformation packages that were popular earlier. But if you prefer to do it elsewhere, totally ok.
Is it a good practice to mutate or transform data inside a resource like the price calculation?. I always try to keep the resource clear and just use it as mapping..
It's your personal preference on which level to transform the data. Resources were created instead of API data transformation packages that were popular earlier. But if you prefer to do it elsewhere, totally ok.