Crate shot with all features fragment (#63)

Reviewed-on: #63
Reviewed-by: Ivan Malison <ivanmalison@gmail.com>
This commit is contained in:
2024-10-01 19:19:39 -06:00
parent ce54bef0b4
commit b58aecf7a5
2 changed files with 111 additions and 114 deletions

View File

@@ -140,52 +140,42 @@ query GetShotsWithMetadata(
}
}
query GetShotsByIds(
$ids: [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
) {
getShotsByIds(ids: $ids) {
fragment ShotWithAllFeatures on ShotGQL {
id
videoId
startFrame
endFrame
falsePositiveScore
createdAt
updatedAt
user {
id
videoId
startFrame
endFrame
user {
id
}
falsePositiveScore
video {
stream {
resolution {
width
height
}
}
video {
id
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)
}
}
cueObjectFeatures {
cueObjectDistance
cueObjectAngle
cueBallSpeed
shotDirection
spinType
}
pocketingIntentionFeatures {
targetPocketDistance
make
intendedPocketType
}
}
query GetShotsByIds($ids: [Int!]!) {
getShotsByIds(ids: $ids) {
...ShotWithAllFeatures
}
}