The community owner or a user associated with ADMINISTRATOR scope can remove other community members.
The community owner cannot be removed from the community.
In this case community posts and comments, created by the user before, will be presaved and still returned in the getCommunityPosts query results. However, the user will not be able to create a new posts in the same community. To remove the community member, removeCommunityMember mutation should be executed. It accepts the following arguments:
ArgumentTypeDescription
communityIdIDRequired. ID of the community to remove a member from.
userContextIdIDRequired. ID of the context associated with the user who should be removed from the community members list.
  mutation removeCommunityMember {
    removeCommunityMember(communityId: 1, userContextId: 345) {
      response
      errors
    }
  }
If the mutation executed without any errors, a boolean value will be returned as a response, indicating the execution status.
The user can join the same community again or be invited to this community after they were removed from the members list.