> ## Documentation Index
> Fetch the complete documentation index at: https://docs.opigno.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Leave the community

Once the user joined the community and became its member, they can leave the community.
In this case community posts and comments, created by the user before, will be presaved and still returned in the
[`getCommunityPosts`](/OpignoEnterpriseAPI/Community/GetCommunityPosts) query results. However, the user will not be able
to create a new posts in the same community.

<Note>
  The community owner cannot leave the community. The mutation is available only for the community members.
</Note>

To leave the community, `leaveCommunity` mutation should be executed.
It accepts one required incoming parameter - `communityId` that represents ID of the community to be left by the current API user.

<CodeGroup>
  ```filename GraphQL theme={null}
    mutation leaveCommunity {
      leaveCommunity(communityId: 1) {
        response
        errors
      }
    }
  ```

  ```File Query result [expandable] theme={null}
  {
    "data": {
      "leaveCommunity": {
        "response": true
        "errors": []
      }
    }
  }
  ```
</CodeGroup>

If the mutation executed without any errors, a boolean value will be returned as a response, indicating the execution status.

<Note>
  The user can join the same community again or be invited to this community after they left it.
</Note>
