Showing
1 changed file
with
12 additions
and
0 deletions
back/src/api/Room/Room.js
0 → 100644
1 | +import { prisma } from "../../utils"; | ||
2 | + | ||
3 | +export default { | ||
4 | + Room: { | ||
5 | + categories: (parent) => | ||
6 | + prisma.room.findOne({ where: { id: parent.id } }).categories(), | ||
7 | + messages: (parent) => | ||
8 | + prisma.room.findOne({ where: { id: parent.id } }).messages(), | ||
9 | + participants: (parent) => | ||
10 | + prisma.room.findOne({ where: { id: parent.id } }).participants(), | ||
11 | + }, | ||
12 | +}; |
-
Please register or login to post a comment