You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wiki/server/graph/resolvers/block.mjs

24 lines
521 B

import { generateError, generateSuccess } from '../../helpers/graph.mjs'
export default {
Query: {
async blocks (obj, args, context) {
return WIKI.db.blocks.query().where({
siteId: args.siteId
})
}
},
Mutation: {
async setBlocksState(obj, args, context) {
try {
// TODO: update blocks state
return {
operation: generateSuccess('Blocks state updated successfully')
}
} catch (err) {
return generateError(err)
}
}
}
}