import { IdentityContext } from '@app/server/identity'; import { Book } from '@generated/types'; export const books = [ { id: '1', title: 'some-title-1', author: 'someone' }, { id: '2', title: 'some-title-1', author: 'someone' } ]; export async function BooksManyResolver( _: any, __: any, { identity }: IdentityContext ): Promise { if (identity == null) throw new Error('Unauthorized'); return books; }