Opinionated help: Where to place data access functions with respect to tRPC router(s)?
Hey there 👋 I'm currently trying to decide where to place my data access functions with respect to my tRPC routers. Currently, I have them placed at
src/data-access/post/mutate-thing.ts
, and I am wanting to move them into a folder structure like this: src/server/routers/post/functions/mutate-thing.ts
but this feels a bit too nested (maybe not a bad thing) and for someone new to my codebase, this might make it difficult to find these functions.
My routers are all obviously defined at src/server/routers
, and I import my data access functions directly into each procedure within each router. Should I leave these data functions where they are at?0 Replies