getGraphQLPayloadDiscussionComments function
String
getGraphQLPayloadDiscussionComments(
{
})
Implementation
String getGraphQLPayloadDiscussionComments({
required int topicId,
String? orderBy,
required int offset,
required int pageSize,
}) =>
r'''{
"operationName": "discussComments",
"variables": {
"orderBy": "#orderBy",
"pageNo": #offset,
"numPerPage": #pageSize,
"topicId": #topicId
},
"query": "query discussComments($topicId: Int!, $orderBy: String = "newest_to_oldest", $pageNo: Int = 1, $numPerPage: Int = 10) {\n topicComments(topicId: $topicId, orderBy: $orderBy, pageNo: $pageNo, numPerPage: $numPerPage) {\n data {\n id\n pinned\n pinnedBy {\n username\n __typename\n }\n post {\n ...DiscussPost\n __typename\n }\n numChildren\n __typename\n }\n __typename\n }\n}\n\nfragment DiscussPost on PostNode {\n id\n voteCount\n voteStatus\n content\n updationDate\n creationDate\n status\n isHidden\n coinRewards {\n ...CoinReward\n __typename\n }\n author {\n isDiscussAdmin\n isDiscussStaff\n username\n nameColor\n activeBadge {\n displayName\n icon\n __typename\n }\n profile {\n userAvatar\n reputation\n __typename\n }\n isActive\n __typename\n }\n authorIsModerator\n isOwnPost\n __typename\n}\n\nfragment CoinReward on ScoreNode {\n id\n score\n description\n date\n __typename\n}\n"
}'''
.replaceAll('#orderBy', orderBy ?? '')
.replaceAll('#offset', offset.toString())
.replaceAll('#pageSize', pageSize.toString())
.replaceAll('#topicId', topicId.toString());