Compare commits
18 Commits
kat/update
...
ivan/add-c
Author | SHA1 | Date | |
---|---|---|---|
d619751144 | |||
e431a1751f | |||
209f0aa019 | |||
70015a942c | |||
91cfcb28e7 | |||
b2a09c1b8c | |||
59aaf47cbe | |||
c426e753cd | |||
c8cf97421b | |||
9718137ad3 | |||
af1fb3fee7 | |||
025baf257a | |||
8239ab6e1b | |||
1f018f954e | |||
fd78ddf641 | |||
7662f1f050 | |||
890bea2571 | |||
f57f6dc32d |
@@ -1,5 +1,7 @@
|
|||||||
overwrite: true
|
overwrite: true
|
||||||
schema: "src/schema.gql"
|
schema:
|
||||||
|
- "src/schema.gql"
|
||||||
|
- "src/client-schema.gql"
|
||||||
documents: "src/**/*.gql"
|
documents: "src/**/*.gql"
|
||||||
generates:
|
generates:
|
||||||
src/index.tsx:
|
src/index.tsx:
|
||||||
|
7
src/client-schema.gql
Normal file
7
src/client-schema.gql
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# see: https://www.apollographql.com/docs/react/local-state/managing-state-with-field-policies/
|
||||||
|
directive @client on FIELD
|
||||||
|
|
||||||
|
extend type ShotGQL {
|
||||||
|
startTime: Float!
|
||||||
|
endTime: Float!
|
||||||
|
}
|
735
src/index.tsx
735
src/index.tsx
File diff suppressed because it is too large
Load Diff
@@ -17,6 +17,42 @@ query GetShotAnnotationTypes {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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(
|
query GetShotsWithMetadata(
|
||||||
$filterInput: FilterInput!
|
$filterInput: FilterInput!
|
||||||
$shotsPagination: GetShotsPagination
|
$shotsPagination: GetShotsPagination
|
||||||
@@ -48,11 +84,14 @@ fragment ShotWithAllFeatures on ShotGQL {
|
|||||||
videoId
|
videoId
|
||||||
startFrame
|
startFrame
|
||||||
endFrame
|
endFrame
|
||||||
|
startTime @client
|
||||||
|
endTime @client
|
||||||
user {
|
user {
|
||||||
id
|
id
|
||||||
}
|
}
|
||||||
falsePositiveScore
|
falsePositiveScore
|
||||||
video {
|
video {
|
||||||
|
id
|
||||||
stream {
|
stream {
|
||||||
resolution {
|
resolution {
|
||||||
width
|
width
|
||||||
@@ -70,8 +109,11 @@ fragment ShotWithAllFeatures on ShotGQL {
|
|||||||
spinType
|
spinType
|
||||||
}
|
}
|
||||||
pocketingIntentionFeatures {
|
pocketingIntentionFeatures {
|
||||||
targetPocketDistance
|
|
||||||
make
|
make
|
||||||
|
targetPocketDistance
|
||||||
|
targetPocketAngle
|
||||||
|
targetPocketAngleDirection
|
||||||
|
marginOfErrorInDegrees
|
||||||
intendedPocketType
|
intendedPocketType
|
||||||
}
|
}
|
||||||
pocketingIntentionInfo {
|
pocketingIntentionInfo {
|
||||||
|
@@ -117,6 +117,11 @@ query GetVideoDetails($videoId: Int!) {
|
|||||||
|
|
||||||
query GetVideos($videoIds: [Int!]!) {
|
query GetVideos($videoIds: [Int!]!) {
|
||||||
getVideos(videoIds: $videoIds) {
|
getVideos(videoIds: $videoIds) {
|
||||||
|
...VideoStreamMetadata
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fragment VideoStreamMetadata on VideoGQL {
|
||||||
id
|
id
|
||||||
framesPerSecond
|
framesPerSecond
|
||||||
stream {
|
stream {
|
||||||
@@ -133,9 +138,13 @@ query GetVideos($videoIds: [Int!]!) {
|
|||||||
playlist {
|
playlist {
|
||||||
segmentDurations
|
segmentDurations
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
query GetVideoForShotTime($videoId: Int!) {
|
||||||
|
getVideo(videoId: $videoId) {
|
||||||
|
...VideoStreamMetadata
|
||||||
|
}
|
||||||
|
}
|
||||||
query GetVideo($videoId: Int!) {
|
query GetVideo($videoId: Int!) {
|
||||||
getVideo(videoId: $videoId) {
|
getVideo(videoId: $videoId) {
|
||||||
id
|
id
|
||||||
@@ -237,3 +246,11 @@ query GetVideoForClipTimes($videoId: Int!) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
query GetHeaderInfoByVideoId($videoId: Int!) {
|
||||||
|
getVideo(videoId: $videoId) {
|
||||||
|
id
|
||||||
|
name
|
||||||
|
startTime
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -125,6 +125,7 @@ enum AlignedIntervalEnum {
|
|||||||
MONTH
|
MONTH
|
||||||
YEAR
|
YEAR
|
||||||
WEEK
|
WEEK
|
||||||
|
DAY
|
||||||
}
|
}
|
||||||
|
|
||||||
input FilterInput @oneOf {
|
input FilterInput @oneOf {
|
||||||
@@ -140,6 +141,7 @@ input FilterInput @oneOf {
|
|||||||
shotDirection: [ShotDirectionEnum!]
|
shotDirection: [ShotDirectionEnum!]
|
||||||
videoId: [Int!]
|
videoId: [Int!]
|
||||||
userId: [Int!]
|
userId: [Int!]
|
||||||
|
username: [String!]
|
||||||
make: [Boolean!]
|
make: [Boolean!]
|
||||||
tags: [VideoTagInput!]
|
tags: [VideoTagInput!]
|
||||||
annotations: [ShotAnnotationInput!]
|
annotations: [ShotAnnotationInput!]
|
||||||
@@ -162,6 +164,7 @@ input FilterInput @oneOf {
|
|||||||
targetPocketAngleDirection: [ShotDirectionEnum!]
|
targetPocketAngleDirection: [ShotDirectionEnum!]
|
||||||
targetPocketAngle: FloatRangeFilter
|
targetPocketAngle: FloatRangeFilter
|
||||||
missAngleInDegrees: FloatRangeFilter
|
missAngleInDegrees: FloatRangeFilter
|
||||||
|
marginOfErrorInDegrees: FloatRangeFilter
|
||||||
createdAt: DateRangeFilter
|
createdAt: DateRangeFilter
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -282,6 +285,7 @@ type PocketingIntentionFeaturesGQL {
|
|||||||
difficulty: Float
|
difficulty: Float
|
||||||
targetPocketAngle: Float
|
targetPocketAngle: Float
|
||||||
targetPocketAngleDirection: ShotDirectionEnum
|
targetPocketAngleDirection: ShotDirectionEnum
|
||||||
|
marginOfErrorInDegrees: Float
|
||||||
backcut: Boolean
|
backcut: Boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -541,6 +545,10 @@ type Mutation {
|
|||||||
annotationName: String!
|
annotationName: String!
|
||||||
notes: String = null
|
notes: String = null
|
||||||
): AddShotAnnotationReturn!
|
): AddShotAnnotationReturn!
|
||||||
|
updateShotAnnotations(
|
||||||
|
shotId: Int!
|
||||||
|
annotations: [UpdateAnnotationInputGQL!]!
|
||||||
|
): UpdateShotAnnotationReturn!
|
||||||
getProfileImageUploadLink(
|
getProfileImageUploadLink(
|
||||||
fileExt: String = ".png"
|
fileExt: String = ".png"
|
||||||
): GetProfileUploadLinkReturn!
|
): GetProfileUploadLinkReturn!
|
||||||
@@ -594,6 +602,27 @@ type OtherErrorNeedsNote {
|
|||||||
msg: String
|
msg: String
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type UpdateShotAnnotationReturn {
|
||||||
|
value: SuccessfulUpdateUpdateShotAnnotationErrors!
|
||||||
|
}
|
||||||
|
|
||||||
|
union SuccessfulUpdateUpdateShotAnnotationErrors =
|
||||||
|
SuccessfulUpdate
|
||||||
|
| UpdateShotAnnotationErrors
|
||||||
|
|
||||||
|
type SuccessfulUpdate {
|
||||||
|
value: Boolean!
|
||||||
|
}
|
||||||
|
|
||||||
|
type UpdateShotAnnotationErrors {
|
||||||
|
error: DoesNotOwnShotErr
|
||||||
|
}
|
||||||
|
|
||||||
|
input UpdateAnnotationInputGQL {
|
||||||
|
name: String!
|
||||||
|
notes: String = null
|
||||||
|
}
|
||||||
|
|
||||||
type GetProfileUploadLinkReturn {
|
type GetProfileUploadLinkReturn {
|
||||||
value: UploadLinkGetProfileUploadLinkErrors!
|
value: UploadLinkGetProfileUploadLinkErrors!
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user