page.graphql 1.6 KB

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