feat: page history pagination + dark mode fix

This commit is contained in:
Nicolas Giard
2018-11-25 18:25:52 -05:00
parent 78ba895eee
commit 964712905b
5 changed files with 134 additions and 61 deletions

View File

@@ -13,7 +13,8 @@ module.exports = {
async history(obj, args, context, info) {
return WIKI.models.pageHistory.getHistory({
pageId: args.id,
offset: args.offset || 0
offsetPage: args.offsetPage || 0,
offsetSize: args.offsetSize || 100
})
},
async list(obj, args, context, info) {

View File

@@ -17,8 +17,9 @@ extend type Mutation {
type PageQuery {
history(
id: Int!
offset: Int
): [PageHistory]
offsetPage: Int
offsetSize: Int
): PageHistoryResult
list(
filter: String
@@ -107,3 +108,8 @@ type PageHistory {
valueAfter: String
createdAt: Date!
}
type PageHistoryResult {
trail: [PageHistory]
total: Int!
}