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.

94 lines
1.7 KiB

6 years ago
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. list(
  15. filter: String
  16. orderBy: String
  17. ): [PageMinimal]
  18. single(
  19. id: Int
  20. path: String
  21. locale: String
  22. isPrivate: Boolean
  23. ): Page
  24. }
  25. # -----------------------------------------------
  26. # MUTATIONS
  27. # -----------------------------------------------
  28. type PageMutation {
  29. create(
  30. content: String!
  31. description: String!
  32. editor: String!
  33. isPublished: Boolean!
  34. isPrivate: Boolean!
  35. locale: String!
  36. path: String!
  37. publishEndDate: Date
  38. publishStartDate: Date
  39. tags: [String]!
  40. title: String!
  41. ): PageResponse @auth(requires: ["write:pages", "manage:pages", "manage:system"])
  42. update(
  43. id: Int!
  44. content: String
  45. description: String
  46. editor: String
  47. isPrivate: Boolean
  48. isPublished: Boolean
  49. locale: String
  50. path: String
  51. publishEndDate: Date
  52. publishStartDate: Date
  53. tags: [String]
  54. title: String
  55. ): PageResponse @auth(requires: ["manage:pages", "manage:system"])
  56. delete(
  57. id: Int!
  58. ): DefaultResponse @auth(requires: ["delete:pages", "manage:system"])
  59. }
  60. # -----------------------------------------------
  61. # TYPES
  62. # -----------------------------------------------
  63. type PageResponse {
  64. responseResult: ResponseStatus!
  65. page: Page
  66. }
  67. type PageMinimal {
  68. id: Int!
  69. name: String!
  70. userCount: Int
  71. createdAt: Date!
  72. updatedAt: Date!
  73. }
  74. type Page {
  75. id: Int!
  76. name: String!
  77. rights: [Right]
  78. users: [User]
  79. createdAt: Date!
  80. updatedAt: Date!
  81. }