wikijs-fork/server/graph/schemas/theming.graphql
2022-12-10 17:03:40 -05:00

57 lines
1.2 KiB
GraphQL

# ===============================================
# THEMES
# ===============================================
extend type Query {
theming: ThemingQuery
}
extend type Mutation {
theming: ThemingMutation
}
# -----------------------------------------------
# QUERIES
# -----------------------------------------------
type ThemingQuery {
themes: [ThemingTheme] @auth(requires: ["manage:theme", "manage:system"])
config: ThemingConfig @auth(requires: ["manage:theme", "manage:system"])
}
# -----------------------------------------------
# MUTATIONS
# -----------------------------------------------
type ThemingMutation {
setConfig(
theme: String!
iconset: String!
darkMode: Boolean!
tocPosition: String
injectCSS: String
injectHead: String
injectBody: String
): DefaultResponse @auth(requires: ["manage:theme", "manage:system"])
}
# -----------------------------------------------
# TYPES
# -----------------------------------------------
type ThemingConfig {
theme: String!
iconset: String!
darkMode: Boolean!
tocPosition: String
injectCSS: String
injectHead: String
injectBody: String
}
type ThemingTheme {
key: String
title: String
author: String
}