feat: GraphQL mutations for User + Group
This commit is contained in:
@@ -3,10 +3,17 @@
|
||||
/* global wiki */
|
||||
|
||||
module.exports = {
|
||||
Query(obj, args, context, info) {
|
||||
return wiki.db.User.findAll({ where: args })
|
||||
Query: {
|
||||
users(obj, args, context, info) {
|
||||
return wiki.db.User.findAll({ where: args })
|
||||
}
|
||||
},
|
||||
Type: {
|
||||
Mutation: {
|
||||
createUser(obj, args) {
|
||||
return wiki.db.User.create(args)
|
||||
}
|
||||
},
|
||||
User: {
|
||||
groups(usr) {
|
||||
return usr.getGroups()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user