sdy

update user functions

......@@ -2,13 +2,11 @@ import { prisma } from "../../utils";
export default {
User: {
rooms: (parent) =>
prisma.user.findOne({ where: { id: parent.id } }).rooms(),
groups: (parent) =>
prisma.user.findOne({ where: { id: parent.id } }).groups(),
messages: (parent) =>
prisma.user.findOne({ where: { id: parent.id } }).messages(),
sender: (parent) =>
prisma.user.findOne({ where: { id: parent.id } }).sender(),
receiver: (parent) =>
prisma.user.findOne({ where: { id: parent.id } }).receiver(),
directMessages: (parent) =>
prisma.user.findOne({ where: { id: parent.id } }).directMessages(),
},
};
......