All checks were successful
Tests / Tests (pull_request) Successful in 9s
- Add DismissChallenge/UndismissChallenge mutations - Add IsChallengeDismissed query - Add GetMyDismissedChallenges query - Update schema with dismissal fields 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
283 lines
4.3 KiB
GraphQL
283 lines
4.3 KiB
GraphQL
query GetChallenges {
|
|
challenges {
|
|
id
|
|
name
|
|
description
|
|
minimumShots
|
|
startDate
|
|
endDate
|
|
createdAt
|
|
updatedAt
|
|
requiredTableSize
|
|
requiredPocketSize
|
|
isPublic
|
|
maxAttempts
|
|
ruleSet {
|
|
id
|
|
name
|
|
description
|
|
}
|
|
createdBy {
|
|
id
|
|
username
|
|
profileImageUri
|
|
}
|
|
}
|
|
}
|
|
|
|
query GetMyDismissedChallenges {
|
|
myDismissedChallenges {
|
|
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
|
|
participantCount
|
|
ruleSet {
|
|
id
|
|
name
|
|
description
|
|
}
|
|
createdBy {
|
|
id
|
|
username
|
|
profileImageUri
|
|
}
|
|
invitations {
|
|
id
|
|
status
|
|
createdAt
|
|
invitee {
|
|
id
|
|
username
|
|
profileImageUri
|
|
}
|
|
inviter {
|
|
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
|
|
attemptCount
|
|
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
|
|
}
|
|
}
|
|
}
|
|
|
|
query GetMyChallengeEntries {
|
|
myChallengeEntries {
|
|
id
|
|
status
|
|
shotsCount
|
|
makesCount
|
|
makeRate
|
|
qualified
|
|
createdAt
|
|
challenge {
|
|
id
|
|
name
|
|
}
|
|
video {
|
|
id
|
|
}
|
|
}
|
|
}
|
|
|
|
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
|
|
}
|
|
}
|
|
|
|
query IsChallengeDismissed($challengeId: ID!) {
|
|
isChallengeDismissed(challengeId: $challengeId)
|
|
}
|
|
|
|
mutation DismissChallenge($challengeId: ID!) {
|
|
dismissChallenge(challengeId: $challengeId)
|
|
}
|
|
|
|
mutation UndismissChallenge($challengeId: ID!) {
|
|
undismissChallenge(challengeId: $challengeId)
|
|
}
|