mirror of https://github.com/requarks/wiki
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.
24 lines
521 B
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)
|
|
}
|
|
}
|
|
}
|
|
}
|