Use ShotWithAllFeatures in getAllShots
All checks were successful
Tests / Tests (pull_request) Successful in 13s

This commit is contained in:
2024-10-02 18:15:00 -06:00
parent 7d0f9870dd
commit 31fb95e3b0
2 changed files with 87 additions and 179 deletions

View File

@@ -21,18 +21,6 @@ query GetShotsWithMetadata(
$filterInput: FilterInput!
$shotsPagination: GetShotsPagination
$limit: Int
$includeCreatedAt: Boolean! = false
$includeUpdatedAt: Boolean! = false
$includeCueObjectFeatures: Boolean! = false
$includePocketingIntentionFeatures: Boolean! = false
$includeCueObjectDistance: Boolean! = false
$includeCueObjectAngle: Boolean! = false
$includeCueBallSpeed: Boolean! = false
$includeSpinType: Boolean! = false
$includeShotDirection: Boolean! = false
$includeTargetPocketDistance: Boolean! = false
$includeMake: Boolean! = false
$includeIntendedPocketType: Boolean! = false
) {
getShotsWithMetadata(
filterInput: $filterInput
@@ -41,62 +29,27 @@ query GetShotsWithMetadata(
) {
count
shots {
id
videoId
startFrame
endFrame
user {
id
}
falsePositiveScore
video {
stream {
resolution {
width
height
}
}
}
createdAt @include(if: $includeCreatedAt)
updatedAt @include(if: $includeUpdatedAt)
cueObjectFeatures @include(if: $includeCueObjectFeatures) {
cueObjectDistance @include(if: $includeCueObjectDistance)
cueObjectAngle @include(if: $includeCueObjectAngle)
cueBallSpeed @include(if: $includeCueBallSpeed)
shotDirection @include(if: $includeShotDirection)
spinType @include(if: $includeSpinType)
}
pocketingIntentionFeatures
@include(if: $includePocketingIntentionFeatures) {
targetPocketDistance @include(if: $includeTargetPocketDistance)
make @include(if: $includeMake)
intendedPocketType @include(if: $includeIntendedPocketType)
}
pocketingIntentionInfo @include(if: $includePocketingIntentionFeatures) {
ballId
pocketId
pathMetadataIndex
}
serializedShotPaths @include(if: $includePocketingIntentionFeatures) {
b64EncodedBuffer
}
...ShotWithAllFeatures
}
}
}
query GetShotsByIds($ids: [Int!]!) {
getShotsByIds(ids: $ids) {
...ShotWithAllFeatures
}
}
fragment ShotWithAllFeatures on ShotGQL {
id
videoId
startFrame
endFrame
falsePositiveScore
createdAt
updatedAt
user {
id
}
falsePositiveScore
video {
id
stream {
resolution {
width
@@ -104,6 +57,8 @@ fragment ShotWithAllFeatures on ShotGQL {
}
}
}
createdAt
updatedAt
cueObjectFeatures {
cueObjectDistance
cueObjectAngle
@@ -116,10 +71,12 @@ fragment ShotWithAllFeatures on ShotGQL {
make
intendedPocketType
}
}
query GetShotsByIds($ids: [Int!]!) {
getShotsByIds(ids: $ids) {
...ShotWithAllFeatures
pocketingIntentionInfo {
ballId
pocketId
pathMetadataIndex
}
serializedShotPaths {
b64EncodedBuffer
}
}