ln/app/server/graphql/resolvers/bookOneResolver.ts
lnn0q 04b606b7fa updated codegen, fixed tsconfig, added prisma
added login, registration and session check
2025-03-23 21:06:15 +02:00

8 lines
268 B
TypeScript

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