A Neovim plugin enabling you to solve LeetCode problems.
| 1 | ---@class lc.Api.Queries |
| 2 | local queries = {} |
| 3 | |
| 4 | queries.auth = [[ |
| 5 | query globalData { |
| 6 | userStatus { |
| 7 | id: userId |
| 8 | name: username |
| 9 | is_signed_in: isSignedIn |
| 10 | is_premium: isPremium |
| 11 | is_verified: isVerified |
| 12 | session_id: activeSessionId |
| 13 | } |
| 14 | } |
| 15 | ]] |
| 16 | |
| 17 | queries.qot = [[ |
| 18 | query questionOfToday { |
| 19 | todayRecord: activeDailyCodingChallengeQuestion { |
| 20 | question { |
| 21 | title_slug: titleSlug |
| 22 | } |
| 23 | } |
| 24 | } |
| 25 | ]] |
| 26 | |
| 27 | queries.question = [[ |
| 28 | query ($titleSlug: String!) { |
| 29 | question(titleSlug: $titleSlug) { |
| 30 | id: questionId |
| 31 | frontend_id: questionFrontendId |
| 32 | title |
| 33 | title_slug: titleSlug |
| 34 | is_paid_only: isPaidOnly |
| 35 | difficulty |
| 36 | likes |
| 37 | dislikes |
| 38 | category_title: categoryTitle |
| 39 | content |
| 40 | mysql_schemas: mysqlSchemas |
| 41 | data_schemas: dataSchemas |
| 42 | code_snippets: codeSnippets { |
| 43 | lang |
| 44 | lang_slug: langSlug |
| 45 | code |
| 46 | } |
| 47 | testcase_list: exampleTestcaseList |
| 48 | meta_data: metaData |
| 49 | ac_rate: acRate |
| 50 | stats |
| 51 | hints |
| 52 | topic_tags: topicTags { |
| 53 | name |
| 54 | slug |
| 55 | } |
| 56 | similar: similarQuestionList { |
| 57 | difficulty |
| 58 | title_slug: titleSlug |
| 59 | title |
| 60 | paid_only: isPaidOnly |
| 61 | } |
| 62 | } |
| 63 | } |
| 64 | ]] |
| 65 | |
| 66 | queries.random_question = [[ |
| 67 | query randomQuestion($categorySlug: String, $filters: QuestionListFilterInput) { |
| 68 | randomQuestion(categorySlug: $categorySlug, filters: $filters) { |
| 69 | title_slug: titleSlug |
| 70 | paid_only: isPaidOnly |
| 71 | } |
| 72 | } |
| 73 | ]] |
| 74 | |
| 75 | queries.translations = nil |
| 76 | |
| 77 | queries.solved = [[ |
| 78 | query userCalendar($username: String!) { |
| 79 | allQuestionsCount { |
| 80 | difficulty |
| 81 | count |
| 82 | } |
| 83 | matchedUser(username: $username) { |
| 84 | submit_stats: submitStatsGlobal { |
| 85 | acSubmissionNum { |
| 86 | difficulty |
| 87 | count |
| 88 | } |
| 89 | } |
| 90 | } |
| 91 | } |
| 92 | ]] |
| 93 | |
| 94 | queries.calendar = [[ |
| 95 | query userCalendar($username: String!, $year: Int) { |
| 96 | matchedUser(username: $username) { |
| 97 | calendar: userCalendar(year: $year) { |
| 98 | active_years: activeYears |
| 99 | streak |
| 100 | total_active_days: totalActiveDays |
| 101 | dcc_badges: dccBadges { |
| 102 | timestamp |
| 103 | badge { |
| 104 | name |
| 105 | icon |
| 106 | } |
| 107 | } |
| 108 | submission_calendar: submissionCalendar |
| 109 | } |
| 110 | solved_beats: problemsSolvedBeatsStats { |
| 111 | difficulty |
| 112 | percentage |
| 113 | } |
| 114 | submit_stats: submitStatsGlobal { |
| 115 | acSubmissionNum { |
| 116 | difficulty |
| 117 | count |
| 118 | } |
| 119 | } |
| 120 | } |
| 121 | } |
| 122 | ]] |
| 123 | |
| 124 | queries.skills = [[ |
| 125 | query skillStats($username: String!) { |
| 126 | matchedUser(username: $username) { |
| 127 | tag_problems_counts: tagProblemCounts { |
| 128 | advanced { |
| 129 | tag: tagName |
| 130 | slug: tagSlug |
| 131 | problems_solved: problemsSolved |
| 132 | } |
| 133 | intermediate { |
| 134 | tag: tagName |
| 135 | slug: tagSlug |
| 136 | problems_solved: problemsSolved |
| 137 | } |
| 138 | fundamental { |
| 139 | tag: tagName |
| 140 | slug: tagSlug |
| 141 | problems_solved: problemsSolved |
| 142 | } |
| 143 | } |
| 144 | } |
| 145 | } |
| 146 | ]] |
| 147 | |
| 148 | queries.languages = [[ |
| 149 | query languageStats($username: String!) { |
| 150 | matchedUser(username: $username) { |
| 151 | languageProblemCount { |
| 152 | lang: languageName |
| 153 | problems_solved: problemsSolved |
| 154 | } |
| 155 | } |
| 156 | } |
| 157 | ]] |
| 158 | |
| 159 | queries.streak = [[ |
| 160 | query getStreakCounter { |
| 161 | streakCounter { |
| 162 | streakCount |
| 163 | daysSkipped |
| 164 | todayCompleted: currentDayCompleted |
| 165 | } |
| 166 | } |
| 167 | ]] |
| 168 | |
| 169 | queries.session_progress = [[ |
| 170 | query userSessionProgress($username: String!) { |
| 171 | matchedUser(username: $username) { |
| 172 | submitStats { |
| 173 | acSubmissionNum { |
| 174 | difficulty |
| 175 | count |
| 176 | } |
| 177 | } |
| 178 | } |
| 179 | } |
| 180 | ]] |
| 181 | |
| 182 | return queries |