wikijs-fork/server/graph/schemas/storage.graphql

70 lines
1.4 KiB
GraphQL
Raw Normal View History

2018-06-26 02:04:47 +00:00
# ===============================================
# STORAGE
# ===============================================
extend type Query {
storage: StorageQuery
}
extend type Mutation {
storage: StorageMutation
}
# -----------------------------------------------
# QUERIES
# -----------------------------------------------
type StorageQuery {
targets(
filter: String
orderBy: String
2018-10-14 21:38:39 +00:00
): [StorageTarget] @auth(requires: ["manage:system"])
2019-02-17 06:32:35 +00:00
status: [StorageStatus] @auth(requires: ["manage:system"])
2018-06-26 02:04:47 +00:00
}
# -----------------------------------------------
# MUTATIONS
# -----------------------------------------------
type StorageMutation {
updateTargets(
2019-02-17 06:32:35 +00:00
targets: [StorageTargetInput]!
2018-10-14 21:38:39 +00:00
): DefaultResponse @auth(requires: ["manage:system"])
2018-06-26 02:04:47 +00:00
}
# -----------------------------------------------
# TYPES
# -----------------------------------------------
type StorageTarget {
2019-02-03 22:08:06 +00:00
isAvailable: Boolean!
2018-06-26 02:04:47 +00:00
isEnabled: Boolean!
key: String!
title: String!
description: String
logo: String
website: String
2019-02-03 22:08:06 +00:00
supportedModes: [String]
2018-06-26 02:04:47 +00:00
mode: String
2019-02-17 06:32:35 +00:00
hasSchedule: Boolean!
syncInterval: String
syncIntervalDefault: String
2018-06-26 02:04:47 +00:00
config: [KeyValuePair]
}
input StorageTargetInput {
isEnabled: Boolean!
key: String!
mode: String!
2019-02-17 06:32:35 +00:00
syncInterval: String
2018-06-26 02:04:47 +00:00
config: [KeyValuePairInput]
}
2019-02-17 06:32:35 +00:00
type StorageStatus {
key: String!
title: String!
status: String!
message: String
}