TS query types dont match + no return types
I'm trying to query data from my db after importing the Item table from my schema.
const data = await db.select().from(Item)
As you can see in the screenshot and the error message below typescript seems to have trouble with that. Item
table definition is being imported from another typescript project within the repo which might have to do with it?
4 Replies
Currently, you cannot use multiple instances of Drizzle in the same project
Also, if it errors on the type level, it means those are two different versions with incompatible types
ah great call, yeah making sure all versions are the same across projects indeed got rid of the type error. Thank you 🙏
That's interesting. It does seem to work with the setup I have right now for some reason 🤔 We have 2 databases we need to connect to and as far as I can tell it works as expected. Is proper multi instance support something that is planned then? Couldn't find an open issue for it so figured I'd ask :)
GitHub
Remove
instanceof
checks to allow for multiple drizzle-orm instan...Primary use case is monorepos
Subscribed, appreciate it!