Incorrect return type findFrist
Hi!
I just upgraded to
26.0
and I'm refactoring queries to findFirst
where needed. But the return type is not correctly inferred!
The return type is just
see https://imgur.com/a/BlYG4Mj
users schema:
I'm using mysql
with the planetscale
adapterImgur
Untitled Album
4 Replies
Can you show drizzle db creation and imports for it?
This is my
db.ts
file
and I just import it justing import { db } from '$lib/db/db'
(i'm using sveltekit $ is just an allias)You need to pass your tables and relations to 2nd param of drizzle()
You can check: https://orm.drizzle.team/docs/rqb
Relational queries – DrizzleORM
Drizzle ORM | %s
Whoops totally my fault! I was too hyped, and completely missed that part