wikijs-fork/server/schemas/resolvers-user.js

22 lines
324 B
JavaScript
Raw Normal View History

2017-08-07 01:05:10 +00:00
'use strict'
/* global wiki */
module.exports = {
Query: {
users(obj, args, context, info) {
return wiki.db.User.findAll({ where: args })
}
},
Mutation: {
createUser(obj, args) {
return wiki.db.User.create(args)
}
2017-08-07 01:05:10 +00:00
},
User: {
2017-08-07 01:05:10 +00:00
groups(usr) {
return usr.getGroups()
}
}
}