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-04-14 03:05:11 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a1edbe70b201224078f0f896be79b1be7666582d
a1edbe70
1 parent
50b60d8f
init createAccount
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
back/src/api/User/createAccount/createAccount.graphql
back/src/api/User/createAccount/createAccount.js
back/src/api/User/createAccount/createAccount.graphql
0 → 100644
View file @
a1edbe7
type Mutation {
createAccount(
name: String!
email: String!
bio: String
avatarUrl: String
): User!
}
back/src/api/User/createAccount/createAccount.js
0 → 100644
View file @
a1edbe7
import
{
prisma
}
from
"../../../middlewares"
;
export
default
{
Mutation
:
{
createAccount
:
async
(
_
,
args
)
=>
{
const
{
name
,
email
,
bio
=
""
,
avatarUrl
=
""
}
=
args
;
const
user
=
await
prisma
.
user
.
create
({
data
:
{
name
,
email
,
bio
,
avatarUrl
,
},
});
return
user
;
},
},
};
Please
register
or
login
to post a comment