Added in 24.11.
Info: Only Admins can set the replies format at a place (node) level and for a community member.
You can set the replies format for your community, board, or category to have a good replies format that enhances the user experience.
Fetching the Replies Format of a Place (Node)
Use the coreNode
query to fetch the reply format for a place. The node can be a community, category, board, or discussion.
For example, use the below query to fetch the board's replies format (ID: DocsBoard).
query coreNode {
coreNode (
id: "board:Docsboard"
) {
repliesSettings {
repliesFormat {
value
overridingParent {
title
}
invalidReason {
message
}
}
}
repliesProperties {
repliesFormat
}
}
}
The GraphQL response:
{
"data": {
"coreNode": {
"repliesSettings": {
"repliesFormat": {
"value": "threaded",
"overridingParent": {
"title": "Docs Board"
},
"invalidReason": null
}
},
"repliesProperties": {
"repliesFormat": "threaded"
}
}
}
}
Setting the Replies Format for a Place (Node)
Use the setRepliesFormatSettingsOnNode
mutation to set either one of the below replies format for any place.
- Linear
- Threaded (Default value)
The table below describes the fields you can use to set the replies format for a place.
Field | Sub-Field | Description | Required |
---|---|---|---|
nodeId | The place where you want to set the replies format. | Yes | |
settingsInput | The input values to set for the node | Yes | |
repliesFormat | The replies format. Supported values: linear, threaded | Yes |
Example
Use the below example to set the replies format as Linear for a Docs Board.
mutation setRepliesFormatSettingsOnNode {
setRepliesFormatSettingsOnNode (
nodeId: "board:Docsboard",
settingsInput: {
repliesFormat: "linear"
}
) {
__typename
errors {
__typename
}
result
}
}
The GraphQL response:
{
"data": {
"setRepliesFormatSettingsOnNode": {
"__typename": "SetSettingsResult",
"errors": null,
"result": true
}
}
}
Fetching the Replies Format of a User
Use the ProfileSettings
query to retrieve the replies format of the logged-in user.
query ProfileSettings {
self {
profileSettings {
repliesFormat {
value
}
repliesSortOrder {
value
}
}
profileProperties {
repliesFormat
repliesSortOrder
}
}
}
The GraphQL response:
{
"data": {
"self": {
"profileSettings": {
"repliesFormat": {
"value": "threaded"
},
"repliesSortOrder": {
"value": "LIKES"
}
},
"profileProperties": {
"repliesFormat": "threaded",
"repliesSortOrder": "LIKES"
}
}
}
}
Settings the Replies Format for a Member
Use the UpdateUserPersonalInfo
mutation to set the replies format for a member of your community.
The table below describes the fields you can use to set the replies format for a place.
Field | Sub-Field | Description | Required |
---|---|---|---|
id | The member ID for whom you want to set the replies format. | Yes | |
updateInput | The input values to update the user profile input. | Yes | |
repliesFormat | The replies format. This field also supports the empty string value ("" ), which would set the user preference the same as the node. Supported values: linear , threaded |
No | |
repliesSortOrder | The sort order for the replies of a community member. This field can also take the default value (LIKES ) which would set the user preference same as the node. Supported values: PUBLISHTIME , REVERSEPUBLISHTIME , LIKES |
Example
Use the example below to set the reply format and sort order for a member (user ID: 10) as threaded and likes respectively.
mutation UpdateUserPersonalInfo {
updateUser(
id: "user:10",
updateInput: {
repliesFormat: "threaded",
repliesSortOrder: LIKES
}
) {
result {
id
login
profileSettings {
repliesFormat {
value
}
repliesSortOrder {
value
}
}
}
}
}
The GraphQL response:
{
"data": {
"updateUser": {
"result": {
"id": "user:10",
"login": "admin2",
"profileSettings": {
"repliesFormat": {
"value": "threaded"
},
"repliesSortOrder": {
"value": "LIKES"
}
}
}
}
}
}
ATLAS
Comments