Randomly losing types for tables.
I have a mono repo setup for a bill tracking project, it's OSS so you can view it at https://github.com/sungmanito/mono -- part of the monorepo are shared drizzle definitions because I end up using them in more than one place (https://github.com/sungmanito/mono/tree/main/packages/db)
Currently I've lost types for my queries. This is not the first time this has happened, but previously the culprit was that I had upgraded the drizzle-orm version in one package without updating the other(s). Each of the packages and apps are using drizzle-orm
In the main web app I create a drizzle client:
and in the loader functions (sveltekit) I tend to do stuff like
More confusing, is if i take any of the table definitions and just include them in the repo, it works fine.
The types that come back for a typical query, like where I'm loading all the bills, their most recent payment status, and the name of the household associated with that bill, is this
When it should be something more like
Currently I've lost types for my queries. This is not the first time this has happened, but previously the culprit was that I had upgraded the drizzle-orm version in one package without updating the other(s). Each of the packages and apps are using drizzle-orm
0.44.2, confirmed in my pnpm-lockfile that there are no other listed versions. In the main web app I create a drizzle client:
and in the loader functions (sveltekit) I tend to do stuff like
More confusing, is if i take any of the table definitions and just include them in the repo, it works fine.
The types that come back for a typical query, like where I'm loading all the bills, their most recent payment status, and the name of the household associated with that bill, is this
When it should be something more like
Anyone got any ideas?
GitHub
Contribute to sungmanito/mono development by creating an account on GitHub.
GitHub
Contribute to sungmanito/mono development by creating an account on GitHub.