Hello, I’m wondering what the best practice is for...
# orm-help
i
Hello, I’m wondering what the best practice is for typing generic helper functions that can operate on any model delegate. Basically what I’m trying to do right now:
Copy code
export function paginatedFindMany<K>(
  delegate: PrismaDelegate<K>,
  where: PrismaWhereInput<K>,
  select ...
) {
  ...
}
It doesn’t look like the client exposes the interfaces needed to type this fully, I’m wondering if there’s another Prisma package or community generator that’s implemented these sorts of generic interfaces
👀 1
d
given that most Prisma commands operate from a single object imperative writing your own helper functions to produce the imperative would be a lot less work than tooling “meta functions” into prisma itself.