Prisma2 preview 15 introduced mapping of DateTime to JS Date:
console.log(result1[0].posts);
const result2 = await photon.users.findMany({
select: {
id: true,
posts: { last: 1 },
},
});
console.log(result2[0].posts);

But when using the where option in find, I receive the date as a string which breaks my API:
const result1 = await photon.users.findMany({
where: {
id: { in: ["ck24ojnxx000360da79ze73gb", "ck24ojnxl000060damtkztmqs"] },
},
select: {
id: true,
posts: { last: 1 },
},
});
console.log(result1[0].posts);

Fixed in latest alpha.
You can try it out with npm i -g prisma2@alpha.
Most helpful comment
Fixed in latest alpha.
You can try it out with
npm i -g prisma2@alpha.