Prisma-like ORM built on top of Deno KV. Allows you to write your database schemas and relations using Zod schemas, and run queries using familiar syntax from Prisma.
So i'm creating a helper function that will include relations on demand. The issue is that with my approach, the relations are not included in the output ```ts // function definition type Include = "chats" | "members" | "subscriptions" | "plans"; export async function getProject( id: string, add: Include[] = [] ) { const include: Record<Include, boolean> | undefined = undefined; if (add.length > 0) { add.forEach((i) => { Object.assign(include!, { [i]: true }); }); } const project = await pentagon.projects.findFirst({ where: { id, }, include: include? include : undefined, }); if (!project) { throw new Error("Project not found"); } return project; } // usage with where id is some valid uuid value const project = await getProject(id ["chats"]); project.chats; ``` I get the following intellisense typescript error in vscode when i hover to **chats** in `project.chats` ```` Property 'chats' does not exist on type 'QueryResponse<{ schema: ZodObject<{ id: ZodDefault<ZodString>; ... 7 more ...; updatedAt: ZodNullable<...>; }, "strip", ZodTypeAny, { ...; }, { ...; }>; relations: { ...; }; }, { ...; }>'.deno-ts(2339) ```
This issue appears to be discussing a feature request or bug report related to the repository. Based on the content, it seems to be resolved. The issue was opened by waptik and has received 1 comments.