updated context
This commit is contained in:
parent
04b606b7fa
commit
40c35bda13
7 changed files with 67 additions and 25 deletions
|
|
@ -1,7 +1,12 @@
|
|||
import { IdentityContext } from '@app/server/identity';
|
||||
import { Book, QueryBookOneArgs } from '@generated/types';
|
||||
import { books } from './booksManyResolver';
|
||||
|
||||
export async function BookOneResolver(_: any, { id }: QueryBookOneArgs): Promise<Book> {
|
||||
export async function BookOneResolver(
|
||||
_: any,
|
||||
{ id }: QueryBookOneArgs,
|
||||
{ identity }: IdentityContext
|
||||
): Promise<Book> {
|
||||
const book = books.filter(item => item.id === id)[0];
|
||||
|
||||
return book;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue