group.graphql 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. ): [Group]
  18. }
  19. # -----------------------------------------------
  20. # MUTATIONS
  21. # -----------------------------------------------
  22. type GroupMutation {
  23. create(
  24. name: String!
  25. ): GroupResponse
  26. update(
  27. id: Int!
  28. name: String!
  29. ): GroupResponse
  30. delete(
  31. id: Int!
  32. ): DefaultResponse
  33. assignUser(
  34. groupId: Int!
  35. userId: Int!
  36. ): DefaultResponse
  37. unassignUser(
  38. groupId: Int!
  39. userId: Int!
  40. ): DefaultResponse
  41. }
  42. # -----------------------------------------------
  43. # TYPES
  44. # -----------------------------------------------
  45. type GroupResponse {
  46. responseResult: ResponseStatus!
  47. group: Group
  48. }
  49. type Group {
  50. id: Int!
  51. name: String!
  52. rights: [String]
  53. users: [User]
  54. userCount: Int
  55. createdAt: Date!
  56. updatedAt: Date!
  57. }