added chapter view, fixes, added ratings, added chapter updates/deletions

This commit is contained in:
lnn0q 2025-06-01 00:37:26 +03:00
parent 029b7e9353
commit 4801cf3a13
34 changed files with 1345 additions and 191 deletions

View file

@ -6,12 +6,12 @@ import { toBookSchema } from './mappers/bookMapper';
export async function BookOneResolver(
_: any,
{ id }: QueryBookOneArgs,
{ identity }: IdentityContext
{ req, res, identity }: IdentityContext
): Promise<Book> {
const model = await prisma.book.findUniqueOrThrow({
where: {
id
}
});
return toBookSchema(model);
return toBookSchema(model, { req, res, identity });
}