DT
Drizzle Team•10mo ago
Pieter

$dynamic() select

Hi, I'm trying to build a graphql wrapper for my drizzle datbase and was super stoked to see the $dynamic() query builder. However, doing joins in a wrapper is possible, but I don't see a way to do partial selects with the dynamic api. https://orm.drizzle.team/docs/dynamic-query-building https://orm.drizzle.team/docs/joins#partial-select Is it somehow possible to add to the selection? (without managing selections externally)
Dynamic query building - Drizzle ORM
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.
Joins [SQL] - Drizzle ORM
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.
2 Replies
Pieter
Pieter•10mo ago
In general, I think the selection array should be the easiest to reconcile 🤔
Angelelz
Angelelz•10mo ago
I'm not sure what you are looking for, but this might help you https://github.com/drizzle-team/drizzle-orm/issues/948
GitHub
[FEATURE]: Ability to specify selected fields dynamically · Issue #...
Describe what you want I have a model on my project that fetching users from the database. Each time I need different set of fields and I would like to define a function with generics so only the e...
Want results from more Discord servers?
Add your server