getGraphQLPayloadTopInterviewProblems function

String getGraphQLPayloadTopInterviewProblems({
  1. required int offset,
  2. required int pageSize,
})

Implementation

String getGraphQLPayloadTopInterviewProblems({required int offset, required int pageSize}) => r'''{
		"query": "\n    query problemsetQuestionList($categorySlug: String, $limit: Int, $skip: Int, $filters: QuestionListFilterInput) {\n  problemsetQuestionList: questionList(\n    categorySlug: $categorySlug\n    limit: $limit\n    skip: $skip\n    filters: $filters\n  ) {\n    total: totalNum\n    questions: data {#problemCommonFields      hasSolution\n      hasVideoSolution\n    }\n  }\n}\n    ",
		"variables": {
			"categorySlug": "",
			"skip": #offset,
			"limit": #pageSize,
			"filters": {
				"listId": "top-interview-questions"
			}
		}
	}'''
    .replaceAll('#problemCommonFields', problemCommonFields)
    .replaceAll('#offset', offset.toString())
    .replaceAll('#pageSize', pageSize.toString());