Compare commits

..

No commits in common. "master" and "dean/update-runs-gql-operation" have entirely different histories.

7 changed files with 208 additions and 1205 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,19 +0,0 @@
mutation CommentOnVideo(
$videoId: Int!
$message: String!
$parentCommentId: Int
) {
commentOnVideo(
videoId: $videoId
message: $message
parentCommentId: $parentCommentId
)
}
mutation EditComment($videoId: Int!, $commentId: Int!, $newMessage: String!) {
editComment(videoId: $videoId, commentId: $commentId, newMessage: $newMessage)
}
mutation DeleteComment($videoId: Int!, $commentId: Int!) {
deleteComment(videoId: $videoId, commentId: $commentId)
}

View File

@ -15,17 +15,6 @@ query GetFeed(
} }
} }
fragment UserSocialsFields on UserGQL {
id
username
profileImageUri
followers {
id
username
profileImageUri
}
}
fragment VideoCardFields on VideoGQL { fragment VideoCardFields on VideoGQL {
id id
owner { owner {
@ -51,7 +40,6 @@ fragment VideoCardFields on VideoGQL {
id id
lastIntendedSegmentBound lastIntendedSegmentBound
isCompleted isCompleted
streamSegmentType
} }
tableSize tableSize
tags { tags {
@ -73,23 +61,16 @@ fragment VideoCardFields on VideoGQL {
reactions { reactions {
videoId videoId
user { user {
...UserSocialsFields
}
reaction
}
comments {
id
message
user {
...UserSocialsFields
}
replies {
id id
message username
user { profileImageUri
...UserSocialsFields followers {
id
username
profileImageUri
} }
} }
reaction
} }
} }

View File

@ -2,45 +2,6 @@ query GetRunsForHighlights(
$filterInput: RunFilterInput! $filterInput: RunFilterInput!
$runIds: [Int!] = null $runIds: [Int!] = null
$runsOrdering: GetRunsOrdering $runsOrdering: GetRunsOrdering
$limit: Int! = 500
$countRespectsLimit: Boolean! = false
) {
getRuns(
filterInput: $filterInput
runIds: $runIds
runsOrdering: $runsOrdering
limit: $limit
countRespectsLimit: $countRespectsLimit
) {
count
runs {
id
runLength
userId
videoId
shots {
videoId
id
}
}
runIds
}
}
fragment PocketingIntentionFragment on PocketingIntentionFeaturesGQL {
make
targetPocketDistance
targetPocketAngle
targetPocketAngleDirection
marginOfErrorInDegrees
intendedPocketType
difficulty
}
query GetRunsWithTimestamps(
$filterInput: RunFilterInput!
$runIds: [Int!] = null
$runsOrdering: GetRunsOrdering
) { ) {
getRuns( getRuns(
filterInput: $filterInput filterInput: $filterInput
@ -56,10 +17,6 @@ query GetRunsWithTimestamps(
shots { shots {
videoId videoId
id id
createdAt
pocketingIntentionFeatures {
...PocketingIntentionFragment
}
} }
} }
runIds runIds

View File

@ -185,13 +185,6 @@ fragment ShotWithAllFeatures on ShotGQL {
} }
notes notes
} }
video {
id
stream {
id
streamSegmentType
}
}
} }
mutation EditShot($shotId: Int!, $fieldsToEdit: EditableShotFieldInputGQL!) { mutation EditShot($shotId: Int!, $fieldsToEdit: EditableShotFieldInputGQL!) {

View File

@ -82,57 +82,6 @@ query GetVideoDetails($videoId: Int!) {
} }
} }
fragment UserSocialsFields on UserGQL {
id
username
profileImageUri
followers {
id
username
profileImageUri
}
}
query GetVideoSocialDetailsById($videoId: Int!) {
getVideo(videoId: $videoId) {
id
name
owner {
id
firebaseUid
username
profileImageUri
}
tags {
tagClasses {
name
}
name
}
reactions {
videoId
user {
...UserSocialsFields
}
reaction
}
comments {
id
message
user {
...UserSocialsFields
}
replies {
id
message
user {
...UserSocialsFields
}
}
}
}
}
query GetVideos($videoIds: [Int!]!) { query GetVideos($videoIds: [Int!]!) {
getVideos(videoIds: $videoIds) { getVideos(videoIds: $videoIds) {
...VideoStreamMetadata ...VideoStreamMetadata

View File

@ -5,28 +5,10 @@ type Query {
getBucketSet(keyName: String!): BucketSetGQL getBucketSet(keyName: String!): BucketSetGQL
getDeployedConfig: DeployedConfigGQL! getDeployedConfig: DeployedConfigGQL!
waitFor(duration: Float!): Float! waitFor(duration: Float!): Float!
getFeedVideos(
limit: Int! = 5
after: String = null
includePrivate: IncludePrivateEnum! = MINE
includeCallersVideos: Boolean = true
filters: VideoFilterInput = null
feedInput: VideoFeedInputGQL = null
): VideoHistoryGQL!
getVideoMakePercentageIntervals( getVideoMakePercentageIntervals(
videoId: ID! videoId: ID!
intervalDuration: Int! = 300 intervalDuration: Int! = 300
): [MakePercentageIntervalGQL!]! ): [MakePercentageIntervalGQL!]!
getLongestRunsLeaderboard(
interval: TimeInterval = null
when: DateTime = null
limit: Int! = 100
requiredTags: [String!] = null
): RunLeaderboardGQL!
getMakesLeaderboard(
interval: TimeInterval = null
when: DateTime = null
): CountLeaderboardGQL!
getMedals(scope: MedalScope!, userId: Int = null): RequestedMedalsGQL! getMedals(scope: MedalScope!, userId: Int = null): RequestedMedalsGQL!
getRuns( getRuns(
filterInput: RunFilterInput! filterInput: RunFilterInput!
@ -35,12 +17,6 @@ type Query {
limit: Int! = 500 limit: Int! = 500
countRespectsLimit: Boolean! = false countRespectsLimit: Boolean! = false
): GetRunsResult! ): GetRunsResult!
getShotAnnotationTypes(errorTypes: Boolean = false): [ShotAnnotationTypeGQL!]!
getTableState(
b64Image: String!
tableSize: Float = 100
useHomography: HomographyInputGQL = null
): TableStateGQL!
getOrderedShots( getOrderedShots(
filterInput: FilterInput! filterInput: FilterInput!
ids: [Int!] = null ids: [Int!] = null
@ -62,6 +38,7 @@ type Query {
countRespectsLimit: Boolean! = false countRespectsLimit: Boolean! = false
): [ShotGQL!]! ): [ShotGQL!]!
getShotsByIds(ids: [Int!]!): [ShotGQL!]! getShotsByIds(ids: [Int!]!): [ShotGQL!]!
getShotAnnotationTypes(errorTypes: Boolean = false): [ShotAnnotationTypeGQL!]!
getUser(userId: Int!): UserGQL getUser(userId: Int!): UserGQL
doesUsernameExist(candidateUsername: String!): Boolean! doesUsernameExist(candidateUsername: String!): Boolean!
getLoggedInUser: UserGQL getLoggedInUser: UserGQL
@ -86,6 +63,24 @@ type Query {
getUserTags(includeRetiredTags: Boolean = false): [TagGQL!]! getUserTags(includeRetiredTags: Boolean = false): [TagGQL!]!
getVideo(videoId: Int!, debuggingJson: JSON = null): VideoGQL! getVideo(videoId: Int!, debuggingJson: JSON = null): VideoGQL!
getVideos(videoIds: [Int!]!): [VideoGQL!]! getVideos(videoIds: [Int!]!): [VideoGQL!]!
getFeedVideos(
limit: Int! = 5
after: String = null
includePrivate: IncludePrivateEnum! = MINE
includeCallersVideos: Boolean = true
filters: VideoFilterInput = null
feedInput: VideoFeedInputGQL = null
): VideoHistoryGQL!
getLongestRunsLeaderboard(
interval: TimeInterval = null
when: DateTime = null
limit: Int! = 100
requiredTags: [String!] = null
): RunLeaderboardGQL!
getMakesLeaderboard(
interval: TimeInterval = null
when: DateTime = null
): CountLeaderboardGQL!
} }
type AggregateResultGQL { type AggregateResultGQL {
@ -293,54 +288,70 @@ type DeployedConfigGQL {
minimumAllowedAppVersion: String! minimumAllowedAppVersion: String!
} }
type VideoHistoryGQL { type MakePercentageIntervalGQL {
videos: [VideoGQL!]!
pageInfo: PageInfoGQL!
}
type VideoGQL {
id: Int!
owner: UserGQL
name: String
screenshotUri: String
totalShotsMade: Int!
totalShots: Int!
makePercentage: Float! makePercentage: Float!
medianRun: Float elapsedTime: Float!
averageTimeBetweenShots: Float
averageDifficulty: Float
createdAt: DateTime
updatedAt: DateTime
shots: [ShotGQL!]!
startTime: DateTime
endTime: DateTime
elapsedTime: Float
framesPerSecond: Float!
tableSize: Float!
private: Boolean!
stream: UploadStreamGQL
playlist: HLSPlaylistGQL
tags: [VideoTag!]!
currentHomography: HomographyInfoGQL
homographyHistory: [HomographyInfoGQL!]!
currentProcessing: VideoProcessingGQL
reactions: [ReactionGQL!]!
comments: [CommentGQL!]!
} }
type UserGQL { type RequestedMedalsGQL {
distanceOver66: MedalGQL
distanceOver78: MedalGQL
distanceOver90: MedalGQL
runLength3: MedalGQL
runLength5: MedalGQL
runLength8: MedalGQL
runLength10: MedalGQL
runLength15: MedalGQL
runLength20: MedalGQL
runLength25: MedalGQL
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")
totalMakes100: MedalGQL
totalMakes500: MedalGQL
totalMakes1000: MedalGQL
totalMakes5000: MedalGQL
totalMakes10000: MedalGQL
dailyMakes50: MedalGQL
dailyMakes100: MedalGQL
dailyMakes150: MedalGQL
dailyMakes200: MedalGQL
dailyMakes250: MedalGQL
}
type MedalGQL {
count: Int!
nickname: String
}
input MedalScope @oneOf {
videoId: Int
interval: TimeInterval
@deprecated(reason: "NO LONGER SUPPORTED, USE DATETIME_RANGE")
datetimeRange: DatetimeRangeAggregationInput
}
type GetRunsResult {
runs: [RunGQL!]!
count: Int
runIds: [Int!]!
}
type RunGQL {
id: Int! id: Int!
firebaseUid: String runLength: Int!
username: String! videoId: Int!
isAdmin: Boolean userId: Int!
fargoRating: Int shots: [ShotGQL!]!
activeVideoId: Int video: VideoGQL!
profileImageUri: String user: UserGQL!
createdAt: DateTime
updatedAt: DateTime
videosPrivateByDefault: Boolean
following: [UserGQL!]
followers: [UserGQL!]
} }
type ShotGQL { type ShotGQL {
@ -412,6 +423,21 @@ type SerializedShotPathsGQL {
b64EncodedBuffer: String b64EncodedBuffer: String
} }
type UserGQL {
id: Int!
firebaseUid: String
username: String!
isAdmin: Boolean
fargoRating: Int
activeVideoId: Int
profileImageUri: String
createdAt: DateTime
updatedAt: DateTime
videosPrivateByDefault: Boolean
following: [UserGQL!]
followers: [UserGQL!]
}
type ShotAnnotationGQL { type ShotAnnotationGQL {
shotId: Int! shotId: Int!
type: ShotAnnotationTypeGQL! type: ShotAnnotationTypeGQL!
@ -427,19 +453,33 @@ type ShotAnnotationTypeGQL {
name: String! name: String!
} }
type RunGQL { type VideoGQL {
id: Int! id: Int!
runLength: Int! owner: UserGQL
videoId: Int! name: String
userId: Int! screenshotUri: String
totalShotsMade: Int!
totalShots: Int!
makePercentage: Float!
medianRun: Float
averageTimeBetweenShots: Float
averageDifficulty: Float
createdAt: DateTime
updatedAt: DateTime
shots: [ShotGQL!]! shots: [ShotGQL!]!
video: VideoGQL! startTime: DateTime
user: UserGQL! endTime: DateTime
} elapsedTime: Float
framesPerSecond: Float!
type RunFeaturesGQL { tableSize: Float!
runId: Int! private: Boolean!
indexInRun: Int! stream: UploadStreamGQL
playlist: HLSPlaylistGQL
tags: [VideoTag!]!
currentHomography: HomographyInfoGQL
homographyHistory: [HomographyInfoGQL!]!
currentProcessing: VideoProcessingGQL
reactions: [ReactionGQL!]!
} }
type UploadStreamGQL { type UploadStreamGQL {
@ -588,107 +628,9 @@ enum ReactionEnum {
HUNDRED HUNDRED
} }
type CommentGQL { type RunFeaturesGQL {
id: Int! runId: Int!
user: UserGQL! indexInRun: Int!
message: String!
replies: [CommentGQL!]!
}
type PageInfoGQL {
hasNextPage: Boolean!
endCursor: String
}
enum IncludePrivateEnum {
ALL
MINE
NONE
}
input VideoFilterInput {
isStreamCompleted: Boolean = null
requireCursorCompletion: Boolean! = true
createdAt: DateRangeFilter = null
excludeVideosWithNoShots: Boolean = null
}
input VideoFeedInputGQL @oneOf {
followedByUserId: Int
userId: Int
allUsers: Boolean
}
type MakePercentageIntervalGQL {
makePercentage: Float!
elapsedTime: Float!
}
type RunLeaderboardGQL {
entries: [RunGQL!]!
}
type CountLeaderboardGQL {
entries: [UserShotCountEntry!]!
}
type UserShotCountEntry {
user: UserGQL!
value: Int!
total: Int!
proportionMade: Float!
videos: Int!
}
type RequestedMedalsGQL {
distanceOver66: MedalGQL
distanceOver78: MedalGQL
distanceOver90: MedalGQL
runLength3: MedalGQL
runLength5: MedalGQL
runLength8: MedalGQL
runLength10: MedalGQL
runLength15: MedalGQL
runLength20: MedalGQL
runLength25: MedalGQL
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")
totalMakes100: MedalGQL
totalMakes500: MedalGQL
totalMakes1000: MedalGQL
totalMakes5000: MedalGQL
totalMakes10000: MedalGQL
dailyMakes50: MedalGQL
dailyMakes100: MedalGQL
dailyMakes150: MedalGQL
dailyMakes200: MedalGQL
dailyMakes250: MedalGQL
}
type MedalGQL {
count: Int!
nickname: String
}
input MedalScope @oneOf {
videoId: Int
interval: TimeInterval
@deprecated(reason: "NO LONGER SUPPORTED, USE DATETIME_RANGE")
datetimeRange: DatetimeRangeAggregationInput
}
type GetRunsResult {
runs: [RunGQL!]!
count: Int
runIds: [Int!]!
} }
input RunFilterInput { input RunFilterInput {
@ -723,39 +665,6 @@ input DatetimeOrdering {
startingAt: DateTime = null startingAt: DateTime = null
} }
type TableStateGQL {
identifierToPosition: [[Float!]!]!
homography: HomographyInfoGQL
}
input HomographyInputGQL {
crop: BoundingBoxInputGQL!
pockets: [BoundingBoxInputGQL!]!
sourcePoints: PocketPointsInputGQL!
destPoints: PocketPointsInputGQL!
}
input BoundingBoxInputGQL {
left: Float!
top: Float!
width: Float!
height: Float!
}
input PocketPointsInputGQL {
topLeft: IntPoint2DInput!
topSide: IntPoint2DInput!
topRight: IntPoint2DInput!
bottomLeft: IntPoint2DInput!
bottomSide: IntPoint2DInput!
bottomRight: IntPoint2DInput!
}
input IntPoint2DInput {
x: Int!
y: Int!
}
type GetShotsResult { type GetShotsResult {
shots: [ShotGQL!]! shots: [ShotGQL!]!
count: Int count: Int
@ -805,6 +714,23 @@ type UserPlayTimeGQL {
totalSeconds: Float! totalSeconds: Float!
} }
input VideoFilterInput {
isStreamCompleted: Boolean = null
requireCursorCompletion: Boolean! = true
createdAt: DateRangeFilter = null
excludeVideosWithNoShots: Boolean = null
}
type VideoHistoryGQL {
videos: [VideoGQL!]!
pageInfo: PageInfoGQL!
}
type PageInfoGQL {
hasNextPage: Boolean!
endCursor: String
}
type TagGQL { type TagGQL {
id: Int! id: Int!
name: String! name: String!
@ -825,17 +751,41 @@ scalar JSON
url: "https://ecma-international.org/wp-content/uploads/ECMA-404_2nd_edition_december_2017.pdf" url: "https://ecma-international.org/wp-content/uploads/ECMA-404_2nd_edition_december_2017.pdf"
) )
enum IncludePrivateEnum {
ALL
MINE
NONE
}
input VideoFeedInputGQL @oneOf {
followedByUserId: Int
userId: Int
allUsers: Boolean
}
type RunLeaderboardGQL {
entries: [RunGQL!]!
}
type CountLeaderboardGQL {
entries: [UserShotCountEntry!]!
}
type UserShotCountEntry {
user: UserGQL!
value: Int!
total: Int!
proportionMade: Float!
videos: Int!
}
type Mutation { type Mutation {
createBucketSet(params: CreateBucketSetInput!): BucketSetGQL! createBucketSet(params: CreateBucketSetInput!): BucketSetGQL!
setLoggerLevel(path: String!, level: String!): Boolean! setLoggerLevel(path: String!, level: String!): Boolean!
reactToVideo(videoId: Int!, reaction: ReactionEnum): Boolean! editShot(
commentOnVideo( shotId: Int!
videoId: Int! fieldsToEdit: EditableShotFieldInputGQL!
message: String! ): EditShotReturn!
parentCommentId: Int
): Boolean!
editComment(videoId: Int!, commentId: Int!, newMessage: String!): Boolean!
deleteComment(videoId: Int!, commentId: Int!): Boolean!
addAnnotationToShot( addAnnotationToShot(
shotId: Int! shotId: Int!
annotationName: String! annotationName: String!
@ -845,10 +795,6 @@ type Mutation {
shotId: Int! shotId: Int!
annotations: [UpdateAnnotationInputGQL!]! annotations: [UpdateAnnotationInputGQL!]!
): UpdateShotAnnotationReturn! ): UpdateShotAnnotationReturn!
editShot(
shotId: Int!
fieldsToEdit: EditableShotFieldInputGQL!
): EditShotReturn!
getProfileImageUploadLink( getProfileImageUploadLink(
fileExt: String = ".png" fileExt: String = ".png"
): GetProfileUploadLinkReturn! ): GetProfileUploadLinkReturn!
@ -871,6 +817,7 @@ type Mutation {
editUploadStream(videoId: Int!, videoMetadata: VideoMetadataInput!): Boolean! editUploadStream(videoId: Int!, videoMetadata: VideoMetadataInput!): Boolean!
deleteVideo(videoId: Int!): Boolean! deleteVideo(videoId: Int!): Boolean!
deleteTags(videoId: Int!, tagsToDelete: [VideoTagInput!]!): Boolean! deleteTags(videoId: Int!, tagsToDelete: [VideoTagInput!]!): Boolean!
reactToVideo(videoId: Int!, reaction: ReactionEnum): Boolean!
} }
input CreateBucketSetInput { input CreateBucketSetInput {
@ -879,6 +826,27 @@ input CreateBucketSetInput {
buckets: [BucketInputGQL!]! buckets: [BucketInputGQL!]!
} }
type EditShotReturn {
shot: ShotGQL
error: DoesNotOwnShotErr
}
type DoesNotOwnShotErr {
shotId: Int!
msg: String
}
input EditableShotFieldInputGQL {
intendedPocketType: PocketEnum
shotDirection: ShotDirectionEnum
spinType: SpinTypeEnum
targetPocketAngleDirection: ShotDirectionEnum
make: Boolean
backcut: Boolean
excludeFromStats: Boolean
notes: String
}
type AddShotAnnotationReturn { type AddShotAnnotationReturn {
value: SuccessfulAddAddShotAnnotationErrors! value: SuccessfulAddAddShotAnnotationErrors!
} }
@ -899,11 +867,6 @@ union DoesNotOwnShotErrOtherErrorNeedsNote =
DoesNotOwnShotErr DoesNotOwnShotErr
| OtherErrorNeedsNote | OtherErrorNeedsNote
type DoesNotOwnShotErr {
shotId: Int!
msg: String
}
type OtherErrorNeedsNote { type OtherErrorNeedsNote {
msg: String msg: String
} }
@ -918,22 +881,6 @@ input UpdateAnnotationInputGQL {
notes: String = null notes: String = null
} }
type EditShotReturn {
shot: ShotGQL
error: DoesNotOwnShotErr
}
input EditableShotFieldInputGQL {
intendedPocketType: PocketEnum
shotDirection: ShotDirectionEnum
spinType: SpinTypeEnum
targetPocketAngleDirection: ShotDirectionEnum
make: Boolean
backcut: Boolean
excludeFromStats: Boolean
notes: String
}
type GetProfileUploadLinkReturn { type GetProfileUploadLinkReturn {
value: UploadLinkGetProfileUploadLinkErrors! value: UploadLinkGetProfileUploadLinkErrors!
} }