updated codegen, fixed tsconfig, added prisma
added login, registration and session check
This commit is contained in:
parent
9518787206
commit
04b606b7fa
24 changed files with 740 additions and 1747 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue