sdy

create Group.js

1 +import { prisma } from "../../utils";
2 +
3 +export default {
4 + Group: {
5 + participants: (parent) =>
6 + prisma.group.findOne({ where: { id: parent.id } }).participants(),
7 + messages: (parent) =>
8 + prisma.message.findOne({ where: { id: parent.id } }).messages(),
9 + },
10 +};