import { generateToken } from '../index.ts';

export const queryResolvers = {
  info: () => `This is the API of a Hackernews Clone`,
  feed: async (parent, args, context) => {
    if (!context.authenticate) {
      throw new Error('Not authenticated');
    }
    return context.prisma.account.findMany();
  },
};
