Compare commits

..

1 Commits

Author SHA1 Message Date
42502772f5 Use get feed videos
All checks were successful
Tests / Tests (pull_request) Successful in 15s
2024-11-04 14:59:39 -07:00
7 changed files with 286 additions and 1318 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,76 +1,36 @@
# DO NOT USE: use getVideoFeed instead
query GetFeed(
$limit: Int! = 5
$after: String = null
$filters: VideoFilterInput = null
) {
getUserVideos(limit: $limit, after: $after, filters: $filters) {
getFeedVideos(limit: $limit, after: $after, filters: $filters) {
videos {
...VideoCardFields
}
pageInfo {
hasNextPage
endCursor
}
}
}
fragment VideoCardFields on VideoGQL {
id
owner {
id
username
profileImageUri
}
name
screenshotUri
totalShotsMade
totalShots
makePercentage
createdAt
updatedAt
startTime
endTime
private
elapsedTime
screenshotUri
stream {
id
isCompleted
}
tableSize
tags {
tagClasses {
id
owner {
username
}
name
}
name
}
currentProcessing {
id
errors {
message
}
status
statuses {
status
}
}
}
query GetVideoFeed(
$limit: Int! = 5
$after: String = null
$filters: VideoFilterInput = null
$includeCallersVideos: Boolean = null
) {
getFeedVideos(
limit: $limit
after: $after
filters: $filters
includeCallersVideos: $includeCallersVideos
) {
videos {
...VideoCardFields
screenshotUri
totalShotsMade
totalShots
makePercentage
createdAt
updatedAt
startTime
endTime
elapsedTime
screenshotUri
stream {
id
isCompleted
}
tableSize
tags {
tagClasses {
name
}
name
}
}
pageInfo {
hasNextPage

View File

@ -1,80 +0,0 @@
fragment MedalFields on MedalGQL {
count
nickname
}
query getMedals($scope: MedalScope!, $userId: Int) {
getMedals(scope: $scope, userId: $userId) {
distanceOver66 {
...MedalFields
}
distanceOver78 {
...MedalFields
}
distanceOver90 {
...MedalFields
}
runLength3 {
...MedalFields
}
runLength5 {
...MedalFields
}
runLength8 {
...MedalFields
}
runLength10 {
...MedalFields
}
runLength15 {
...MedalFields
}
runLength20 {
...MedalFields
}
runLength25 {
...MedalFields
}
runLength30 {
...MedalFields
}
runLength40 {
...MedalFields
}
runLength50 {
...MedalFields
}
totalMakes100 {
...MedalFields
}
# missing assets
# totalMakes500 {
# ...MedalFields
# }
# totalMakes1000 {
# ...MedalFields
# }
# totalMakes5000 {
# ...MedalFields
# }
# totalMakes10000 {
# ...MedalFields
# }
dailyMakes50 {
...MedalFields
}
dailyMakes100 {
...MedalFields
}
dailyMakes150 {
...MedalFields
}
dailyMakes200 {
...MedalFields
}
# missing asset
# dailyMakes250 {
# ...MedalFields
# }
}
}

View File

@ -40,7 +40,6 @@ mutation UpdateShotAnnotations(
}
}
## Should be deprecated
query GetShotsWithVideoGql(
$filterInput: FilterInput!
$shotsOrdering: GetShotsOrdering
@ -62,26 +61,6 @@ query GetShotsWithVideoGql(
}
}
query GetShotsWithJustIds(
$filterInput: FilterInput!
$shotsOrdering: GetShotsOrdering
$limit: Int
$countRespectsLimit: Boolean
) {
getOrderedShots(
filterInput: $filterInput
shotsOrdering: $shotsOrdering
limit: $limit
countRespectsLimit: $countRespectsLimit
) {
count
shots {
id
videoId
}
}
}
## Reserved for playlists (which are created from a filter)
query GetShotsWithMetadataFilterResult(
$filterInput: FilterInput!
@ -159,7 +138,6 @@ fragment ShotWithAllFeatures on ShotGQL {
targetPocketAngleDirection
marginOfErrorInDegrees
intendedPocketType
difficulty
}
pocketingIntentionInfo {
ballId

View File

@ -41,12 +41,11 @@ query getLoggedInUser {
activeVideoId
createdAt
updatedAt
videosPrivateByDefault
}
}
query GetUserPlayTime($userId: Int!, $filters: VideoFilterInput) {
getPlayTime(userId: $userId, filters: $filters) {
query GetUserPlayTime($userId: Int!) {
getPlayTime(userId: $userId) {
totalSeconds
}
}
@ -136,24 +135,3 @@ query getUserFollowingFollowers {
query doesUsernameExist($candidateUsername: String!) {
doesUsernameExist(candidateUsername: $candidateUsername)
}
mutation editUser(
$username: String
$fargoRating: Int
$videosPrivateByDefault: Boolean
) {
editUser(
input: {
username: $username
fargoRating: $fargoRating
videosPrivateByDefault: $videosPrivateByDefault
}
) {
id
firebaseUid
username
fargoRating
updatedAt
videosPrivateByDefault
}
}

View File

@ -5,7 +5,44 @@ query GetStreamMonitoringDetails($videoId: Int!, $debuggingJson: JSON) {
makePercentage
elapsedTime
currentHomography {
...HomographyInfo
crop {
left
top
width
height
}
pockets {
left
top
width
height
}
sourcePoints {
topLeft {
x
y
}
topSide {
x
y
}
topRight {
x
y
}
bottomLeft {
x
y
}
bottomSide {
x
y
}
bottomRight {
x
y
}
}
}
stream {
id
@ -18,7 +55,6 @@ query GetStreamMonitoringDetails($videoId: Int!, $debuggingJson: JSON) {
initPlaylistUploadStatus
}
currentProcessing {
id
errors {
message
startSegmentIndex
@ -118,7 +154,45 @@ query GetVideo($videoId: Int!) {
segmentDurations
}
homographyHistory {
...HomographyInfo
frameIndex
crop {
left
top
width
height
}
pockets {
left
top
width
height
}
sourcePoints {
topLeft {
x
y
}
topSide {
x
y
}
topRight {
x
y
}
bottomLeft {
x
y
}
bottomSide {
x
y
}
bottomRight {
x
y
}
}
}
stream {
id
@ -214,52 +288,3 @@ query GetHeaderInfoByVideoId($videoId: Int!) {
startTime
}
}
mutation FindPrerecordTableLayout($b64Image: String!, $videoId: Int!) {
findPrerecordTableLayout(b64Image: $b64Image, videoId: $videoId) {
...HomographyInfo
}
}
fragment HomographyInfo on HomographyInfoGQL {
id
frameIndex
crop {
left
top
width
height
}
pockets {
left
top
width
height
}
sourcePoints {
topLeft {
x
y
}
topSide {
x
y
}
topRight {
x
y
}
bottomLeft {
x
y
}
bottomSide {
x
y
}
bottomRight {
x
y
}
}
}

View File

@ -10,13 +10,6 @@ type Query {
intervalDuration: Int! = 300
): [MakePercentageIntervalGQL!]!
getMedals(scope: MedalScope!, userId: Int = null): RequestedMedalsGQL!
getRuns(
filterInput: RunFilterInput!
runIds: [Int!] = null
runsOrdering: GetRunsOrdering = null
limit: Int! = 500
countRespectsLimit: Boolean! = false
): GetRunsResult!
getOrderedShots(
filterInput: FilterInput!
ids: [Int!] = null
@ -53,7 +46,7 @@ type Query {
limit: Int = 100
after: String = null
): UserRelationshipsResult!
getPlayTime(userId: Int!, filters: VideoFilterInput = null): UserPlayTimeGQL!
getPlayTime(userId: Int!): UserPlayTimeGQL!
getUserVideos(
userId: Int = null
limit: Int! = 5
@ -66,7 +59,6 @@ type Query {
getFeedVideos(
limit: Int! = 5
after: String = null
includeCallersVideos: Boolean = true
filters: VideoFilterInput = null
): VideoHistoryGQL!
}
@ -293,28 +285,31 @@ type RequestedMedalsGQL {
runLength30: MedalGQL
runLength40: MedalGQL
runLength50: MedalGQL
totalMakes25: MedalGQL @deprecated(reason: "no longer supported")
totalMakes50: MedalGQL @deprecated(reason: "no longer supported")
totalMakes75: MedalGQL @deprecated(reason: "no longer supported")
totalMakes200: MedalGQL @deprecated(reason: "no longer supported")
totalMakes300: MedalGQL @deprecated(reason: "no longer supported")
totalMakes400: MedalGQL @deprecated(reason: "no longer supported")
totalMakes750: MedalGQL @deprecated(reason: "no longer supported")
totalMakes25: MedalGQL
totalMakes50: MedalGQL
totalMakes75: MedalGQL
totalMakes100: MedalGQL
totalMakes200: MedalGQL
totalMakes300: MedalGQL
totalMakes400: MedalGQL
totalMakes500: MedalGQL
totalMakes750: MedalGQL
totalMakes1000: MedalGQL
totalMakes5000: MedalGQL
totalMakes10000: MedalGQL
dailyMakes50: MedalGQL
dailyMakes100: MedalGQL
dailyMakes150: MedalGQL
dailyMakes200: MedalGQL
dailyMakes250: MedalGQL
dayStreak2: MedalGQL
dayStreak3: MedalGQL
dayStreak4: MedalGQL
dayStreak5: MedalGQL
dayStreak6: MedalGQL
dayStreak7: MedalGQL
dayStreak14: MedalGQL
dayStreak21: MedalGQL
dayStreak30: MedalGQL
dayStreak60: MedalGQL
dayStreak90: MedalGQL
}
type MedalGQL {
count: Int!
nickname: String
}
input MedalScope @oneOf {
@ -322,18 +317,10 @@ input MedalScope @oneOf {
interval: TimeInterval
}
type GetRunsResult {
runs: [RunGQL!]!
count: Int
runIds: [Int!]!
}
type RunGQL {
id: Int!
runLength: Int!
videoId: Int!
userId: Int!
type GetShotsResult {
shots: [ShotGQL!]!
count: Int
ids: [Int!]!
}
type ShotGQL {
@ -413,7 +400,6 @@ type UserGQL {
profileImageUri: String
createdAt: DateTime
updatedAt: DateTime
videosPrivateByDefault: Boolean
following: [UserGQL!]
followers: [UserGQL!]
}
@ -451,7 +437,6 @@ type VideoGQL {
elapsedTime: Float
framesPerSecond: Float!
tableSize: Float!
private: Boolean!
stream: UploadStreamGQL
playlist: HLSPlaylistGQL
tags: [VideoTag!]!
@ -474,7 +459,6 @@ type UploadStreamGQL {
createdAt: DateTime!
updatedAt: DateTime!
segments: [UploadSegmentGQL!]!
clientUploadStatus: ClientUploadStatusEnum
resolution: VideoResolutionGQL!
streamSegmentType: StreamSegmentTypeEnum!
}
@ -499,11 +483,6 @@ type UploadSegmentGQL {
linksRequested: Int!
}
enum ClientUploadStatusEnum {
UPLOAD_ENABLED
UPLOAD_DISABLED
}
type VideoResolutionGQL {
width: Int
height: Int
@ -530,7 +509,6 @@ type VideoTagClass {
}
type HomographyInfoGQL {
id: Int!
frameIndex: Int!
crop: BoundingBoxGQL!
pockets: [BoundingBoxGQL!]!
@ -560,7 +538,6 @@ type IntPoint2D {
}
type VideoProcessingGQL {
id: Int!
errors: [VideoProcessingErrorGQL!]!
status: ProcessingStatusEnum!
statuses: [VideoProcessingStatusGQL!]!
@ -591,61 +568,33 @@ type VideoProcessingStatusGQL {
updatedAt: DateTime
}
input RunFilterInput {
videoId: [Int!]
userId: [Int!]
username: [String!]
andFilters: [RunFilterInput!]
orFilters: [RunFilterInput!]
notFilter: RunFilterInput
tableSize: FloatRangeFilter
createdAt: DateRangeFilter
runLength: FloatRangeFilter
}
input GetRunsOrdering {
orderings: [RunsOrderingComponent!]!
}
input RunsOrderingComponent @oneOf {
runLength: IntOrdering
videoId: IntOrdering
videoCreation: DatetimeOrdering
}
input IntOrdering {
descending: Boolean! = true
startingAt: Int = null
}
input DatetimeOrdering {
descending: Boolean! = true
startingAt: DateTime = null
}
type GetShotsResult {
shots: [ShotGQL!]!
count: Int
ids: [Int!]!
}
input GetShotsOrdering {
orderings: [ShotsOrderingComponent!]!
}
input ShotsOrderingComponent @oneOf {
videoCreation: DatetimeOrdering
marginOfError: FloatOrdering
videoId: IntOrdering
startFrame: IntOrdering
runLength: IntOrdering
videoCreation: DatetimeShotOrdering
marginOfError: FloatShotOrdering
videoId: IntShotOrdering
startFrame: IntShotOrdering
runLength: IntShotOrdering
}
input FloatOrdering {
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!
@ -671,13 +620,6 @@ type UserPlayTimeGQL {
totalSeconds: Float!
}
input VideoFilterInput {
isStreamCompleted: Boolean = null
requireCursorCompletion: Boolean! = true
createdAt: DateRangeFilter = null
excludeVideosWithNoShots: Boolean = null
}
type VideoHistoryGQL {
videos: [VideoGQL!]!
pageInfo: PageInfoGQL!
@ -688,6 +630,11 @@ type PageInfoGQL {
endCursor: String
}
input VideoFilterInput {
isStreamCompleted: Boolean = null
requireCursorCompletion: Boolean! = true
}
type TagGQL {
name: String!
id: Int!
@ -721,7 +668,6 @@ type Mutation {
editUser(input: EditUserInputGQL!): UserGQL!
followUser(followedUserId: Int!): UserGQL!
unfollowUser(followedUserId: Int!): UserGQL!
findPrerecordTableLayout(b64Image: String!, videoId: Int!): HomographyInfoGQL
createUploadStream(
videoMetadata: VideoMetadataInput!
): CreateUploadStreamReturn!
@ -810,7 +756,6 @@ type TooManyProfileImageUploadsErr {
input EditUserInputGQL {
username: String = null
fargoRating: Int = null
videosPrivateByDefault: Boolean = null
}
type CreateUploadStreamReturn {
@ -825,9 +770,7 @@ input VideoMetadataInput {
tableSize: Float = null
lastIntendedSegmentBound: Int = null
streamSegmentType: StreamSegmentTypeEnum = null
private: Boolean = null
endStream: Boolean! = false
clientUploadStatus: ClientUploadStatusEnum = null
resolution: VideoResolution = null
framesPerSecond: Float = null
}