sdy

create getCategories

1 +type Query {
2 + getCategories: [Category]
3 +}
1 +import { prisma } from "../../../utils";
2 +
3 +export default {
4 + Query: {
5 + getCategories: async (_, __) => {
6 + return prisma.category.findMany();
7 + },
8 + },
9 +};