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/search.mjs

17 lines
391 B

import { generateError, generateSuccess } from '../../helpers/graph.mjs'
export default {
Mutation: {
async rebuildSearchIndex (obj, args, context) {
try {
await WIKI.data.searchEngine.rebuild()
return {
responseResult: generateSuccess('Index rebuilt successfully')
}
} catch (err) {
return generateError(err)
}
}
}
}