page.graphql 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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. description: String
  31. editor: String
  32. isPublished: Boolean!
  33. isPrivate: Boolean
  34. locale: String!
  35. path: String!
  36. publishEndDate: Date
  37. publishStartDate: Date
  38. tags: [String]
  39. title: String!
  40. ): PageResponse
  41. update(
  42. id: Int!
  43. description: String
  44. editor: String
  45. isPublished: Boolean
  46. locale: String
  47. path: String
  48. publishEndDate: Date
  49. publishStartDate: Date
  50. tags: [String]
  51. title: String
  52. ): DefaultResponse
  53. delete(
  54. id: Int!
  55. ): DefaultResponse
  56. }
  57. # -----------------------------------------------
  58. # TYPES
  59. # -----------------------------------------------
  60. type PageResponse {
  61. responseResult: ResponseStatus!
  62. page: Page
  63. }
  64. type PageMinimal {
  65. id: Int!
  66. name: String!
  67. userCount: Int
  68. createdAt: Date!
  69. updatedAt: Date!
  70. }
  71. type Page {
  72. id: Int!
  73. name: String!
  74. rights: [Right]
  75. users: [User]
  76. createdAt: Date!
  77. updatedAt: Date!
  78. }