can you Infer relations?

im really loving how drizzle plays well with relations, but im wondering is there a way to get types for relations? in prisma you can use Prisma.YourModelGetPayload<{}> to generate a type with relations, is this possible with infermodel? i tired the most obvious way and that didnt work
InferModel<typeof userRelations>;
InferModel<typeof userRelations>;
bloberenober
bloberenober351d ago
Not possible at the moment, but it's a good thing to have, will add it to backlog
ejoo
ejoo288d ago
I do it likes this
type Post = InferModel<typeof schema.posts> & {author: InferModel<typeof schema.users>} & {likes: InferModel<typeof schema.likes>[]};
type Post = InferModel<typeof schema.posts> & {author: InferModel<typeof schema.users>} & {likes: InferModel<typeof schema.likes>[]};