feat: search + basic engine (wip)

This commit is contained in:
Nick
2019-03-09 00:51:02 -05:00
parent 6eb6f669e6
commit b5db531234
25 changed files with 766 additions and 108 deletions

View File

@@ -16,7 +16,18 @@ module.exports = {
offsetPage: args.offsetPage || 0,
offsetSize: args.offsetSize || 100
})
}
},
async search (obj, args, context) {
if (WIKI.data.searchEngine) {
return WIKI.data.searchEngine.query(args.query, args)
} else {
return {
results: [],
suggestions: [],
totalHits: 0
}
}
},
},
PageMutation: {
async create(obj, args, context) {