2017-08-07 01:05:10 +00:00
|
|
|
'use strict'
|
|
|
|
|
|
|
|
/* global wiki */
|
|
|
|
|
|
|
|
module.exports = {
|
2017-08-09 02:36:29 +00:00
|
|
|
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
|
|
|
},
|
2017-08-09 02:36:29 +00:00
|
|
|
User: {
|
2017-08-07 01:05:10 +00:00
|
|
|
groups(usr) {
|
|
|
|
return usr.getGroups()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|