merge: branch 'graphql-functions' of github.com:bumi/makers.bolt.fun into graphql-functions

This commit is contained in:
Johns Beharry
2021-11-28 13:22:32 -06:00

View File

@@ -35,13 +35,16 @@ module.exports = {
return context.prisma.category.findMany();
},
allProjects: async (_source, args, context) => {
return context.prisma.project.findMany();
return context.prisma.project.findMany({
include: { category: true }
});
},
getProject: async (_source, args, context) => {
return context.prisma.project.findUnique({
where: {
id: args.id,
},
include: { category: true }
});
},
},