Is it possible to use the Query API to select many-to-many relations?

In prisma I can do this to select the entities from the "other side" of a many-to-many join:
export const select = {
    id: true,
    email: true,
    name: true,
    teams: {
        select: {
            teamId: true,
            // 👇 here
            team: {
                select: {
                    orgId: true,
                    name: true,
                },
            },
        },
    },
};

I tried the same with Drizzle:
json{
    columns: {
        id: true,
        email: true,
        name: true,
    },
    with: {
        teamConnections: {
            columns: {
                teamId: true,
                // 💥 oops
            },
        },
    }
}

and it seems that Drizzle doesn't know about these? Is there a way to perform deep nesting or do I have to resort to using the Select API?
Was this page helpful?