theming.graphql 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # ===============================================
  2. # THEMES
  3. # ===============================================
  4. extend type Query {
  5. theming: ThemingQuery
  6. }
  7. extend type Mutation {
  8. theming: ThemingMutation
  9. }
  10. # -----------------------------------------------
  11. # QUERIES
  12. # -----------------------------------------------
  13. type ThemingQuery {
  14. themes: [ThemingTheme] @auth(requires: ["manage:theme", "manage:system"])
  15. config: ThemingConfig @auth(requires: ["manage:theme", "manage:system"])
  16. }
  17. # -----------------------------------------------
  18. # MUTATIONS
  19. # -----------------------------------------------
  20. type ThemingMutation {
  21. setConfig(
  22. theme: String!
  23. iconset: String!
  24. darkMode: Boolean!
  25. minTocLevel: Int!
  26. tocLevel: Int!
  27. tocCollapseLevel: Int!
  28. injectCSS: String
  29. injectHead: String
  30. injectBody: String
  31. ): DefaultResponse @auth(requires: ["manage:theme", "manage:system"])
  32. }
  33. # -----------------------------------------------
  34. # TYPES
  35. # -----------------------------------------------
  36. type ThemingConfig {
  37. theme: String!
  38. iconset: String!
  39. darkMode: Boolean!
  40. minTocLevel: Int!
  41. tocLevel: Int!
  42. tocCollapseLevel: Int!
  43. injectCSS: String
  44. injectHead: String
  45. injectBody: String
  46. }
  47. type ThemingTheme {
  48. key: String
  49. title: String
  50. author: String
  51. }