Doent infer type in Callback syntax for query

Im querying the users table like this db.query.user.findFirst({ where: (user, { eq }) => { return eq(user.email, whereArgs?.email); }, }) in the where callback param user is typed as never ?? ive setup drizzle like this import * as schema from '@/db/schema'; const db = drizzle(pool, { schema }); any idea why this is the case??
1 Reply
Suji
SujiOP2y ago
nvm, i expected relations to get inferred somehow from foreign keys, creations relations in drizzle worked
Want results from more Discord servers?
Add your server