page.graphql 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. ): Page
  21. }
  22. # -----------------------------------------------
  23. # MUTATIONS
  24. # -----------------------------------------------
  25. type PageMutation {
  26. create(
  27. description: String
  28. isPublished: Boolean
  29. locale: String
  30. path: String!
  31. publishEndDate: Date
  32. publishStartDate: Date
  33. tags: [String]
  34. title: String!
  35. ): PageResponse
  36. update(
  37. id: Int!
  38. name: String!
  39. ): DefaultResponse
  40. delete(
  41. id: Int!
  42. ): DefaultResponse
  43. }
  44. # -----------------------------------------------
  45. # TYPES
  46. # -----------------------------------------------
  47. type PageResponse {
  48. responseResult: ResponseStatus!
  49. page: Page
  50. }
  51. type PageMinimal {
  52. id: Int!
  53. name: String!
  54. userCount: Int
  55. createdAt: Date!
  56. updatedAt: Date!
  57. }
  58. type Page {
  59. id: Int!
  60. name: String!
  61. rights: [Right]
  62. users: [User]
  63. createdAt: Date!
  64. updatedAt: Date!
  65. }