updated codegen, fixed tsconfig, added prisma

added login, registration and session check
This commit is contained in:
lnn0q 2025-03-23 21:06:15 +02:00
parent 9518787206
commit 04b606b7fa
24 changed files with 740 additions and 1747 deletions

View file

@ -1,10 +1,8 @@
import { BookInput, Book } from "@generated/graphql";
import { books } from "./booksManyResolver";
import { Book, QueryBookOneArgs } from '@generated/types';
import { books } from './booksManyResolver';
export async function BookOneResolver(_: any, input: BookInput): Promise<Book> {
console.log("Called 'BookOneResolver' resolver...");
const book = books.filter((item) => item.id === input.id)[0];
export async function BookOneResolver(_: any, { id }: QueryBookOneArgs): Promise<Book> {
const book = books.filter(item => item.id === id)[0];
return book;
}