Files
Job_App/src copy/resolvers/queryResolvers.ts
jackbeeby 0b9d543d36 update
2025-03-31 16:13:56 +11:00

12 lines
302 B
TypeScript

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();
},
};