added mappers, updated models

This commit is contained in:
lnn0q 2025-05-17 17:16:26 +03:00
parent 6ada519e06
commit a8375b99c2
11 changed files with 306 additions and 120 deletions

View file

@ -1,13 +0,0 @@
import { IdentityContext } from '@app/server/identity';
import { Book, QueryBookOneArgs } from '@generated/types';
import { books } from './booksManyResolver';
export async function BookOneResolver(
_: any,
{ id }: QueryBookOneArgs,
{ identity }: IdentityContext
): Promise<Book> {
const book = books.filter(item => item.id === id)[0];
return book;
}