Is it possible to do this transformation using `db.query`?

Hello! Can I get rid of other columns and keep only tag?
return ctx.db.query.bookmark.findMany({
with: {
tags: {
with: {
tag: {
columns: { id: true, name: true },
},
},
},
},
});
return ctx.db.query.bookmark.findMany({
with: {
tags: {
with: {
tag: {
columns: { id: true, name: true },
},
},
},
},
});
to get:
{
...
tags: [
{ id: '..', name: 'terminal' },
],
}
{
...
tags: [
{ id: '..', name: 'terminal' },
],
}
No description
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?