Any advice for using TypeScript with Prisma? I've ...
# orm-help
j
Any advice for using TypeScript with Prisma? I've gotten some basic relational types setup for my project, but I can't seem to find a way to include things like a
count
for this kind of type:
Copy code
const topicWithResources = Prisma.validator<Prisma.TopicArgs>()({
  include: {
    resources: true,
  },
});

export type TopicWithResources = Prisma.TopicGetPayload<
  typeof topicWithResources
>;
also, creating all these types for different
includes
seems unscalable to me
r
Using
GetPayload
types is the way to go for now.