Hello :wave: Has anyone managed to build some kin...
# prisma-client
m
Hello 👋 Has anyone managed to build some kind of query builder or query composer? I've found this discussion in Prisma's repo, but it doesn't really have any answer: https://github.com/prisma/prisma/discussions/12047#discussioncomment-3501408 I've tried to describe my use-case in the comment there. Basically I'd like several small repository/service methods that take care of a single responsibility, and can be combined together into a single strongly-typed query/result. I'd be grateful for really any resource on how to design a DRY, reusable repositories/services with Prisma. Thanks!
✅ 1
a
Hey Martin, We do not have an official recommendation or instructions on how to create these kind of reusable services. We are always interested in learning more about these kind of use cases, though! There is a ton of discussion on this and related topics in this existing feature request. It would be great if you could add to the conversation there; it really helps our engineers when we can understand more use cases.
m
Hi Austin, thank you for the reply 🙏 The linked feature request looks to be mostly concerned about sharing common functionality using generic interface, while I'm more interested in unique, domain-specific methods that together build up to a single, type-safe query (or call, to be more precise, which can result in more queries). I'll subscribe to the issue and link my comment from the discussion above just in case it helps in shaping the abstract of the feature request though, thank you.
🚀 1