# =============================================== # GROUPS # =============================================== extend type Query { groups( filter: String orderBy: String ): [Group] groupById( id: Int! ): Group } extend type Mutation { createGroup( name: String! ): GroupResponse updateGroup( id: Int! patch: GroupUpdateInput! ): DefaultResponse deleteGroup( id: Int! ): DefaultResponse assignUserToGroup( groupId: Int! userId: Int! ): DefaultResponse unassignUserFromGroup( groupId: Int! userId: Int! ): DefaultResponse } # ----------------------------------------------- # TYPES # ----------------------------------------------- type GroupResponse { operation: Operation group: Group } type Group { id: Int name: String isSystem: Boolean redirectOnLogin: String permissions: [String] pageRules: [PageRule] users: [UserMinimal] createdAt: Date updatedAt: Date } type PageRule { id: String deny: Boolean match: PageRuleMatch roles: [String] path: String locales: [String] } input GroupUpdateInput { name: String! redirectOnLogin: String! permissions: [String]! pageRules: [PageRuleInput]! } input PageRuleInput { id: String! deny: Boolean! match: PageRuleMatch! roles: [String]! path: String! locales: [String]! } enum PageRuleMatch { START EXACT END REGEX TAG }