refactor, added slate, added editor, added book

This commit is contained in:
lnn0q 2025-05-28 23:25:46 +03:00
parent bc250e73bb
commit 029b7e9353
33 changed files with 714 additions and 496 deletions

View file

@ -1,17 +0,0 @@
import { IdentityContext } from '@app/server/identity';
import { prisma } from '@app/server/prisma/client';
import { BookChapter, QueryBookChapterOneArgs } from '@generated/types';
import { toBookChapterSchema } from './mappers/bookChapterMapper';
export async function BookChapterOneResolver(
_: any,
{ id }: QueryBookChapterOneArgs,
{ identity }: IdentityContext
): Promise<BookChapter> {
const model = await prisma.bookChapter.findUniqueOrThrow({
where: {
id
}
});
return toBookChapterSchema(model);
}