Compare commits

...

44 Commits

Author SHA1 Message Date
3adc301935 Add subfields to usernames and following
All checks were successful
Tests / Tests (pull_request) Successful in 15s
2024-10-24 23:49:47 -06:00
9232c673e8 Merge pull request 'Return usernamesAndIds' (#88) from kat/update-usernames-and-following into master
Reviewed-on: #88
2024-10-24 23:46:27 -06:00
c2cb411469 Return usernamesAndIds
All checks were successful
Tests / Tests (pull_request) Successful in 16s
2024-10-24 23:41:52 -06:00
44ddc732a1 Fix cache merge (#87)
Co-authored-by: Kat Huang <kkathuang@gmail.com>
Reviewed-on: #87
Co-authored-by: Volodymyr Smolianinov <voidozzer@gmail.com>
Co-committed-by: Volodymyr Smolianinov <voidozzer@gmail.com>
2024-10-24 13:50:52 -06:00
d6ef3e0487 Merge pull request 'Remove error default from operation' (#86) from loewy/remove-error-default into master
Reviewed-on: #86
2024-10-24 12:28:39 -06:00
8c191bdb90 Remove error default from operation
All checks were successful
Tests / Tests (pull_request) Successful in 15s
2024-10-24 11:27:40 -07:00
8246699915 Merge pull request 'Return ShotGQL w/ updateShotAnnotations' (#84) from loewy/annotations-return into master
Reviewed-on: #84
Reviewed-by: Ivan Malison <ivanmalison@gmail.com>
2024-10-24 10:54:05 -06:00
de9d47c289 Merge branch 'master' into loewy/annotations-return
All checks were successful
Tests / Tests (pull_request) Successful in 8s
2024-10-24 10:53:02 -06:00
39b1808cab Merge pull request 'Create get usernames and followers operation' (#85) from kat/add-get-usernames-following-operation into master
Reviewed-on: #85
2024-10-24 09:19:38 -06:00
a78f9e7b9d return shot gql with an annotation update
All checks were successful
Tests / Tests (pull_request) Successful in 16s
2024-10-23 16:39:16 -07:00
f573026853 Create get usernames and followers operation
All checks were successful
Tests / Tests (pull_request) Successful in 15s
2024-10-23 17:04:25 -06:00
f98c98ecdd Merge pull request 'Add get usernames and following response' (#83) from kat/add-usernames-response into master
Reviewed-on: #83
2024-10-23 16:53:50 -06:00
3f6314aab7 Add get usernames and following response
All checks were successful
Tests / Tests (pull_request) Successful in 9s
2024-10-23 16:53:26 -06:00
3051c155e2 Merge pull request 'Add mutation, logic needs to have better stateful solution' (#82) from loewy/add-annotations-to-operations into master
Reviewed-on: #82
2024-10-22 18:38:25 -06:00
e686be5acd add mutation, logic needs to have better stateful solution
All checks were successful
Tests / Tests (pull_request) Successful in 10s
2024-10-22 16:58:35 -07:00
d49f9b213a Merge pull request 'Add following followers to user model' (#81) from kat/following-followers into master
Reviewed-on: #81
2024-10-22 00:12:59 -06:00
8f346d7832 Add runLength ordering and filter 2024-10-21 21:35:19 -06:00
163c6a4e0c Add following followers to user model
All checks were successful
Tests / Tests (pull_request) Successful in 7s
2024-10-21 12:08:42 -06:00
b9036001aa Remove user id from feed args 2024-10-21 01:12:17 -06:00
b16b36588f Create feed query 2024-10-20 23:35:52 -06:00
efaaeeaad1 Add totalDistance 2024-10-20 14:38:06 -06:00
5d93f7166e Use getOrderedShots 2024-10-19 21:27:57 -06:00
72ac956758 Add get ordered shots 2024-10-19 20:18:23 -06:00
5cb7df174b Merge pull request 'get rid of metadata input' (#80) from mk/alter-metadata-type into master
Reviewed-on: #80
2024-10-18 12:52:21 -06:00
d15dae23c1 get rid of metadata input
All checks were successful
Tests / Tests (pull_request) Successful in 9s
2024-10-18 11:51:38 -07:00
c98a65bb6f Merge pull request 'Add fargo filter input' (#79) from mk/fargo-filter into master
Reviewed-on: #79
Reviewed-by: Ivan Malison <ivanmalison@gmail.com>
2024-10-17 16:26:09 -06:00
e701c79469 Add fargo filter input
All checks were successful
Tests / Tests (pull_request) Successful in 10s
2024-10-17 15:24:56 -07:00
18cd3efe80 Dumb bug, nuked the schema lol (#78)
Alter fargo type, restore schema :O
Reviewed-on: #78
Co-authored-by: Mike Kalange <countablecloud@gmail.com>
Co-committed-by: Mike Kalange <countablecloud@gmail.com>
2024-10-17 15:15:54 -06:00
d71974d385 Merge pull request 'Add editUser mutation and input' (#77) from mk/edit-user into master
Reviewed-on: #77
2024-10-17 15:11:40 -06:00
0defdf0892 Add editUser mutation and input
All checks were successful
Tests / Tests (pull_request) Successful in 9s
2024-10-17 14:10:43 -07:00
8d1f79b8a8 GQL for caching hack 2024-10-17 01:28:14 -06:00
9dc426ea0f Moar fragments! 2024-10-16 23:39:14 -06:00
19a63b9d19 Move segment start times 2024-10-16 18:52:18 -06:00
ae97f956b3 Add segmentDurations and segmentStartFrames 2024-10-16 16:46:29 -06:00
d619751144 Add client side start and end time 2024-10-16 15:24:08 -06:00
e431a1751f Merge pull request 'Create get video for shot time conversion query' (#76) from kat/get-video-metadata into master
Reviewed-on: #76
Reviewed-by: Ivan Malison <ivanmalison@gmail.com>
2024-10-16 00:03:39 -06:00
209f0aa019 Create get video for shot time conversion query
All checks were successful
Tests / Tests (pull_request) Successful in 16s
2024-10-15 23:41:04 -06:00
70015a942c Merge pull request 'Add updateAnnotation interfaces' (#75) from mk/update-annotations into master
Reviewed-on: #75
2024-10-14 18:41:08 -06:00
91cfcb28e7 Add updateAnnotation interfaces
All checks were successful
Tests / Tests (pull_request) Successful in 8s
2024-10-14 17:27:07 -07:00
b2a09c1b8c Create reserved query for get shots with metadata (#74)
Reviewed-on: #74
Reviewed-by: Ivan Malison <ivanmalison@gmail.com>
2024-10-11 18:46:46 -06:00
59aaf47cbe Merge pull request 'Add a lightweight GQL call to get video header info' (#73) from loewy/add-lightweight-get-video-with-just-header-info into master
Reviewed-on: #73
2024-10-10 18:33:42 -06:00
c426e753cd add lightweigth gql call to get video header info
All checks were successful
Tests / Tests (pull_request) Successful in 15s
2024-10-10 17:02:18 -07:00
c8cf97421b Merge pull request 'Add id to shots: video items to prevent cache merge issues' (#72) from loewy/add-id-to-fix-cache-merging-issue into master
Reviewed-on: #72
2024-10-07 22:15:38 -06:00
9718137ad3 add id to prevent cache merge issues
All checks were successful
Tests / Tests (pull_request) Successful in 8s
2024-10-07 21:14:47 -07:00
8 changed files with 1425 additions and 156 deletions

View File

@@ -1,5 +1,7 @@
overwrite: true
schema: "src/schema.gql"
schema:
- "src/schema.gql"
- "src/client-schema.gql"
documents: "src/**/*.gql"
generates:
src/index.tsx:

25
src/client-schema.gql Normal file
View File

@@ -0,0 +1,25 @@
# see: https://www.apollographql.com/docs/react/local-state/managing-state-with-field-policies/
directive @client on FIELD
extend type ShotGQL {
startTime: Float!
endTime: Float!
}
extend type UploadStreamGQL {
segmentEndFrames: [Int!]!
}
extend type HLSPlaylistGQL {
segmentStartTimes: [Float!]!
}
type SegmentEndFramesGQL {
id: Int!
segmentEndFrames: [Int!]!
}
type SegmentStartTimesGQL {
id: Int!
segmentStartTimes: [Float!]!
}

File diff suppressed because it is too large Load Diff

View File

@@ -21,6 +21,7 @@ query GetFeed(
elapsedTime
screenshotUri
stream {
id
isCompleted
}
tableSize

View File

@@ -17,6 +17,29 @@ query GetShotAnnotationTypes {
}
}
mutation UpdateShotAnnotations(
$shotId: Int!
$annotations: [UpdateAnnotationInputGQL!]!
) {
updateShotAnnotations(shotId: $shotId, annotations: $annotations) {
shot {
id
annotations {
shotId
type {
id
name
}
notes
}
}
error {
shotId
msg
}
}
}
query GetShotsWithVideoGql($filterInput: FilterInput!, $limit: Int) {
getShotsWithMetadata(filterInput: $filterInput, limit: $limit) {
ids
@@ -31,6 +54,28 @@ query GetShotsWithVideoGql($filterInput: FilterInput!, $limit: Int) {
}
}
## Reserved for playlists (which are created from a filter)
query GetShotsWithMetadataFilterResult(
$filterInput: FilterInput!
$shotsOrdering: GetShotsOrdering
$limit: Int
$ids: [Int!]
) {
getOrderedShots(
filterInput: $filterInput
shotsOrdering: $shotsOrdering
limit: $limit
ids: $ids
) {
count
shots {
...ShotWithAllFeatures
}
ids
}
}
# TODO: Delete
query GetShotsWithMetadata(
$filterInput: FilterInput!
$shotsPagination: GetShotsPagination
@@ -62,18 +107,12 @@ fragment ShotWithAllFeatures on ShotGQL {
videoId
startFrame
endFrame
startTime @client
endTime @client
user {
id
}
falsePositiveScore
video {
stream {
resolution {
width
height
}
}
}
createdAt
updatedAt
cueObjectFeatures {
@@ -99,4 +138,12 @@ fragment ShotWithAllFeatures on ShotGQL {
serializedShotPaths {
b64EncodedBuffer
}
annotations {
shotId
type {
id
name
}
notes
}
}

View File

@@ -57,6 +57,27 @@ query getUsernames(
getUsernames(matchString: $matchString, limit: $limit, after: $after)
}
query getUsernamesAndFollowing(
$userId: Int!
$matchString: String!
$limit: Int = null
$after: String = null
) {
getUsernamesAndFollowing(
userId: $userId
matchString: $matchString
limit: $limit
after: $after
) {
followers
following
usernamesAndIds {
username
id
}
}
}
query GetUserTags {
getUserTags {
id

View File

@@ -45,6 +45,7 @@ query GetStreamMonitoringDetails($videoId: Int!, $debuggingJson: JSON) {
}
}
stream {
id
linksRequested
uploadsCompleted
segmentProcessingCursor
@@ -117,23 +118,33 @@ query GetVideoDetails($videoId: Int!) {
query GetVideos($videoIds: [Int!]!) {
getVideos(videoIds: $videoIds) {
...VideoStreamMetadata
}
}
fragment VideoStreamMetadata on VideoGQL {
id
framesPerSecond
stream {
id
framesPerSecond
stream {
id
streamSegmentType
segments {
uploaded
valid
segmentIndex
endFrameIndex
framesPerSecond
}
}
playlist {
segmentDurations
streamSegmentType
segments {
uploaded
valid
segmentIndex
endFrameIndex
framesPerSecond
}
}
playlist {
segmentDurations
}
}
query GetVideoForShotTime($videoId: Int!) {
getVideo(videoId: $videoId) {
...VideoStreamMetadata
}
}
query GetVideo($videoId: Int!) {
@@ -184,6 +195,7 @@ query GetVideo($videoId: Int!) {
}
}
stream {
id
streamSegmentType
segments {
segmentIndex
@@ -204,12 +216,14 @@ query GetAverageTimePerShotForVideo($videoId: Int!) {
averageTimeBetweenShots
}
}
query GetElapsedTimeForVideo($videoId: Int!) {
getVideo(videoId: $videoId) {
id
elapsedTime
}
}
query GetMedianRunForVideo($videoId: Int!) {
getVideo(videoId: $videoId) {
id
@@ -217,23 +231,60 @@ query GetMedianRunForVideo($videoId: Int!) {
}
}
query GetVideoForClipTimes($videoId: Int!) {
getVideo(videoId: $videoId) {
id
fragment StreamWithEndFrames on UploadStreamGQL {
id
streamSegmentType
segmentEndFrames @client
resolution {
width
height
}
segments {
uploaded
valid
segmentIndex
endFrameIndex
framesPerSecond
playlist {
segmentDurations
}
stream {
id
streamSegmentType
segments {
uploaded
valid
segmentIndex
endFrameIndex
framesPerSecond
}
}
}
}
fragment SegmentEndFrames on SegmentEndFramesGQL {
id
segmentEndFrames
}
fragment SegmentStartTimes on SegmentStartTimesGQL {
id
segmentStartTimes
}
fragment PlaylistWithSegmentStartTimes on HLSPlaylistGQL {
videoId
segmentDurations
segmentStartTimes @client
}
fragment VideoDurationData on VideoGQL {
id
framesPerSecond
playlist {
...PlaylistWithSegmentStartTimes
}
stream {
...StreamWithEndFrames
}
}
query GetVideoForClipTimes($videoId: Int!) {
getVideo(videoId: $videoId) {
...VideoDurationData
}
}
query GetHeaderInfoByVideoId($videoId: Int!) {
getVideo(videoId: $videoId) {
id
name
startTime
}
}

View File

@@ -9,6 +9,12 @@ type Query {
videoId: ID!
intervalDuration: Int! = 300
): [MakePercentageIntervalGQL!]!
getOrderedShots(
filterInput: FilterInput!
ids: [Int!] = null
shotsOrdering: GetShotsOrdering = null
limit: Int! = 500
): GetShotsResult!
getShotsWithMetadata(
filterInput: FilterInput!
ids: [Int!] = null
@@ -29,6 +35,12 @@ type Query {
limit: Int = null
after: String = null
): [String!]!
getUsernamesAndFollowing(
userId: Int!
matchString: String = null
limit: Int = 100
after: String = null
): UsernamesAndFollowingResponse!
getPlayTime(userId: Int!): UserPlayTimeGQL!
getUserVideos(
userId: Int = null
@@ -39,6 +51,11 @@ type Query {
getUserTags: [TagGQL!]!
getVideo(videoId: Int!, debuggingJson: JSON = null): VideoGQL!
getVideos(videoIds: [Int!]!): [VideoGQL!]!
getFeedVideos(
limit: Int! = 5
after: String = null
filters: VideoFilterInput = null
): VideoHistoryGQL!
}
type AggregateResultGQL {
@@ -142,6 +159,7 @@ input FilterInput @oneOf {
videoId: [Int!]
userId: [Int!]
username: [String!]
fargoRating: FloatRangeFilter
make: [Boolean!]
tags: [VideoTagInput!]
annotations: [ShotAnnotationInput!]
@@ -166,6 +184,8 @@ input FilterInput @oneOf {
missAngleInDegrees: FloatRangeFilter
marginOfErrorInDegrees: FloatRangeFilter
createdAt: DateRangeFilter
totalDistance: FloatRangeFilter
runLength: FloatRangeFilter
}
input FloatRangeFilter {
@@ -324,10 +344,13 @@ type UserGQL {
firebaseUid: String!
username: String!
isAdmin: Boolean!
fargoRating: Int
activeVideoId: Int
profileImageUri: String
createdAt: DateTime
updatedAt: DateTime
following: [Int!]
followers: [Int!]
}
type ShotAnnotationGQL {
@@ -494,6 +517,33 @@ type VideoProcessingStatusGQL {
updatedAt: DateTime
}
input GetShotsOrdering {
orderings: [ShotsOrderingComponent!]!
}
input ShotsOrderingComponent @oneOf {
videoCreation: DatetimeShotOrdering
marginOfError: FloatShotOrdering
videoId: IntShotOrdering
startFrame: IntShotOrdering
runLength: IntShotOrdering
}
input DatetimeShotOrdering {
descending: Boolean! = true
startingAt: DateTime = null
}
input FloatShotOrdering {
descending: Boolean! = true
startingAt: Float = null
}
input IntShotOrdering {
descending: Boolean! = true
startingAt: Int = null
}
input GetShotsPagination {
createdAfter: CreatedAfter!
startFrameAfter: Int!
@@ -504,6 +554,12 @@ input CreatedAfter @oneOf {
createdAt: DateTime
}
type UsernamesAndFollowingResponse {
usernames: [String!]!
following: [Int!]!
followers: [Int!]!
}
type UserPlayTimeGQL {
totalSeconds: Float!
}
@@ -545,10 +601,17 @@ type Mutation {
annotationName: String!
notes: String = null
): AddShotAnnotationReturn!
updateShotAnnotations(
shotId: Int!
annotations: [UpdateAnnotationInputGQL!]!
): UpdateShotAnnotationReturn!
getProfileImageUploadLink(
fileExt: String = ".png"
): GetProfileUploadLinkReturn!
editProfileImageUri(profileImageUri: String!): UserGQL!
editUser(input: EditUserInputGQL!): UserGQL!
followUser(followedUserId: Int!): UserGQL!
unfollowUser(followedUserId: Int!): UserGQL!
createUploadStream(
videoMetadata: VideoMetadataInput!
): CreateUploadStreamReturn!
@@ -598,6 +661,16 @@ type OtherErrorNeedsNote {
msg: String
}
type UpdateShotAnnotationReturn {
shot: ShotGQL
error: DoesNotOwnShotErr
}
input UpdateAnnotationInputGQL {
name: String!
notes: String = null
}
type GetProfileUploadLinkReturn {
value: UploadLinkGetProfileUploadLinkErrors!
}
@@ -624,6 +697,11 @@ type TooManyProfileImageUploadsErr {
linksRequested: Int!
}
input EditUserInputGQL {
username: String = null
fargoRating: Int = null
}
type CreateUploadStreamReturn {
videoId: Int!
}
@@ -634,7 +712,6 @@ input VideoMetadataInput {
endTime: DateTime = null
gameType: String = null
tableSize: Float = null
uploadStreamMetadataInput: UploadStreamMetadataInput = null
lastIntendedSegmentBound: Int = null
streamSegmentType: StreamSegmentTypeEnum = null
endStream: Boolean! = false
@@ -642,24 +719,6 @@ input VideoMetadataInput {
framesPerSecond: Float = null
}
input UploadStreamMetadataInput {
deviceType: DeviceTypeEnum = null
osVersion: String = null
appVersion: String = null
browserName: String = null
browserVersion: String = null
locale: String = null
timezone: String = null
networkType: String = null
ipAddress: String = null
}
enum DeviceTypeEnum {
IOS
ANDROID
BROWSER
}
input VideoResolution {
width: Int!
height: Int!