Closed msyavuz closed 8 months ago
Try passing schema in the config as shown below
// app.module.ts
import * as schema from "./db/users.schema";
DrizzleTursoModule.register({
tag: "DB",
turso: {
config: {
url: process.env.DB_URL,
authToken: process.env.DB_TOKEN,
},
},
config: {
schema: { ...schema },
},
}),
Thank you, this works
drizzle object has a query property but its an empty object. Typescript shows query as having users but in runtime i get an undefined error for findFirst method. All other methods including select work, just the query field is the problem.
I am not sure if my schema definition or injection has anything to do with it but here they are:
And this is the imported part: