leetcode-graphql-queries icon indicating copy to clipboard operation
leetcode-graphql-queries copied to clipboard

Requests requiring authentication

Open antebrl opened this issue 2 years ago • 1 comments

Could you please enhance your documentation by specifying which requests require authentication headers?

antebrl avatar Dec 24 '23 01:12 antebrl

User specific content require authentication headers. If you try to retrieve question list. You'll receive the response populated with only the public fields.

For example:

query problemsetQuestionList($categorySlug: String, $limit: Int, $skip: Int, $filters: QuestionListFilterInput) {
  problemsetQuestionList: questionList(
    categorySlug: $categorySlug
    limit: $limit
    skip: $skip
    filters: $filters
  ) {
    total: totalNum
    questions: data {
      acRate
      difficulty
      freqBar
      frontendQuestionId: questionFrontendId
      isFavor
      paidOnly: isPaidOnly
      status
      title
      titleSlug
      topicTags {
        name
        id
        slug
      }
      hasSolution
      hasVideoSolution
    }
  }
}

In the above query, if the authentication headers are not supplied. isFavor and status will either be null or empty.

akarsh1995 avatar Dec 30 '23 03:12 akarsh1995