diff options
| author | Adam Soltys <[email protected]> | 2018-02-17 21:08:22 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2018-02-17 21:08:22 -0800 |
| commit | 82ea50b1bfef490009afb48c4fcb7986c764886d (patch) | |
| tree | 9041ddfbb6ad3b6ef5639275adb2aa5b21af7319 | |
| parent | 5441b2fdd310153774eed6e335408253606a4d78 (diff) | |
| download | coinos-server-82ea50b1bfef490009afb48c4fcb7986c764886d.tar.gz coinos-server-82ea50b1bfef490009afb48c4fcb7986c764886d.zip | |
updateUser mutation
| -rw-r--r-- | mutations.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mutations.js b/mutations.js index 70e5e300..0e8765d7 100644 --- a/mutations.js +++ b/mutations.js @@ -40,6 +40,17 @@ module.exports = (db, gqltypes, lnrpc) => { return db['User'].create(user) } }, + updateUser: { + type: gqltypes['users'], + args: { + user: { + type: UserInputType + } + }, + resolve: async (root, { user }) => { + await db['User'].update(user, { where: { username: user.username } }) + } + }, } }) } |
