Start a conversation

Using the Grouphub

Grouphub (also known as group in UI) is where people with common interests engage to discuss their recent activity, discussions, and so on.

There are three types of grouphubs:

  • Open – All community members can access this grouphub.
  • Closed – Access is restricted to certain members. Requires request and approval to join.
  • Hidden – This type is hidden in the community and only members who have access can perform actions in the grouphub.

Only administrators can create grouphubs.

Requirements

For creating the grouphub, you must have the Create groups permission granted by the Administrator.

For updating the grouphub, you must have the Edit groups permission granted by the Administrator.

For deleting the grouphub, you must have the Delete groups permission granted by the Administrator.

Example

As an administrator, you can create three types of grouphubs, provided you have the necessary permissions granted.

Create an Open Grouphub

The GraphQL mutation to create an open grouphub is provided below:

mutation {
  createGroupHub(createInput: {
    id: "grouphub:Books",
    title: "Books Club",
    description: "The book club is used to discuss about the recent trends in the mystery novels and its reviews.",
    membershipType: OPEN,
    boards: {
      items: [
        {
          conversationStyle: FORUM,
          title: "Book Forum",
          id:"forum"
        },
        {
          conversationStyle: BLOG,
          title: "Book Blog",
          id:"blog"
        },
        {
          conversationStyle: TKB,
          title: "Book Tkb",
          id:"tkb"
        }
      ]
    }
  }) {
    result {
      id
      title
      description
      membershipType
      boards {
        edges {
          node {
            id
            title
          }
        }
      }
    }
  }
}

The GraphQL response is given below:

{
  "data": {
    "createGroupHub": {
      "result": {
        "id": "grouphub:Books",
        "title": "Books Club",
        "description": "The book club is used to discuss about the recent trends in the mystery novels and its reviews.",
        "membershipType": "OPEN",
        "boards": {
          "edges": [
            {
              "node": {
                "id": "board:forum",
                "title": "Book Forum"
              }
            },
            {
              "node": {
                "id": "board:blog",
                "title": "Book Blog"
              }
            },
            {
              "node": {
                "id": "board:tkb",
                "title": "Book Tkb"
              }
            }
          ]
        }
      }
    }
  }
}

Create a Closed Grouphub

The GraphQL mutation to create a closed grouphub is given below:

mutation {
  createGroupHub(createInput: {
    id: "grouphub:closedGH",
    title: "Finance Grouphub",
    description: "This is a place where finance people can discuss about the ongoing fluctuations and trends in their community.",
    membershipType: CLOSED,
    boards: {
      items: [
        {
          conversationStyle: FORUM,
          title: "closed forum",
          id: "closedforum"
        },
        {
          conversationStyle: BLOG,
          title: "closed blog",
          id: "closedblog"
        },
        {
          conversationStyle: TKB,
          title: "closed TKB",
          id: "closedtkb"
        }
      ]
    }
  }) {
    result {
      id
      title
      description
      membershipType
      boards {
        edges {
          node {
            id
            title
          }
        }
      }
    }
  }
}

The GraphQL response is given below:

{
  "data": {
    "createGroupHub": {
      "result": {
        "id": "grouphub:closedGH",
        "title": "Finance Grouphub",
        "description": "This is a place where finance people can discuss about the ongoing fluctuations and trends in their community.",
        "membershipType": "CLOSED",
        "boards": {
          "edges": [
            {
              "node": {
                "id": "board:closedforum",
                "title": "closed forum"
              }
            },
            {
              "node": {
                "id": "board:closedblog",
                "title": "closed blog"
              }
            },
            {
              "node": {
                "id": "board:closedtkb",
                "title": "closed TKB"
              }
            }
          ]
        }
      }
    }
  }
}

Create a Hidden Grouphub

The GraphQL mutation to create a hidden grouphub is given below:

mutation {
  createGroupHub(createInput: {
    id: "grouphub:hiddenGH",
    title: "Hidden GH",
    description: "this is a hidden group",
    membershipType: CLOSED_HIDDEN,
    boards: {
      items: [
        {
          conversationStyle: FORUM,
          title: "hidden forum",
          id: "hiddenforum"
        },
        {
          conversationStyle: BLOG,
          title: "hidden blog",
          id: "hiddenblog"
        },
        {
          conversationStyle: TKB,
          title: "hidden TKB",
          id: "hiddentkb"
        }
      ]
    }
  }) {
    result {
      id
      title
      description
      membershipType
      boards {
        edges {
          node {
            id
            title
          }
        }
      }
    }
  }
}

The GraphQL response is given below:

{
  "data": {
    "createGroupHub": {
      "result": {
        "id": "grouphub:hiddenGH",
        "title": "Hidden GH",
        "description": "this is a hidden group",
        "membershipType": "CLOSED_HIDDEN",
        "boards": {
          "edges": [
            {
              "node": {
                "id": "board:hiddenforum",
                "title": "hidden forum"
              }
            },
            {
              "node": {
                "id": "board:hiddenblog",
                "title": "hidden blog"
              }
            },
            {
              "node": {
                "id": "board:hiddentkb",
                "title": "hidden TKB"
              }
            }
          ]
        }
      }
    }
  }
}

Update the Grouphub

You must have the Edit Groups permission granted. Only Administrators and Group owners can edit the grouphubs.

mutation {
  updateGroupHub(id: "grouphub:hiddenGH", updateInput: {
    title: "Tech Buzz",
    description: "This is a private group only to discuss about the recent trends in the technology and AI.",
    membershipType: CLOSED_HIDDEN,
    boards: {
      items: [
        {
          conversationStyle: FORUM,
          title: "new forum"
        }
      ]
    }
  }) {
    result {
      id
      title
      description
      membershipType
      boards {
        edges {
          node {
            id
            title
          }
        }
      }
    }
  }
}

The GraphQL response for the above mutation is given below:

{
  "data": {
    "updateGroupHub": {
      "result": {
        "id": "grouphub:hiddenGH",
        "title": "Tech Buzz",
        "description": "This is a private group only to discuss about the recent trends in the technology and AI.",
        "membershipType": "CLOSED_HIDDEN",
        "boards": {
          "edges": [
            {
              "node": {
                "id": "board:sampleGHforum-board",
                "title": "new forum"
              }
            }
          ]
        }
      }
    }
  }
}

Retrieve the Grouphubs

The GraphQL query to retrieve the grouphubs is given below:

{
  groupHubs {
    edges {
      node {
        id
        title
        description
        membershipType
      }
    }
  }
}

The GraphQL response for the above query is given below:

{
  "data": {
    "groupHubs": {
      "edges": [
        {
          "node": {
            "id": "grouphub:gh_open",
            "title": "GH_Open",
            "description": "",
            "membershipType": "OPEN"
          }
        },
        {
          "node": {
            "id": "grouphub:gh_close",
            "title": "GH_Close",
            "description": "",
            "membershipType": "CLOSED"
          }
        },
        {
          "node": {
            "id": "grouphub:gh_hidden",
            "title": "GH_Hidden",
            "description": "",
            "membershipType": "CLOSED_HIDDEN"
          }
        }
      ]
    }
  }
}

Delete a Grouphub

You must have the Delete groups permission granted by the Administrator. Only administrators and group owners can delete the grouphub.

The GraphQL mutation for deleting a grouphub is given below:

mutation {
  deleteGroupHub(id: "grouphub:closedGH") {
    result
  }
}

The GraphQL response for the above mutation is given below:

{
  "data": {
    "deleteGroupHub": {
      "result": true
    }
  }
}
Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. ATLAS

  2. Posted
  3. Updated

Comments