Seeking Advice on Optimal Data Enrichment Practices as Project Becomes More Complex
I'm currently refining my approach to data enrichment in our applications and would appreciate your insights and recommendations.
My functions for enriching query results are becoming quite extensive, and I'm considering whether to stick with granular, targeted enrichment functions or to use a more comprehensive single function that fetches all related data regardless of the specific needs of certain queries.
Here’s an example of a more detailed enrichment function I use, mostly for a admin dashbord:
And here's a simpler function that's used mainly in the public app:
I'm also curious to what naming convention people like using for this?
Do you recommend maintaining multiple specific enrichment functions, or should I consolidate them into a single, more comprehensive function?
Looking forward to your thoughts and suggestions!
