sdy

create Message parent resolver

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