Group.js 275 Bytes
import { prisma } from "../../utils";

export default {
  Group: {
    participants: (parent) =>
      prisma.group.findOne({ where: { id: parent.id } }).participants(),
    messages: (parent) =>
      prisma.message.findOne({ where: { id: parent.id } }).messages(),
  },
};