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/schemas/page.graphql

116 lines
2.1 KiB

# ===============================================
# PAGES
# ===============================================
extend type Query {
pages: PageQuery
}
extend type Mutation {
pages: PageMutation
}
# -----------------------------------------------
# QUERIES
# -----------------------------------------------
type PageQuery {
history(
id: Int!
offsetPage: Int
offsetSize: Int
): PageHistoryResult
list(
filter: String
orderBy: String
): [PageMinimal]
single(
7 years ago
id: Int
path: String
locale: String
isPrivate: Boolean
): Page
}
# -----------------------------------------------
# MUTATIONS
# -----------------------------------------------
type PageMutation {
create(
content: String!
description: String!
editor: String!
7 years ago
isPublished: Boolean!
isPrivate: Boolean!
7 years ago
locale: String!
path: String!
publishEndDate: Date
publishStartDate: Date
tags: [String]!
title: String!
): PageResponse @auth(requires: ["write:pages", "manage:pages", "manage:system"])
update(
id: Int!
content: String
7 years ago
description: String
editor: String
isPrivate: Boolean
7 years ago
isPublished: Boolean
locale: String
path: String
publishEndDate: Date
publishStartDate: Date
tags: [String]
title: String
): PageResponse @auth(requires: ["manage:pages", "manage:system"])
delete(
id: Int!
): DefaultResponse @auth(requires: ["delete:pages", "manage:system"])
}
# -----------------------------------------------
# TYPES
# -----------------------------------------------
type PageResponse {
responseResult: ResponseStatus!
page: Page
}
type PageMinimal {
id: Int!
name: String!
userCount: Int
createdAt: Date!
updatedAt: Date!
}
type Page {
id: Int!
name: String!
rights: [Right]
users: [User]
createdAt: Date!
updatedAt: Date!
}
type PageHistory {
versionId: Int!
authorId: Int!
authorName: String!
actionType: String!
valueBefore: String
valueAfter: String
createdAt: Date!
}
type PageHistoryResult {
trail: [PageHistory]
total: Int!
}