diff --git a/functions/graphql/resolvers.js b/functions/graphql/resolvers.js index cfb69a8..ac81fee 100644 --- a/functions/graphql/resolvers.js +++ b/functions/graphql/resolvers.js @@ -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 } }); }, },