Remove individual permission fields and arguments from MemberRole API
For the GraphQL MemberRoleCreate
mutation, we accept a permissions
argument for all permissions and we accept arguments for each individual permission.
Likewise, for the MemberRole
type, there exists an enabledPermissions
field that returns all enabled permissions and we have fields for each individual permission.
Reasons to remove the individual permission fields:
-
it is hard to maintain because we need to update the fields and arguments every time we add new permissions.
-
we would keep congruency with the
MemberRoleUpdate
mutation, which soon accepts just thepermissions
Array argument and not the individual permissions. -
it creates the situation where if we mix the two types of passing permissions to the API, the result is unexpected:
The way forward should probably be to remove the individual fields and arguments and only accept the array fields and arguments for mutating and displaying individual permissions in the API.