You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

90 lines
1.8 KiB

6 years ago
6 years ago
6 years ago
6 years ago
  1. # ===============================================
  2. # PAGES
  3. # ===============================================
  4. extend type Query {
  5. pages: PageQuery
  6. }
  7. extend type Mutation {
  8. pages: PageMutation
  9. }
  10. # -----------------------------------------------
  11. # QUERIES
  12. # -----------------------------------------------
  13. type PageQuery {
  14. history(
  15. id: Int!
  16. offsetPage: Int
  17. offsetSize: Int
  18. ): PageHistoryResult @auth(requires: ["manage:system", "read:pages"])
  19. }
  20. # -----------------------------------------------
  21. # MUTATIONS
  22. # -----------------------------------------------
  23. type PageMutation {
  24. create(
  25. content: String!
  26. description: String!
  27. editor: String!
  28. isPublished: Boolean!
  29. isPrivate: Boolean!
  30. locale: String!
  31. path: String!
  32. publishEndDate: Date
  33. publishStartDate: Date
  34. tags: [String]!
  35. title: String!
  36. ): PageResponse @auth(requires: ["write:pages", "manage:pages", "manage:system"])
  37. update(
  38. id: Int!
  39. content: String
  40. description: String
  41. editor: String
  42. isPrivate: Boolean
  43. isPublished: Boolean
  44. locale: String
  45. path: String
  46. publishEndDate: Date
  47. publishStartDate: Date
  48. tags: [String]
  49. title: String
  50. ): PageResponse @auth(requires: ["manage:pages", "manage:system"])
  51. delete(
  52. id: Int!
  53. ): DefaultResponse @auth(requires: ["delete:pages", "manage:system"])
  54. }
  55. # -----------------------------------------------
  56. # TYPES
  57. # -----------------------------------------------
  58. type PageResponse {
  59. responseResult: ResponseStatus!
  60. page: Page
  61. }
  62. type Page {
  63. id: Int!
  64. }
  65. type PageHistory {
  66. versionId: Int!
  67. authorId: Int!
  68. authorName: String!
  69. actionType: String!
  70. valueBefore: String
  71. valueAfter: String
  72. createdAt: Date!
  73. }
  74. type PageHistoryResult {
  75. trail: [PageHistory]
  76. total: Int!
  77. }