Start a conversation

Query Community Policy

Added in 24.11.

Community policy is used to determine if a community member has required permission to archive a message.

If the GraphQL query for the community returns no error, then it implies that the user has permission to archive the content in the community.

Example GraphQL Query

{
  coreNode(id: "community:Docscommunity") {
    id
    title
    ... on Community {
      communityPolicies {
        canArchiveMessage {
          failureReason {
            message
            key
            args
          }
        }
      }
    }
  }
}

The GraphQL response:

{
  "data": {
    "coreNode": {
      "id": "community:Docscommunity",
      "title": "calvin2",
      "communityPolicies": {
        "canArchiveMessage": {
          "failureReason": null
        }
      }
    }
  }
}
Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. ATLAS

  2. Posted
  3. Updated

Comments