feat: history version diff
This commit is contained in:
@@ -21,6 +21,15 @@ module.exports = {
|
||||
offsetSize: args.offsetSize || 100
|
||||
})
|
||||
},
|
||||
/**
|
||||
* PAGE VERSION
|
||||
*/
|
||||
async version(obj, args, context, info) {
|
||||
return WIKI.models.pageHistory.getVersion({
|
||||
pageId: args.pageId,
|
||||
versionId: args.versionId
|
||||
})
|
||||
},
|
||||
/**
|
||||
* SEARCH PAGES
|
||||
*/
|
||||
|
@@ -19,7 +19,12 @@ type PageQuery {
|
||||
id: Int!
|
||||
offsetPage: Int
|
||||
offsetSize: Int
|
||||
): PageHistoryResult @auth(requires: ["manage:system", "read:pages"])
|
||||
): PageHistoryResult @auth(requires: ["manage:system", "read:history"])
|
||||
|
||||
version(
|
||||
pageId: Int!
|
||||
versionId: Int!
|
||||
): PageVersion @auth(requires: ["manage:system", "read:history"])
|
||||
|
||||
search(
|
||||
query: String!
|
||||
@@ -150,7 +155,7 @@ type Page {
|
||||
isPublished: Boolean!
|
||||
privateNS: String
|
||||
publishStartDate: Date!
|
||||
publishEndDate: String!
|
||||
publishEndDate: Date!
|
||||
tags: [PageTag]!
|
||||
content: String!
|
||||
render: String
|
||||
@@ -186,6 +191,27 @@ type PageHistory {
|
||||
createdAt: Date!
|
||||
}
|
||||
|
||||
type PageVersion {
|
||||
action: String!
|
||||
authorId: String!
|
||||
authorName: String!
|
||||
content: String!
|
||||
contentType: String!
|
||||
createdAt: Date!
|
||||
description: String!
|
||||
editor: String!
|
||||
isPrivate: Boolean!
|
||||
isPublished: Boolean!
|
||||
locale: String!
|
||||
pageId: Int!
|
||||
path: String!
|
||||
publishEndDate: Date!
|
||||
publishStartDate: Date!
|
||||
tags: [String]!
|
||||
title: String!
|
||||
versionId: Int!
|
||||
}
|
||||
|
||||
type PageHistoryResult {
|
||||
trail: [PageHistory]
|
||||
total: Int!
|
||||
|
Reference in New Issue
Block a user