208 lines
3.2 KiB
Plaintext
208 lines
3.2 KiB
Plaintext
|
|
query GetChallenges {
|
||
|
|
challenges {
|
||
|
|
id
|
||
|
|
name
|
||
|
|
description
|
||
|
|
minimumShots
|
||
|
|
startDate
|
||
|
|
endDate
|
||
|
|
createdAt
|
||
|
|
updatedAt
|
||
|
|
requiredTableSize
|
||
|
|
requiredPocketSize
|
||
|
|
isPublic
|
||
|
|
maxAttempts
|
||
|
|
ruleSet {
|
||
|
|
id
|
||
|
|
name
|
||
|
|
description
|
||
|
|
}
|
||
|
|
createdBy {
|
||
|
|
id
|
||
|
|
username
|
||
|
|
profileImageUri
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
query GetChallenge($id: ID!) {
|
||
|
|
challenge(id: $id) {
|
||
|
|
id
|
||
|
|
name
|
||
|
|
description
|
||
|
|
minimumShots
|
||
|
|
startDate
|
||
|
|
endDate
|
||
|
|
createdAt
|
||
|
|
updatedAt
|
||
|
|
requiredTableSize
|
||
|
|
requiredPocketSize
|
||
|
|
isPublic
|
||
|
|
maxAttempts
|
||
|
|
ruleSet {
|
||
|
|
id
|
||
|
|
name
|
||
|
|
description
|
||
|
|
}
|
||
|
|
createdBy {
|
||
|
|
id
|
||
|
|
username
|
||
|
|
profileImageUri
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
query GetRuleSets {
|
||
|
|
ruleSets {
|
||
|
|
id
|
||
|
|
name
|
||
|
|
description
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
query GetChallengeLeaderboard($challengeId: ID!, $limit: Int) {
|
||
|
|
challengeLeaderboard(challengeId: $challengeId, limit: $limit) {
|
||
|
|
id
|
||
|
|
status
|
||
|
|
shotsCount
|
||
|
|
makesCount
|
||
|
|
makeRate
|
||
|
|
qualified
|
||
|
|
createdAt
|
||
|
|
user {
|
||
|
|
id
|
||
|
|
username
|
||
|
|
profileImageUri
|
||
|
|
}
|
||
|
|
video {
|
||
|
|
id
|
||
|
|
createdAt
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
query GetMyChallengeInvitations {
|
||
|
|
myChallengeInvitations {
|
||
|
|
id
|
||
|
|
status
|
||
|
|
createdAt
|
||
|
|
challenge {
|
||
|
|
id
|
||
|
|
name
|
||
|
|
description
|
||
|
|
startDate
|
||
|
|
endDate
|
||
|
|
createdBy {
|
||
|
|
id
|
||
|
|
username
|
||
|
|
profileImageUri
|
||
|
|
}
|
||
|
|
}
|
||
|
|
inviter {
|
||
|
|
id
|
||
|
|
username
|
||
|
|
profileImageUri
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
mutation CreateRuleSet($name: String!, $description: String) {
|
||
|
|
createRuleSet(name: $name, description: $description) {
|
||
|
|
id
|
||
|
|
name
|
||
|
|
description
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
mutation CreateChallenge(
|
||
|
|
$name: String!
|
||
|
|
$ruleSetId: ID!
|
||
|
|
$minimumShots: Int!
|
||
|
|
$startDate: DateTime!
|
||
|
|
$endDate: DateTime!
|
||
|
|
$description: String
|
||
|
|
$requiredTableSize: Float
|
||
|
|
$requiredPocketSize: Float
|
||
|
|
$isPublic: Boolean! = false
|
||
|
|
$maxAttempts: Int
|
||
|
|
) {
|
||
|
|
createChallenge(
|
||
|
|
name: $name
|
||
|
|
ruleSetId: $ruleSetId
|
||
|
|
minimumShots: $minimumShots
|
||
|
|
startDate: $startDate
|
||
|
|
endDate: $endDate
|
||
|
|
description: $description
|
||
|
|
requiredTableSize: $requiredTableSize
|
||
|
|
requiredPocketSize: $requiredPocketSize
|
||
|
|
isPublic: $isPublic
|
||
|
|
maxAttempts: $maxAttempts
|
||
|
|
) {
|
||
|
|
id
|
||
|
|
name
|
||
|
|
description
|
||
|
|
requiredTableSize
|
||
|
|
requiredPocketSize
|
||
|
|
isPublic
|
||
|
|
maxAttempts
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
mutation InviteUsersToChallenge($challengeId: ID!, $userIds: [ID!]!) {
|
||
|
|
inviteUsersToChallenge(challengeId: $challengeId, userIds: $userIds) {
|
||
|
|
id
|
||
|
|
status
|
||
|
|
inviter {
|
||
|
|
id
|
||
|
|
username
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
mutation RespondToChallengeInvitation($invitationId: ID!, $accept: Boolean!) {
|
||
|
|
respondToChallengeInvitation(invitationId: $invitationId, accept: $accept) {
|
||
|
|
id
|
||
|
|
status
|
||
|
|
challenge {
|
||
|
|
id
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
mutation StartChallenge($challengeId: ID!) {
|
||
|
|
startChallenge(challengeId: $challengeId) {
|
||
|
|
id
|
||
|
|
status
|
||
|
|
createdAt
|
||
|
|
challenge {
|
||
|
|
id
|
||
|
|
name
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
mutation SubmitChallengeEntry($entryId: ID!, $videoId: ID!) {
|
||
|
|
submitChallengeEntry(entryId: $entryId, videoId: $videoId) {
|
||
|
|
id
|
||
|
|
status
|
||
|
|
qualified
|
||
|
|
makeRate
|
||
|
|
shotsCount
|
||
|
|
makesCount
|
||
|
|
video {
|
||
|
|
id
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
mutation RecalculateChallengeEntry($entryId: ID!) {
|
||
|
|
recalculateChallengeEntry(entryId: $entryId) {
|
||
|
|
id
|
||
|
|
status
|
||
|
|
qualified
|
||
|
|
makeRate
|
||
|
|
shotsCount
|
||
|
|
makesCount
|
||
|
|
}
|
||
|
|
}
|