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

76 lines
1.4 KiB
GraphQL
Raw Normal View History

# ===============================================
# NAVIGATION
# ===============================================
extend type Query {
navigation: NavigationQuery
}
extend type Mutation {
navigation: NavigationMutation
}
# -----------------------------------------------
# QUERIES
# -----------------------------------------------
type NavigationQuery {
2020-02-02 21:26:44 +00:00
tree: [NavigationTree]!
2020-04-12 22:05:48 +00:00
config: NavigationConfig!
}
# -----------------------------------------------
# MUTATIONS
# -----------------------------------------------
type NavigationMutation {
updateTree(
2020-02-02 21:26:44 +00:00
tree: [NavigationTreeInput]!
2018-10-19 22:18:55 +00:00
): DefaultResponse @auth(requires: ["manage:navigation", "manage:system"])
2020-04-12 22:05:48 +00:00
updateConfig(
mode: NavigationMode!
): DefaultResponse @auth(requires: ["manage:navigation", "manage:system"])
}
# -----------------------------------------------
# TYPES
# -----------------------------------------------
2020-02-02 21:26:44 +00:00
type NavigationTree {
locale: String!
items: [NavigationItem]!
}
input NavigationTreeInput {
locale: String!
items: [NavigationItemInput]!
}
type NavigationItem {
id: String!
kind: String!
label: String
icon: String
targetType: String
target: String
}
input NavigationItemInput {
id: String!
kind: String!
label: String
icon: String
targetType: String
target: String
}
2020-04-12 22:05:48 +00:00
type NavigationConfig {
mode: NavigationMode!
}
enum NavigationMode {
NONE
TREE
MIXED
}