export const userProfileQuery = `
query getUserProfile($username: String!) {
matchedUser(username: $username) {
username
submitStats: submitStatsGlobal {
acSubmissionNum {
difficulty
count
submissions
}
totalSubmissionNum {
difficulty
count
submissions
}
}
profile {
ranking
reputation
starRating
realName
aboutMe
userAvatar
skillTags
country
company
school
websites
countryName
location
contestCount
asciiCode
socialAccounts
skillSet {
langLevels {
langName
langVerboseName
level
}
topics {
slug
name
level
}
}
}
}
}
`;
export const userSubmissionsQuery = `
query recentSubmissions($username: String!, $limit: Int!) {
recentSubmissionList(username: $username, limit: $limit) {
id
title
titleSlug
timestamp
statusDisplay
lang
__typename
}
}
`;
export const dailyChallengeQuery = `
query questionOfToday {
activeDailyCodingChallengeQuestion {
date
userStatus
link
question {
acRate
difficulty
freqBar
frontendQuestionId: questionFrontendId
isFavor
paidOnly: isPaidOnly
status
title
titleSlug
hasVideoSolution
hasSolution
topicTags {
name
id
slug
}
}
}
}
`;
export const problemDetailsQuery = `
query questionData($titleSlug: String!) {
question(titleSlug: $titleSlug) {
questionId
questionFrontendId
boundTopicId
title
titleSlug
content
translatedTitle
difficulty
likes
dislikes
isLiked
similarQuestions
exampleTestcases
contributors {
username
profileUrl
avatarUrl
}
topicTags {
name
slug
}
companyTagStats
codeSnippets {
lang
langSlug
code
}
stats
hints
solution {
id
canSeeDetail
paidOnly
hasVideoSolution
}
status
sampleTestCase
metaData
judgerAvailable
judgeType
mysqlSchemas
enableRunCode
enableTestMode
enableDebugger
envInfo
}
}
`;
export const searchProblemsQuery = `
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
}
}
}
`;
export const contestDetailsQuery = `
query contestData($contestSlug: String!) {
contest(titleSlug: $contestSlug) {
title
titleSlug
description
startTime
duration
originStartTime
isVirtual
questions {
questionId
title
titleSlug
difficulty
}
}
}
`;
export const userContestRankingQuery = `
query userContestRankingInfo($username: String!) {
userContestRanking(username: $username) {
attendedContestsCount
rating
globalRanking
totalParticipants
topPercentage
badge {
name
}
}
userContestRankingHistory(username: $username) {
attended
trendDirection
problemsSolved
totalProblems
finishTimeInSeconds
rating
ranking
contest {
title
startTime
}
}
}
`;