2018-05-20 18:50:51 -04:00
|
|
|
# ===============================================
|
|
|
|
# PAGES
|
|
|
|
# ===============================================
|
|
|
|
|
|
|
|
extend type Query {
|
|
|
|
pages: PageQuery
|
|
|
|
}
|
|
|
|
|
|
|
|
extend type Mutation {
|
|
|
|
pages: PageMutation
|
|
|
|
}
|
|
|
|
|
|
|
|
# -----------------------------------------------
|
|
|
|
# QUERIES
|
|
|
|
# -----------------------------------------------
|
|
|
|
|
|
|
|
type PageQuery {
|
2018-11-25 01:28:20 -05:00
|
|
|
history(
|
|
|
|
id: Int!
|
2018-11-25 18:25:52 -05:00
|
|
|
offsetPage: Int
|
|
|
|
offsetSize: Int
|
2019-01-12 18:33:30 -05:00
|
|
|
): PageHistoryResult @auth(requires: ["manage:system", "read:pages"])
|
2019-03-09 00:51:02 -05:00
|
|
|
|
|
|
|
search(
|
|
|
|
query: String!
|
|
|
|
path: String
|
|
|
|
locale: String
|
|
|
|
): PageSearchResponse! @auth(requires: ["manage:system", "read:pages"])
|
2019-04-07 18:10:44 -04:00
|
|
|
|
|
|
|
list: [PageListItem!]! @auth(requires: ["manage:system"])
|
2018-05-20 18:50:51 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
# -----------------------------------------------
|
|
|
|
# MUTATIONS
|
|
|
|
# -----------------------------------------------
|
|
|
|
|
|
|
|
type PageMutation {
|
|
|
|
create(
|
2018-07-22 16:25:39 -04:00
|
|
|
content: String!
|
|
|
|
description: String!
|
|
|
|
editor: String!
|
2018-07-22 00:29:39 -04:00
|
|
|
isPublished: Boolean!
|
2018-07-22 16:25:39 -04:00
|
|
|
isPrivate: Boolean!
|
2018-07-22 00:29:39 -04:00
|
|
|
locale: String!
|
2018-05-20 18:50:51 -04:00
|
|
|
path: String!
|
|
|
|
publishEndDate: Date
|
|
|
|
publishStartDate: Date
|
2018-07-22 16:25:39 -04:00
|
|
|
tags: [String]!
|
2018-05-20 18:50:51 -04:00
|
|
|
title: String!
|
2018-10-14 17:38:39 -04:00
|
|
|
): PageResponse @auth(requires: ["write:pages", "manage:pages", "manage:system"])
|
2018-05-20 18:50:51 -04:00
|
|
|
|
|
|
|
update(
|
|
|
|
id: Int!
|
2018-07-22 16:25:39 -04:00
|
|
|
content: String
|
2018-07-22 00:29:39 -04:00
|
|
|
description: String
|
|
|
|
editor: String
|
2018-07-22 21:13:01 -04:00
|
|
|
isPrivate: Boolean
|
2018-07-22 00:29:39 -04:00
|
|
|
isPublished: Boolean
|
|
|
|
locale: String
|
|
|
|
path: String
|
|
|
|
publishEndDate: Date
|
|
|
|
publishStartDate: Date
|
|
|
|
tags: [String]
|
|
|
|
title: String
|
2018-10-14 17:38:39 -04:00
|
|
|
): PageResponse @auth(requires: ["manage:pages", "manage:system"])
|
2018-05-20 18:50:51 -04:00
|
|
|
|
|
|
|
delete(
|
|
|
|
id: Int!
|
2018-10-14 17:38:39 -04:00
|
|
|
): DefaultResponse @auth(requires: ["delete:pages", "manage:system"])
|
2018-05-20 18:50:51 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
# -----------------------------------------------
|
|
|
|
# TYPES
|
|
|
|
# -----------------------------------------------
|
|
|
|
|
|
|
|
type PageResponse {
|
|
|
|
responseResult: ResponseStatus!
|
|
|
|
page: Page
|
|
|
|
}
|
|
|
|
|
|
|
|
type Page {
|
|
|
|
id: Int!
|
|
|
|
}
|
2018-11-25 01:28:20 -05:00
|
|
|
|
|
|
|
type PageHistory {
|
|
|
|
versionId: Int!
|
|
|
|
authorId: Int!
|
|
|
|
authorName: String!
|
|
|
|
actionType: String!
|
|
|
|
valueBefore: String
|
|
|
|
valueAfter: String
|
|
|
|
createdAt: Date!
|
|
|
|
}
|
2018-11-25 18:25:52 -05:00
|
|
|
|
|
|
|
type PageHistoryResult {
|
|
|
|
trail: [PageHistory]
|
|
|
|
total: Int!
|
|
|
|
}
|
2019-03-09 00:51:02 -05:00
|
|
|
|
|
|
|
type PageSearchResponse {
|
|
|
|
results: [PageSearchResult]!
|
|
|
|
suggestions: [String]!
|
|
|
|
totalHits: Int!
|
|
|
|
}
|
|
|
|
|
|
|
|
type PageSearchResult {
|
2019-03-11 00:47:27 -04:00
|
|
|
id: String!
|
2019-03-09 00:51:02 -05:00
|
|
|
title: String!
|
|
|
|
description: String!
|
|
|
|
path: String!
|
|
|
|
locale: String!
|
|
|
|
}
|
2019-04-07 18:10:44 -04:00
|
|
|
|
|
|
|
type PageListItem {
|
|
|
|
id: Int!
|
|
|
|
path: String!
|
|
|
|
locale: String!
|
|
|
|
title: String
|
|
|
|
description: String
|
|
|
|
contentType: String!
|
|
|
|
isPublished: Boolean!
|
|
|
|
isPrivate: Boolean!
|
|
|
|
privateNS: String
|
|
|
|
createdAt: Date!
|
|
|
|
updatedAt: Date!
|
|
|
|
}
|