agonist
agonist
DTDrizzle Team
Created by netwrx on 4/18/2024 in #help
is it possible to do conditional relational queries?
same question here. the query works but typescript isnt happy

const t = await db.query.campaigns.findMany({
where: isNotNull(campaigns.userId),
with: {
user: {
// @ts-ignore
where: eq(users.clerkId, userId),
},
},
});

const t = await db.query.campaigns.findMany({
where: isNotNull(campaigns.userId),
with: {
user: {
// @ts-ignore
where: eq(users.clerkId, userId),
},
},
});
4 replies