theming.graphql 1.14 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
# ===============================================
# THEMES
# ===============================================

extend type Query {
  theming: ThemingQuery
}

extend type Mutation {
  theming: ThemingMutation
}

# -----------------------------------------------
# QUERIES
# -----------------------------------------------

type ThemingQuery {
18 19
  themes: [ThemingTheme] @auth(requires: ["manage:theme", "manage:system"])
  config: ThemingConfig @auth(requires: ["manage:theme", "manage:system"])
20 21 22 23 24 25 26 27 28
}

# -----------------------------------------------
# MUTATIONS
# -----------------------------------------------

type ThemingMutation {
  setConfig(
    theme: String!
29
    iconset: String!
30
    darkMode: Boolean!
31 32 33
    injectCSS: String
    injectHead: String
    injectBody: String
34
  ): DefaultResponse @auth(requires: ["manage:theme", "manage:system"])
35 36 37 38 39 40 41
}

# -----------------------------------------------
# TYPES
# -----------------------------------------------

type ThemingConfig {
42
  theme: String!
43
  iconset: String!
44 45 46 47
  darkMode: Boolean!
  injectCSS: String
  injectHead: String
  injectBody: String
48 49 50 51 52 53 54
}

type ThemingTheme {
  key: String
  title: String
  author: String
}