Richard
05/11/2022, 2:02 PMrejectOnNotFound to which of the provided where conditions makes the query return null? (see screenshot with code)Richard
05/11/2022, 2:07 PMconst post = await ctx.prisma.post.findFirst({
where: { authorId },
rejectOnNotFound: (e) => Error(`Unable to find a post for author with id ${authorId}`),
});
2. check second where condition (departmendId) similarly
3. If both don’t throw, I return my actually query with both `where`sRichard
05/11/2022, 2:08 PMAustin
05/11/2022, 8:54 PMRichard
05/12/2022, 10:09 AM