Compare commits
10 Commits
dean/add-c
...
loewy/add-
| Author | SHA1 | Date | |
|---|---|---|---|
| beeba9207c | |||
| f14e117416 | |||
| 3d86c13291 | |||
| e63f8600aa | |||
| 7e822446da | |||
| 75ecc5894b | |||
| 73c8dd5f57 | |||
|
|
e4223a1a17 | ||
|
|
83b7f0d0f6 | ||
|
|
a882f98d91 |
5423
package-lock.json
generated
5423
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
1505
src/index.tsx
1505
src/index.tsx
File diff suppressed because it is too large
Load Diff
@@ -7,6 +7,7 @@ query GetAggregatedShotMetrics($aggregateInput: AggregateInputGQL!) {
|
||||
targetMetrics {
|
||||
count
|
||||
makePercentage
|
||||
averageDifficulty
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,207 +0,0 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
@@ -19,11 +19,7 @@ fragment UserSocialsFields on UserGQL {
|
||||
id
|
||||
username
|
||||
profileImageUri
|
||||
followers {
|
||||
id
|
||||
username
|
||||
profileImageUri
|
||||
}
|
||||
isFollowedByCurrentUser
|
||||
}
|
||||
|
||||
fragment VideoCardFields on VideoGQL {
|
||||
@@ -116,5 +112,6 @@ query GetVideoFeed(
|
||||
hasNextPage
|
||||
endCursor
|
||||
}
|
||||
hasFollowing
|
||||
}
|
||||
}
|
||||
|
||||
@@ -192,6 +192,7 @@ fragment ShotWithAllFeatures on ShotGQL {
|
||||
streamSegmentType
|
||||
}
|
||||
playlist {
|
||||
videoId
|
||||
segmentDurations
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,32 +88,16 @@ query GetUserTags {
|
||||
|
||||
mutation followUser($followedUserId: Int!) {
|
||||
followUser(followedUserId: $followedUserId) {
|
||||
username
|
||||
id
|
||||
following {
|
||||
id
|
||||
username
|
||||
}
|
||||
followers {
|
||||
id
|
||||
username
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mutation unfollowUser($followedUserId: Int!) {
|
||||
unfollowUser(followedUserId: $followedUserId) {
|
||||
username
|
||||
id
|
||||
following {
|
||||
id
|
||||
username
|
||||
}
|
||||
followers {
|
||||
id
|
||||
username
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
query getUserFollowingFollowers {
|
||||
@@ -123,11 +107,13 @@ query getUserFollowingFollowers {
|
||||
id
|
||||
username
|
||||
profileImageUri
|
||||
isFollowedByCurrentUser
|
||||
}
|
||||
followers {
|
||||
id
|
||||
username
|
||||
profileImageUri
|
||||
isFollowedByCurrentUser
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -177,13 +163,3 @@ fragment UserFragment on UserGQL {
|
||||
videosPrivateByDefault
|
||||
agreesToMarketing
|
||||
}
|
||||
|
||||
query GetUsersMatching(
|
||||
$matchString: String = null
|
||||
$limit: Int = null
|
||||
$after: String = null
|
||||
) {
|
||||
getUsersMatching(matchString: $matchString, limit: $limit, after: $after) {
|
||||
...UserFragment
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,11 +88,7 @@ fragment UserSocialsFields on UserGQL {
|
||||
id
|
||||
username
|
||||
profileImageUri
|
||||
followers {
|
||||
id
|
||||
username
|
||||
profileImageUri
|
||||
}
|
||||
isFollowedByCurrentUser
|
||||
}
|
||||
|
||||
query GetVideoSocialDetailsById($videoId: Int!) {
|
||||
|
||||
160
src/schema.gql
160
src/schema.gql
@@ -3,12 +3,6 @@ type Query {
|
||||
aggregateInput: AggregateInputGQL!
|
||||
): [AggregateResultGQL!]!
|
||||
getBucketSet(keyName: String!): BucketSetGQL
|
||||
challenges: [Challenge!]!
|
||||
challenge(id: ID!): Challenge
|
||||
challengeLeaderboard(challengeId: ID!, limit: Int! = 50): [ChallengeEntry!]!
|
||||
myChallengeInvitations: [ChallengeInvitation!]!
|
||||
ruleSets: [RuleSet!]!
|
||||
myChallengeEntries: [ChallengeEntry!]!
|
||||
getDeployedConfig: DeployedConfigGQL!
|
||||
waitFor(duration: Float!): Float!
|
||||
getFeedVideos(
|
||||
@@ -304,60 +298,35 @@ type BucketGQL {
|
||||
lowerBound: Float!
|
||||
}
|
||||
|
||||
type Challenge {
|
||||
id: ID!
|
||||
name: String!
|
||||
description: String
|
||||
minimumShots: Int!
|
||||
requiredTableSize: Float
|
||||
requiredPocketSize: Float
|
||||
isPublic: Boolean!
|
||||
maxAttempts: Int
|
||||
startDate: DateTime!
|
||||
endDate: DateTime!
|
||||
createdAt: DateTime!
|
||||
updatedAt: DateTime!
|
||||
ruleSet: RuleSet!
|
||||
createdBy: UserGQL!
|
||||
type DeployedConfigGQL {
|
||||
allowNewUsers: Boolean!
|
||||
firebase: Boolean!
|
||||
devMode: Boolean!
|
||||
environment: String!
|
||||
minimumAllowedAppVersion: String!
|
||||
subscriptionGatingEnabled: Boolean!
|
||||
bannerMessages: [BannerGQL!]!
|
||||
}
|
||||
|
||||
type RuleSet {
|
||||
id: ID!
|
||||
name: String!
|
||||
description: String
|
||||
createdAt: DateTime!
|
||||
updatedAt: DateTime!
|
||||
}
|
||||
|
||||
type UserGQL {
|
||||
type BannerGQL {
|
||||
id: Int!
|
||||
firebaseUid: String
|
||||
username: String!
|
||||
isAdmin: Boolean
|
||||
fargoRating: Int
|
||||
activeVideoId: Int
|
||||
stripeCustomerId: String
|
||||
profileImageUri: String
|
||||
createdAt: DateTime
|
||||
updatedAt: DateTime
|
||||
videosPrivateByDefault: Boolean
|
||||
agreesToMarketing: Boolean
|
||||
following: [UserGQL!]
|
||||
followers: [UserGQL!]
|
||||
isFollowedByCurrentUser: Boolean
|
||||
message: String!
|
||||
color: String!
|
||||
kind: BannerKindEnum!
|
||||
dismissible: Boolean!
|
||||
priority: Int!
|
||||
}
|
||||
|
||||
type ChallengeEntry {
|
||||
id: ID!
|
||||
status: String!
|
||||
shotsCount: Int
|
||||
makesCount: Int
|
||||
makeRate: Float
|
||||
qualified: Boolean
|
||||
createdAt: DateTime!
|
||||
challenge: Challenge!
|
||||
video: VideoGQL
|
||||
user: UserGQL!
|
||||
enum BannerKindEnum {
|
||||
INFO
|
||||
WARNING
|
||||
ERROR
|
||||
}
|
||||
|
||||
type VideoHistoryGQL {
|
||||
videos: [VideoGQL!]!
|
||||
pageInfo: PageInfoGQL!
|
||||
hasFollowing: Boolean!
|
||||
}
|
||||
|
||||
type VideoGQL {
|
||||
@@ -391,6 +360,24 @@ type VideoGQL {
|
||||
comments: [CommentGQL!]!
|
||||
}
|
||||
|
||||
type UserGQL {
|
||||
id: Int!
|
||||
firebaseUid: String
|
||||
username: String!
|
||||
isAdmin: Boolean
|
||||
fargoRating: Int
|
||||
activeVideoId: Int
|
||||
stripeCustomerId: String
|
||||
profileImageUri: String
|
||||
createdAt: DateTime
|
||||
updatedAt: DateTime
|
||||
videosPrivateByDefault: Boolean
|
||||
agreesToMarketing: Boolean
|
||||
following: [UserGQL!]
|
||||
followers: [UserGQL!]
|
||||
isFollowedByCurrentUser: Boolean
|
||||
}
|
||||
|
||||
type ShotGQL {
|
||||
id: Int!
|
||||
videoId: Int!
|
||||
@@ -646,45 +633,6 @@ type CommentGQL {
|
||||
replies: [CommentGQL!]!
|
||||
}
|
||||
|
||||
type ChallengeInvitation {
|
||||
id: ID!
|
||||
status: String!
|
||||
createdAt: DateTime!
|
||||
challenge: Challenge!
|
||||
inviter: UserGQL!
|
||||
}
|
||||
|
||||
type DeployedConfigGQL {
|
||||
allowNewUsers: Boolean!
|
||||
firebase: Boolean!
|
||||
devMode: Boolean!
|
||||
environment: String!
|
||||
minimumAllowedAppVersion: String!
|
||||
subscriptionGatingEnabled: Boolean!
|
||||
bannerMessages: [BannerGQL!]!
|
||||
}
|
||||
|
||||
type BannerGQL {
|
||||
id: Int!
|
||||
message: String!
|
||||
color: String!
|
||||
kind: BannerKindEnum!
|
||||
dismissible: Boolean!
|
||||
priority: Int!
|
||||
}
|
||||
|
||||
enum BannerKindEnum {
|
||||
INFO
|
||||
WARNING
|
||||
ERROR
|
||||
}
|
||||
|
||||
type VideoHistoryGQL {
|
||||
videos: [VideoGQL!]!
|
||||
pageInfo: PageInfoGQL!
|
||||
hasFollowing: Boolean!
|
||||
}
|
||||
|
||||
type PageInfoGQL {
|
||||
hasNextPage: Boolean!
|
||||
endCursor: String
|
||||
@@ -992,30 +940,6 @@ scalar JSON
|
||||
|
||||
type Mutation {
|
||||
createBucketSet(params: CreateBucketSetInput!): BucketSetGQL!
|
||||
createRuleSet(name: String!, description: String = null): RuleSet!
|
||||
createChallenge(
|
||||
name: String!
|
||||
ruleSetId: ID!
|
||||
minimumShots: Int!
|
||||
startDate: DateTime!
|
||||
endDate: DateTime!
|
||||
description: String = null
|
||||
requiredTableSize: Float = null
|
||||
requiredPocketSize: Float = null
|
||||
isPublic: Boolean! = false
|
||||
maxAttempts: Int = null
|
||||
): Challenge!
|
||||
inviteUsersToChallenge(
|
||||
challengeId: ID!
|
||||
userIds: [ID!]!
|
||||
): [ChallengeInvitation!]!
|
||||
respondToChallengeInvitation(
|
||||
invitationId: ID!
|
||||
accept: Boolean!
|
||||
): ChallengeInvitation!
|
||||
startChallenge(challengeId: ID!): ChallengeEntry!
|
||||
recalculateChallengeEntry(entryId: ID!): ChallengeEntry!
|
||||
submitChallengeEntry(entryId: ID!, videoId: ID!): ChallengeEntry!
|
||||
setLoggerLevel(path: String!, level: String!): Boolean!
|
||||
reactToVideo(videoId: Int!, reaction: ReactionEnum): Boolean!
|
||||
commentOnVideo(
|
||||
|
||||
Reference in New Issue
Block a user