Moar fragments!

This commit is contained in:
Kat Huang 2024-10-16 23:39:14 -06:00
parent 19a63b9d19
commit 9dc426ea0f
3 changed files with 135 additions and 102 deletions

View File

@ -2483,18 +2483,6 @@ export type GetShotsWithMetadataFilterResultQuery = {
createdAt?: any | null; createdAt?: any | null;
updatedAt?: any | null; updatedAt?: any | null;
user?: { __typename?: "UserGQL"; id: number } | null; user?: { __typename?: "UserGQL"; id: number } | null;
video?: {
__typename?: "VideoGQL";
id: number;
stream?: {
__typename?: "UploadStreamGQL";
resolution: {
__typename?: "VideoResolutionGQL";
width?: number | null;
height?: number | null;
};
} | null;
} | null;
cueObjectFeatures?: { cueObjectFeatures?: {
__typename?: "CueObjectFeaturesGQL"; __typename?: "CueObjectFeaturesGQL";
cueObjectDistance?: number | null; cueObjectDistance?: number | null;
@ -2551,18 +2539,6 @@ export type GetShotsWithMetadataQuery = {
createdAt?: any | null; createdAt?: any | null;
updatedAt?: any | null; updatedAt?: any | null;
user?: { __typename?: "UserGQL"; id: number } | null; user?: { __typename?: "UserGQL"; id: number } | null;
video?: {
__typename?: "VideoGQL";
id: number;
stream?: {
__typename?: "UploadStreamGQL";
resolution: {
__typename?: "VideoResolutionGQL";
width?: number | null;
height?: number | null;
};
} | null;
} | null;
cueObjectFeatures?: { cueObjectFeatures?: {
__typename?: "CueObjectFeaturesGQL"; __typename?: "CueObjectFeaturesGQL";
cueObjectDistance?: number | null; cueObjectDistance?: number | null;
@ -2612,18 +2588,6 @@ export type GetShotsByIdsQuery = {
createdAt?: any | null; createdAt?: any | null;
updatedAt?: any | null; updatedAt?: any | null;
user?: { __typename?: "UserGQL"; id: number } | null; user?: { __typename?: "UserGQL"; id: number } | null;
video?: {
__typename?: "VideoGQL";
id: number;
stream?: {
__typename?: "UploadStreamGQL";
resolution: {
__typename?: "VideoResolutionGQL";
width?: number | null;
height?: number | null;
};
} | null;
} | null;
cueObjectFeatures?: { cueObjectFeatures?: {
__typename?: "CueObjectFeaturesGQL"; __typename?: "CueObjectFeaturesGQL";
cueObjectDistance?: number | null; cueObjectDistance?: number | null;
@ -2666,18 +2630,6 @@ export type ShotWithAllFeaturesFragment = {
createdAt?: any | null; createdAt?: any | null;
updatedAt?: any | null; updatedAt?: any | null;
user?: { __typename?: "UserGQL"; id: number } | null; user?: { __typename?: "UserGQL"; id: number } | null;
video?: {
__typename?: "VideoGQL";
id: number;
stream?: {
__typename?: "UploadStreamGQL";
resolution: {
__typename?: "VideoResolutionGQL";
width?: number | null;
height?: number | null;
};
} | null;
} | null;
cueObjectFeatures?: { cueObjectFeatures?: {
__typename?: "CueObjectFeaturesGQL"; __typename?: "CueObjectFeaturesGQL";
cueObjectDistance?: number | null; cueObjectDistance?: number | null;
@ -3101,6 +3053,62 @@ export type GetMedianRunForVideoQuery = {
getVideo: { __typename?: "VideoGQL"; id: number; medianRun?: number | null }; getVideo: { __typename?: "VideoGQL"; id: number; medianRun?: number | null };
}; };
export type StreamWithEndFramesFragment = {
__typename?: "UploadStreamGQL";
id: string;
streamSegmentType: StreamSegmentTypeEnum;
segmentEndFrames: Array<number>;
resolution: {
__typename?: "VideoResolutionGQL";
width?: number | null;
height?: number | null;
};
segments: Array<{
__typename?: "UploadSegmentGQL";
uploaded: boolean;
valid: boolean;
segmentIndex: number;
endFrameIndex?: number | null;
framesPerSecond?: number | null;
}>;
};
export type PlaylistWithSegmentStartTimesFragment = {
__typename?: "HLSPlaylistGQL";
segmentDurations: Array<number>;
segmentStartTimes: Array<number>;
};
export type VideoDurationDataFragment = {
__typename?: "VideoGQL";
id: number;
framesPerSecond: number;
playlist?: {
__typename?: "HLSPlaylistGQL";
segmentDurations: Array<number>;
segmentStartTimes: Array<number>;
} | null;
stream?: {
__typename?: "UploadStreamGQL";
id: string;
streamSegmentType: StreamSegmentTypeEnum;
segmentEndFrames: Array<number>;
resolution: {
__typename?: "VideoResolutionGQL";
width?: number | null;
height?: number | null;
};
segments: Array<{
__typename?: "UploadSegmentGQL";
uploaded: boolean;
valid: boolean;
segmentIndex: number;
endFrameIndex?: number | null;
framesPerSecond?: number | null;
}>;
} | null;
};
export type GetVideoForClipTimesQueryVariables = Exact<{ export type GetVideoForClipTimesQueryVariables = Exact<{
videoId: Scalars["Int"]["input"]; videoId: Scalars["Int"]["input"];
}>; }>;
@ -3121,6 +3129,11 @@ export type GetVideoForClipTimesQuery = {
id: string; id: string;
streamSegmentType: StreamSegmentTypeEnum; streamSegmentType: StreamSegmentTypeEnum;
segmentEndFrames: Array<number>; segmentEndFrames: Array<number>;
resolution: {
__typename?: "VideoResolutionGQL";
width?: number | null;
height?: number | null;
};
segments: Array<{ segments: Array<{
__typename?: "UploadSegmentGQL"; __typename?: "UploadSegmentGQL";
uploaded: boolean; uploaded: boolean;
@ -3331,15 +3344,6 @@ export const ShotWithAllFeaturesFragmentDoc = gql`
id id
} }
falsePositiveScore falsePositiveScore
video {
id
stream {
resolution {
width
height
}
}
}
createdAt createdAt
updatedAt updatedAt
cueObjectFeatures { cueObjectFeatures {
@ -3387,6 +3391,44 @@ export const VideoStreamMetadataFragmentDoc = gql`
} }
} }
`; `;
export const PlaylistWithSegmentStartTimesFragmentDoc = gql`
fragment PlaylistWithSegmentStartTimes on HLSPlaylistGQL {
segmentDurations
segmentStartTimes @client
}
`;
export const StreamWithEndFramesFragmentDoc = gql`
fragment StreamWithEndFrames on UploadStreamGQL {
id
streamSegmentType
segmentEndFrames @client
resolution {
width
height
}
segments {
uploaded
valid
segmentIndex
endFrameIndex
framesPerSecond
}
}
`;
export const VideoDurationDataFragmentDoc = gql`
fragment VideoDurationData on VideoGQL {
id
framesPerSecond
playlist {
...PlaylistWithSegmentStartTimes
}
stream {
...StreamWithEndFrames
}
}
${PlaylistWithSegmentStartTimesFragmentDoc}
${StreamWithEndFramesFragmentDoc}
`;
export const GetAggregatedShotMetricsDocument = gql` export const GetAggregatedShotMetricsDocument = gql`
query GetAggregatedShotMetrics($aggregateInput: AggregateInputGQL!) { query GetAggregatedShotMetrics($aggregateInput: AggregateInputGQL!) {
getAggregatedShotMetrics(aggregateInput: $aggregateInput) { getAggregatedShotMetrics(aggregateInput: $aggregateInput) {
@ -5491,26 +5533,10 @@ export type GetMedianRunForVideoQueryResult = Apollo.QueryResult<
export const GetVideoForClipTimesDocument = gql` export const GetVideoForClipTimesDocument = gql`
query GetVideoForClipTimes($videoId: Int!) { query GetVideoForClipTimes($videoId: Int!) {
getVideo(videoId: $videoId) { getVideo(videoId: $videoId) {
id ...VideoDurationData
framesPerSecond
playlist {
segmentDurations
segmentStartTimes
}
stream {
id
streamSegmentType
segmentEndFrames
segments {
uploaded
valid
segmentIndex
endFrameIndex
framesPerSecond
}
}
} }
} }
${VideoDurationDataFragmentDoc}
`; `;
/** /**

View File

@ -90,15 +90,6 @@ fragment ShotWithAllFeatures on ShotGQL {
id id
} }
falsePositiveScore falsePositiveScore
video {
id
stream {
resolution {
width
height
}
}
}
createdAt createdAt
updatedAt updatedAt
cueObjectFeatures { cueObjectFeatures {

View File

@ -229,18 +229,14 @@ query GetMedianRunForVideo($videoId: Int!) {
} }
} }
query GetVideoForClipTimes($videoId: Int!) { fragment StreamWithEndFrames on UploadStreamGQL {
getVideo(videoId: $videoId) {
id
framesPerSecond
playlist {
segmentDurations
segmentStartTimes
}
stream {
id id
streamSegmentType streamSegmentType
segmentEndFrames segmentEndFrames @client
resolution {
width
height
}
segments { segments {
uploaded uploaded
valid valid
@ -249,6 +245,26 @@ query GetVideoForClipTimes($videoId: Int!) {
framesPerSecond framesPerSecond
} }
} }
fragment PlaylistWithSegmentStartTimes on HLSPlaylistGQL {
segmentDurations
segmentStartTimes @client
}
fragment VideoDurationData on VideoGQL {
id
framesPerSecond
playlist {
...PlaylistWithSegmentStartTimes
}
stream {
...StreamWithEndFrames
}
}
query GetVideoForClipTimes($videoId: Int!) {
getVideo(videoId: $videoId) {
...VideoDurationData
} }
} }