2
0

page.graphql 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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
  19. list(
  20. filter: String
  21. orderBy: String
  22. ): [PageMinimal]
  23. single(
  24. id: Int
  25. path: String
  26. locale: String
  27. isPrivate: Boolean
  28. ): Page
  29. }
  30. # -----------------------------------------------
  31. # MUTATIONS
  32. # -----------------------------------------------
  33. type PageMutation {
  34. create(
  35. content: String!
  36. description: String!
  37. editor: String!
  38. isPublished: Boolean!
  39. isPrivate: Boolean!
  40. locale: String!
  41. path: String!
  42. publishEndDate: Date
  43. publishStartDate: Date
  44. tags: [String]!
  45. title: String!
  46. ): PageResponse @auth(requires: ["write:pages", "manage:pages", "manage:system"])
  47. update(
  48. id: Int!
  49. content: String
  50. description: String
  51. editor: String
  52. isPrivate: Boolean
  53. isPublished: Boolean
  54. locale: String
  55. path: String
  56. publishEndDate: Date
  57. publishStartDate: Date
  58. tags: [String]
  59. title: String
  60. ): PageResponse @auth(requires: ["manage:pages", "manage:system"])
  61. delete(
  62. id: Int!
  63. ): DefaultResponse @auth(requires: ["delete:pages", "manage:system"])
  64. }
  65. # -----------------------------------------------
  66. # TYPES
  67. # -----------------------------------------------
  68. type PageResponse {
  69. responseResult: ResponseStatus!
  70. page: Page
  71. }
  72. type PageMinimal {
  73. id: Int!
  74. name: String!
  75. userCount: Int
  76. createdAt: Date!
  77. updatedAt: Date!
  78. }
  79. type Page {
  80. id: Int!
  81. name: String!
  82. rights: [Right]
  83. users: [User]
  84. createdAt: Date!
  85. updatedAt: Date!
  86. }
  87. type PageHistory {
  88. versionId: Int!
  89. authorId: Int!
  90. authorName: String!
  91. actionType: String!
  92. valueBefore: String
  93. valueAfter: String
  94. createdAt: Date!
  95. }
  96. type PageHistoryResult {
  97. trail: [PageHistory]
  98. total: Int!
  99. }