Amruth Pillai
Explore posts from serversPPrisma
•Created by Amruth Pillai on 6/27/2024 in #help-and-questions
Accessing extended operations on the prisma client with typescript
I'm trying to make some abstract types around the Prisma Client, like so:
But the issue I'm facing is when I try to access any operation that has been extended on the client. For example, I have this
prisma-bark-extension
on the Prisma Client. When I use prisma.modelName.operation
, I see the additional actions provided by the middleware, but import type { Operation } from "@prisma/client/runtime/library";
does not contain a list of them.
Would anyone have an idea on how I can get the extended list of operations?4 replies
DTDrizzle Team
•Created by Amruth Pillai on 3/4/2024 in #help
Is there a way to re-use a specific tables columns in multiple queries across an application?
I'm trying to build a bunch of models/queries like this:
What I want to do is make the
user
selector reusable across the app so that anyone who queries a specific table, will be able to get the same columns and relationships from the user table, maintaining consistency.1 replies