This commit is contained in:
jackbeeby
2025-03-31 16:13:56 +11:00
parent d8773925e8
commit 0b9d543d36
22 changed files with 3203 additions and 32 deletions

View File

@@ -0,0 +1,11 @@
import { generateToken } from '../index.ts';
export const queryResolvers = {
info: () => `This is the API of a Hackernews Clone`,
feed: async (parent, args, context) => {
if (!context.user) {
throw new Error('Not authenticated');
}
return context.prisma.link.findMany();
},
};