joshua_b liked a comment+100 XP
4mos ago
How would you refactor this if you only wanted to refetch the number of comments and not the entire project.
Would that even be possible?
joshua_b liked a comment+100 XP
4mos ago
@joshua_b, Comments are related to the projects so no. I can't think of a way where you can grab the comments without querying the project they belong to.
joshua_b wrote a comment+100 XP
4mos ago
How would you refactor this if you only wanted to refetch the number of comments and not the entire project.
Would that even be possible?
joshua_b wrote a comment+100 XP
4mos ago
@daniel-eppler That is the first thing I thought when seeing the function.
On the other hand I can see lots of use-cases where being able to circle between a subset of elements would helpful.
joshua_b liked a comment+100 XP
4mos ago
I tend to like fat models, because I think that they're more than just data, they are "entities". So they perform actions as well. But I extract the code sometimes when it makes sense for me. So, like Povillas would say: it depends.