wikijs-fork/server/schemas/resolvers-user.js
2017-08-12 17:26:27 -04:00

22 lines
324 B
JavaScript

'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)
}
},
User: {
groups(usr) {
return usr.getGroups()
}
}
}