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??
Suji
Suji355d ago
nvm, i expected relations to get inferred somehow from foreign keys, creations relations in drizzle worked