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-08-30 23:58:55 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7f58866f80c51fa0a782e7bd43dec21b1d202e0f
7f58866f
1 parent
cd87f398
create createGroup files
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
back/src/api/Group/createGroup/createGroup.graphql
back/src/api/Group/createGroup/createGroup.js
back/src/api/Group/createGroup/createGroup.graphql
0 → 100644
View file @
7f58866
type Mutation {
createGroup(name: String!): Group!
}
back/src/api/Group/createGroup/createGroup.js
0 → 100644
View file @
7f58866
import
{
prisma
,
isAuthenticated
}
from
"../../../utils"
;
export
default
{
Mutation
:
{
createGroup
:
async
(
_
,
args
,
{
request
})
=>
{
isAuthenticated
(
request
);
const
{
user
}
=
request
;
const
{
name
}
=
args
;
return
prisma
.
group
.
create
({
data
:
{
name
,
creator
:
user
,
},
});
},
},
};
Please
register
or
login
to post a comment