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.

81 lines
1.2 KiB

  1. # ===============================================
  2. # GROUPS
  3. # ===============================================
  4. extend type Query {
  5. groups: GroupQuery
  6. }
  7. extend type Mutation {
  8. groups: GroupMutation
  9. }
  10. # -----------------------------------------------
  11. # QUERIES
  12. # -----------------------------------------------
  13. type GroupQuery {
  14. list(
  15. filter: String
  16. orderBy: String
  17. ): [GroupMinimal]
  18. single(
  19. id: Int!
  20. ): Group
  21. }
  22. # -----------------------------------------------
  23. # MUTATIONS
  24. # -----------------------------------------------
  25. type GroupMutation {
  26. create(
  27. name: String!
  28. ): GroupResponse
  29. update(
  30. id: Int!
  31. name: String!
  32. ): DefaultResponse
  33. delete(
  34. id: Int!
  35. ): DefaultResponse
  36. assignUser(
  37. groupId: Int!
  38. userId: Int!
  39. ): DefaultResponse
  40. unassignUser(
  41. groupId: Int!
  42. userId: Int!
  43. ): DefaultResponse
  44. }
  45. # -----------------------------------------------
  46. # TYPES
  47. # -----------------------------------------------
  48. type GroupResponse {
  49. responseResult: ResponseStatus!
  50. group: Group
  51. }
  52. type GroupMinimal {
  53. id: Int!
  54. name: String!
  55. userCount: Int
  56. createdAt: Date!
  57. updatedAt: Date!
  58. }
  59. type Group {
  60. id: Int!
  61. name: String!
  62. rights: [Right]
  63. users: [User]
  64. createdAt: Date!
  65. updatedAt: Date!
  66. }