Kat Huang 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

126 lines
2.0 KiB
GraphQL

query GetSerializedShotPaths($filterInput: FilterInput!) {
getShots(filterInput: $filterInput) {
id
videoId
startFrame
endFrame
serializedShotPaths {
b64EncodedBuffer
}
}
}
query GetShotAnnotationTypes {
getShotAnnotationTypes {
id
name
}
}
query GetShotsWithVideoGql($filterInput: FilterInput!, $limit: Int) {
getShotsWithMetadata(filterInput: $filterInput, limit: $limit) {
ids
shots {
id
videoId
video {
screenshotUri
endTime
}
}
}
}
## Reserved for playlists (which are created from a filter)
query GetShotsWithMetadataFilterResult(
$filterInput: FilterInput!
$shotsPagination: GetShotsPagination
$limit: Int
$ids: [Int!]
) {
getShotsWithMetadata(
filterInput: $filterInput
shotsPagination: $shotsPagination
limit: $limit
ids: $ids
) {
count
shots {
...ShotWithAllFeatures
}
ids
}
}
# TODO: Delete
query GetShotsWithMetadata(
$filterInput: FilterInput!
$shotsPagination: GetShotsPagination
$limit: Int
$ids: [Int!]
) {
getShotsWithMetadata(
filterInput: $filterInput
shotsPagination: $shotsPagination
limit: $limit
ids: $ids
) {
count
shots {
...ShotWithAllFeatures
}
ids
}
}
query GetShotsByIds($ids: [Int!]!) {
getShotsByIds(ids: $ids) {
...ShotWithAllFeatures
}
}
fragment ShotWithAllFeatures on ShotGQL {
id
videoId
startFrame
endFrame
user {
id
}
falsePositiveScore
video {
id
stream {
resolution {
width
height
}
}
}
createdAt
updatedAt
cueObjectFeatures {
cueObjectDistance
cueObjectAngle
cueBallSpeed
shotDirection
spinType
}
pocketingIntentionFeatures {
make
targetPocketDistance
targetPocketAngle
targetPocketAngleDirection
marginOfErrorInDegrees
intendedPocketType
}
pocketingIntentionInfo {
ballId
pocketId
pathMetadataIndex
}
serializedShotPaths {
b64EncodedBuffer
}
}