Compare commits
41 Commits
a5050ed08d
...
dean/updat
| Author | SHA1 | Date | |
|---|---|---|---|
| e109e89a40 | |||
| 170ff70b7a | |||
| 8df09b8c93 | |||
| 644ea66e98 | |||
| 0a5097c5c0 | |||
| f4445f7ecb | |||
| b18fedae8e | |||
| 31baa2b096 | |||
| 85cd37f70f | |||
| b53aa172fa | |||
| df2e534745 | |||
|
|
ea4980947f | ||
| 65475bca9b | |||
| 280f5a66bd | |||
| 84daf2d136 | |||
| 6558fb60e9 | |||
| 6462a6a464 | |||
| 41a5bb7609 | |||
| b8aaabea8b | |||
| 2745521664 | |||
| 8efa2e067c | |||
| 919fe5ba24 | |||
| 7ff60dc9c5 | |||
| 7e0d8a84ee | |||
| 9f26b5aa0f | |||
| 70303b9363 | |||
| 9ee1422d3e | |||
| 7a9d2545c4 | |||
| c561ea20ab | |||
| 7ce0c058b7 | |||
| c399edd882 | |||
| 32d8cb0d41 | |||
| 9d912ed21e | |||
| 0bcfd32b14 | |||
| 9b27d288da | |||
| b0f94f5ea8 | |||
| de653ba54c | |||
| 2657628a54 | |||
| cd20cfcb40 | |||
| 2657a9baf7 | |||
| 9bb4b7c513 |
@@ -1,9 +1,16 @@
|
||||
# see: https://www.apollographql.com/docs/react/local-state/managing-state-with-field-policies/
|
||||
directive @client on FIELD
|
||||
|
||||
type SegmentInfo {
|
||||
index: Int!
|
||||
time: Float!
|
||||
}
|
||||
|
||||
extend type ShotGQL {
|
||||
startTime: Float!
|
||||
endTime: Float!
|
||||
startSegment: SegmentInfo!
|
||||
endSegment: SegmentInfo!
|
||||
}
|
||||
|
||||
extend type UploadStreamGQL {
|
||||
|
||||
673
src/index.tsx
673
src/index.tsx
File diff suppressed because it is too large
Load Diff
@@ -27,6 +27,8 @@ fragment VideoCardFields on VideoGQL {
|
||||
totalShotsMade
|
||||
totalShots
|
||||
makePercentage
|
||||
averageTimeBetweenShots
|
||||
averageDifficulty
|
||||
createdAt
|
||||
updatedAt
|
||||
startTime
|
||||
@@ -56,6 +58,20 @@ fragment VideoCardFields on VideoGQL {
|
||||
status
|
||||
}
|
||||
}
|
||||
reactions {
|
||||
videoId
|
||||
user {
|
||||
id
|
||||
username
|
||||
profileImageUri
|
||||
followers {
|
||||
id
|
||||
username
|
||||
profileImageUri
|
||||
}
|
||||
}
|
||||
reaction
|
||||
}
|
||||
}
|
||||
|
||||
query GetVideoFeed(
|
||||
|
||||
3
src/operations/reactions.gql
Normal file
3
src/operations/reactions.gql
Normal file
@@ -0,0 +1,3 @@
|
||||
mutation ReactToVideo($videoId: Int!, $reaction: ReactionEnum) {
|
||||
reactToVideo(videoId: $videoId, reaction: $reaction)
|
||||
}
|
||||
53
src/operations/runs.gql
Normal file
53
src/operations/runs.gql
Normal file
@@ -0,0 +1,53 @@
|
||||
query GetRunsForHighlights(
|
||||
$filterInput: RunFilterInput!
|
||||
$runIds: [Int!] = null
|
||||
$runsOrdering: GetRunsOrdering
|
||||
) {
|
||||
getRuns(
|
||||
filterInput: $filterInput
|
||||
runIds: $runIds
|
||||
runsOrdering: $runsOrdering
|
||||
) {
|
||||
count
|
||||
runs {
|
||||
id
|
||||
runLength
|
||||
userId
|
||||
videoId
|
||||
shots {
|
||||
videoId
|
||||
id
|
||||
}
|
||||
}
|
||||
runIds
|
||||
}
|
||||
}
|
||||
|
||||
query GetRunsWithTimestamps(
|
||||
$filterInput: RunFilterInput!
|
||||
$runIds: [Int!] = null
|
||||
$runsOrdering: GetRunsOrdering
|
||||
) {
|
||||
getRuns(
|
||||
filterInput: $filterInput
|
||||
runIds: $runIds
|
||||
runsOrdering: $runsOrdering
|
||||
) {
|
||||
count
|
||||
runs {
|
||||
id
|
||||
runLength
|
||||
userId
|
||||
videoId
|
||||
shots {
|
||||
videoId
|
||||
id
|
||||
createdAt
|
||||
shotDifficulty: pocketingIntentionFeatures {
|
||||
difficulty
|
||||
}
|
||||
}
|
||||
}
|
||||
runIds
|
||||
}
|
||||
}
|
||||
@@ -139,6 +139,14 @@ fragment ShotWithAllFeatures on ShotGQL {
|
||||
endFrame
|
||||
startTime @client
|
||||
endTime @client
|
||||
startSegment @client {
|
||||
index
|
||||
time
|
||||
}
|
||||
endSegment @client {
|
||||
index
|
||||
time
|
||||
}
|
||||
user {
|
||||
id
|
||||
}
|
||||
|
||||
7
src/operations/tags.gql
Normal file
7
src/operations/tags.gql
Normal file
@@ -0,0 +1,7 @@
|
||||
mutation RetireTags($tagIds: [Int!]!) {
|
||||
retireTags(tagIds: $tagIds)
|
||||
}
|
||||
|
||||
mutation DeleteTags($videoId: Int!, $tagsToDelete: [VideoTagInput!]!) {
|
||||
deleteTags(videoId: $videoId, tagsToDelete: $tagsToDelete)
|
||||
}
|
||||
@@ -79,6 +79,10 @@ query GetUserTags {
|
||||
getUserTags {
|
||||
id
|
||||
name
|
||||
tagClasses {
|
||||
id
|
||||
name
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ type Query {
|
||||
after: String = null
|
||||
filters: VideoFilterInput = null
|
||||
): VideoHistoryGQL!
|
||||
getUserTags: [TagGQL!]!
|
||||
getUserTags(includeRetiredTags: Boolean = false): [TagGQL!]!
|
||||
getVideo(videoId: Int!, debuggingJson: JSON = null): VideoGQL!
|
||||
getVideos(videoIds: [Int!]!): [VideoGQL!]!
|
||||
getFeedVideos(
|
||||
@@ -195,6 +195,7 @@ input FilterInput @oneOf {
|
||||
isLeftMiss: [Boolean!]
|
||||
isRightMiss: [Boolean!]
|
||||
isDirect: [Boolean!]
|
||||
isBreakHeuristic: [Boolean!]
|
||||
tableSize: FloatRangeFilter
|
||||
bankAngle: FloatRangeFilter
|
||||
bankDistance: FloatRangeFilter
|
||||
@@ -462,6 +463,7 @@ type VideoGQL {
|
||||
makePercentage: Float!
|
||||
medianRun: Float
|
||||
averageTimeBetweenShots: Float
|
||||
averageDifficulty: Float
|
||||
createdAt: DateTime
|
||||
updatedAt: DateTime
|
||||
shots: [ShotGQL!]!
|
||||
@@ -477,6 +479,7 @@ type VideoGQL {
|
||||
currentHomography: HomographyInfoGQL
|
||||
homographyHistory: [HomographyInfoGQL!]!
|
||||
currentProcessing: VideoProcessingGQL
|
||||
reactions: [ReactionGQL!]!
|
||||
}
|
||||
|
||||
type UploadStreamGQL {
|
||||
@@ -610,6 +613,21 @@ type VideoProcessingStatusGQL {
|
||||
updatedAt: DateTime
|
||||
}
|
||||
|
||||
type ReactionGQL {
|
||||
videoId: Int!
|
||||
user: UserGQL!
|
||||
reaction: ReactionEnum!
|
||||
createdAt: DateTime
|
||||
updatedAt: DateTime
|
||||
}
|
||||
|
||||
enum ReactionEnum {
|
||||
LIKE
|
||||
HEART
|
||||
BULLSEYE
|
||||
HUNDRED
|
||||
}
|
||||
|
||||
type RunFeaturesGQL {
|
||||
runId: Int!
|
||||
indexInRun: Int!
|
||||
@@ -714,9 +732,15 @@ type PageInfoGQL {
|
||||
}
|
||||
|
||||
type TagGQL {
|
||||
name: String!
|
||||
id: Int!
|
||||
group: String
|
||||
name: String!
|
||||
tagClasses: [TagClassGQL!]
|
||||
retired: Boolean!
|
||||
}
|
||||
|
||||
type TagClassGQL {
|
||||
id: Int!
|
||||
name: String!
|
||||
}
|
||||
|
||||
"""
|
||||
@@ -778,6 +802,7 @@ type Mutation {
|
||||
editUser(input: EditUserInputGQL!): UserGQL!
|
||||
followUser(followedUserId: Int!): UserGQL!
|
||||
unfollowUser(followedUserId: Int!): UserGQL!
|
||||
retireTags(tagIds: [Int!]!): Boolean!
|
||||
findPrerecordTableLayout(b64Image: String!, videoId: Int!): HomographyInfoGQL
|
||||
createUploadStream(
|
||||
videoMetadata: VideoMetadataInput!
|
||||
@@ -791,6 +816,8 @@ type Mutation {
|
||||
): Boolean!
|
||||
editUploadStream(videoId: Int!, videoMetadata: VideoMetadataInput!): Boolean!
|
||||
deleteVideo(videoId: Int!): Boolean!
|
||||
deleteTags(videoId: Int!, tagsToDelete: [VideoTagInput!]!): Boolean!
|
||||
reactToVideo(videoId: Int!, reaction: ReactionEnum): Boolean!
|
||||
}
|
||||
|
||||
input CreateBucketSetInput {
|
||||
|
||||
Reference in New Issue
Block a user