sdy

create common queries in User model

import { prisma } from "../../utils";
export default {
User: {
rooms: ({ id }) => prisma.user.findOne({ where: { id: id } }).rooms(),
messages: ({ id }) => prisma.user.findOne({ where: { id: id } }).messages(),
},
};