vanHessler
vanHessler
Explore posts from servers
DTDrizzle Team
Created by vanHessler on 4/18/2025 in #help
Drizzle-kit incorrectly defaulting to @neondatabase/serverless driver
Ok i found the actual issue. I had accidentally installed the drizzle-kit package and neon-serverless package at a higher directory (the parent directory) of my codebase, and it was defaulting to that for some reason since i hadn't specified drizzle-kit in my repo as a package.
3 replies
DTDrizzle Team
Created by vanHessler on 4/18/2025 in #help
Drizzle-kit incorrectly defaulting to @neondatabase/serverless driver
I think i solved it.. I checked the version of drizzle-kit that was being used (in npx drizzle-kit migrate) and it was v0.27.1 for some reason. I installed locally in the project and its now using 0.31.0 which is working. 🤷‍♂️ not sure why it was using the old version??
3 replies
DTDrizzle Team
Created by snoop on 3/1/2025 in #help
Migration defaulting to neon driver
Ok - for my case, i was running npx drizzle-kit migrate and that must have been using some different version or something. Instead i just did an npm i drizzle-kit and reran it with v0.31.0, and it works now.
3 replies
DTDrizzle Team
Created by snoop on 3/1/2025 in #help
Migration defaulting to neon driver
Hey - did you figure out what this was? I'm running into the same issue right now. I'm sure i have some arbitrary setting somewhere that is breaking things
3 replies
PPrisma
Created by vanHessler on 3/27/2025 in #help-and-questions
Prisma Select TypeError
ohhhhh yes, I didn't even think about that. I appear to be having a brain fart. Thanks! Can mark this one closed or completed or w/e 🙂
8 replies
PPrisma
Created by vanHessler on 3/27/2025 in #help-and-questions
Prisma Select TypeError
yes, that was one of the first things i tried. Still causes issues. Its something to do with the relation nested select bit. I can put my select using type declaration anywhere above the following bit and not have problems:
Bar: {
select: {
id: true,
name: true,
Baz: {
select: {
id: true,
name: true,
},
},
},
}
Bar: {
select: {
id: true,
name: true,
Baz: {
select: {
id: true,
name: true,
},
},
},
}
But if it goes anywhere after it, it causes errors in the Baz level of the results (specifically that property Baz on foo.Bar does not exist. If i put the select before that bit, no errors 🤪
8 replies
PPrisma
Created by TJ on 12/20/2024 in #help-and-questions
TypeScript error when using select argument type
Also, if i move the ...select to just above the Bar part, it works.. Its only if i move it after the relation lookup.
8 replies
PPrisma
Created by TJ on 12/20/2024 in #help-and-questions
TypeScript error when using select argument type
ok - my issue might be unrelated: This works:
function manyFoo(select?: Prisma.fooSelect) {
const builtSelect = {
...select,
id: true,
name: true,
Bar: {
select: {
id: true,
name: true,
Baz: {
select: {
id: true,
name: true
}
}
}
}
} as const satisfies Prisma.fooSelect;
// find many foo
const results = await prisma.foo.findMany({
select: builtSelect,
});
return results.map((foo) => {
return {
...foo,
bar: foo.Bar.name,
baz: foo.Bar.Baz.name,
};
});
}
function manyFoo(select?: Prisma.fooSelect) {
const builtSelect = {
...select,
id: true,
name: true,
Bar: {
select: {
id: true,
name: true,
Baz: {
select: {
id: true,
name: true
}
}
}
}
} as const satisfies Prisma.fooSelect;
// find many foo
const results = await prisma.foo.findMany({
select: builtSelect,
});
return results.map((foo) => {
return {
...foo,
bar: foo.Bar.name,
baz: foo.Bar.Baz.name,
};
});
}
This does not:
function manyFoo(select?: Prisma.fooSelect) {
const builtSelect = {
id: true,
name: true,
Bar: {
select: {
id: true,
name: true,
Baz: {
select: {
id: true,
name: true,
},
},
},
},
...select,
} as const satisfies Prisma.fooSelect;


// find many foo
const results = await prisma.foo.findMany({
select: builtSelect,
});
return results.map((foo) => {
return {
...foo,
bar: foo.Bar.name,
baz: foo.Bar.Baz.name, //<-- ERROR HERE
};
});
}
function manyFoo(select?: Prisma.fooSelect) {
const builtSelect = {
id: true,
name: true,
Bar: {
select: {
id: true,
name: true,
Baz: {
select: {
id: true,
name: true,
},
},
},
},
...select,
} as const satisfies Prisma.fooSelect;


// find many foo
const results = await prisma.foo.findMany({
select: builtSelect,
});
return results.map((foo) => {
return {
...foo,
bar: foo.Bar.name,
baz: foo.Bar.Baz.name, //<-- ERROR HERE
};
});
}
When i move the select param to the bottom after a multiple nested relation lookup, it throws errors for the nested relation.
8 replies
PPrisma
Created by TJ on 12/20/2024 in #help-and-questions
TypeScript error when using select argument type
Hey - sorry to necro here, but i'm having a further issue here:
lets say that i want to pass a select object to a function as an argument. How would i type that parameter? If i set the type on the parameter as Prisma.fooSelect (to let the consumer of the function know what type its expecting), it isn't wanting to be cast as const satisfies Prisma.fooSelect.. It still throws type errors when i try to access the nested properties from the result.
8 replies