Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-1-capstone-design1
/
Triz_Project1
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
sdy
2020-05-28 16:55:02 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4ed50e0e5928925e941e0c5da45ea4d8a3c21f5e
4ed50e0e
1 parent
43c6d327
update User paretn resolver
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
back/src/api/User/User.js
back/src/api/User/User.js
View file @
4ed50e0
...
...
@@ -2,7 +2,13 @@ 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
(),
rooms
:
(
parent
)
=>
prisma
.
user
.
findOne
({
where
:
{
id
:
parent
.
id
}
}).
rooms
(),
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
(),
},
};
...
...
Please
register
or
login
to post a comment