Timothee
07/20/2021, 2:18 PMselect
a substring to not return the whole article in my blog database, how can I achieve this ?
I tried this
return prisma.article.findMany({
orderBy: {
createdAt: 'desc',
},
select: {
createdAt: true,
id: true,
title: true,
updatedAt: true,
content: 'left(content, 15)' as any
},
});
but is says it's expecting true
or false
as a value.
Thanks for the help 🙂HarmanDeep Singh
07/20/2021, 5:12 PMNick
07/21/2021, 12:59 PMTimothee
07/21/2021, 1:11 PM