Compare commits
6 Commits
kat/add-ge
...
kat/video-
Author | SHA1 | Date | |
---|---|---|---|
c7642e6204 | |||
b2ce1c2f96 | |||
d0cf071934 | |||
6b410b3d78 | |||
607504261c | |||
0421be855d |
203
src/index.tsx
203
src/index.tsx
@@ -2750,7 +2750,7 @@ export type GetFeedQueryVariables = Exact<{
|
||||
|
||||
export type GetFeedQuery = {
|
||||
__typename?: "Query";
|
||||
getFeedVideos: {
|
||||
getUserVideos: {
|
||||
__typename?: "VideoHistoryGQL";
|
||||
videos: Array<{
|
||||
__typename?: "VideoGQL";
|
||||
@@ -2786,6 +2786,87 @@ export type GetFeedQuery = {
|
||||
};
|
||||
};
|
||||
|
||||
export type VideoCardFieldsFragment = {
|
||||
__typename?: "VideoGQL";
|
||||
id: number;
|
||||
name?: string | null;
|
||||
screenshotUri?: string | null;
|
||||
totalShotsMade: number;
|
||||
totalShots: number;
|
||||
makePercentage: number;
|
||||
createdAt?: any | null;
|
||||
updatedAt?: any | null;
|
||||
startTime?: any | null;
|
||||
endTime?: any | null;
|
||||
elapsedTime?: number | null;
|
||||
tableSize: number;
|
||||
owner?: {
|
||||
__typename?: "UserGQL";
|
||||
id: number;
|
||||
username: string;
|
||||
profileImageUri?: string | null;
|
||||
} | null;
|
||||
stream?: {
|
||||
__typename?: "UploadStreamGQL";
|
||||
id: string;
|
||||
isCompleted: boolean;
|
||||
} | null;
|
||||
tags: Array<{
|
||||
__typename?: "VideoTag";
|
||||
name: string;
|
||||
tagClasses: Array<{ __typename?: "VideoTagClass"; name: string }>;
|
||||
}>;
|
||||
};
|
||||
|
||||
export type GetVideoFeedQueryVariables = Exact<{
|
||||
limit?: Scalars["Int"]["input"];
|
||||
after?: InputMaybe<Scalars["String"]["input"]>;
|
||||
filters?: InputMaybe<VideoFilterInput>;
|
||||
}>;
|
||||
|
||||
export type GetVideoFeedQuery = {
|
||||
__typename?: "Query";
|
||||
getFeedVideos: {
|
||||
__typename?: "VideoHistoryGQL";
|
||||
videos: Array<{
|
||||
__typename?: "VideoGQL";
|
||||
id: number;
|
||||
name?: string | null;
|
||||
screenshotUri?: string | null;
|
||||
totalShotsMade: number;
|
||||
totalShots: number;
|
||||
makePercentage: number;
|
||||
createdAt?: any | null;
|
||||
updatedAt?: any | null;
|
||||
startTime?: any | null;
|
||||
endTime?: any | null;
|
||||
elapsedTime?: number | null;
|
||||
tableSize: number;
|
||||
owner?: {
|
||||
__typename?: "UserGQL";
|
||||
id: number;
|
||||
username: string;
|
||||
profileImageUri?: string | null;
|
||||
} | null;
|
||||
stream?: {
|
||||
__typename?: "UploadStreamGQL";
|
||||
id: string;
|
||||
isCompleted: boolean;
|
||||
} | null;
|
||||
tags: Array<{
|
||||
__typename?: "VideoTag";
|
||||
name: string;
|
||||
tagClasses: Array<{ __typename?: "VideoTagClass"; name: string }>;
|
||||
}>;
|
||||
}>;
|
||||
pageInfo: {
|
||||
__typename?: "PageInfoGQL";
|
||||
hasNextPage: boolean;
|
||||
endCursor?: string | null;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
export type GetVideoMakePercentageIntervalsQueryVariables = Exact<{
|
||||
videoId: Scalars["ID"]["input"];
|
||||
intervalDuration: Scalars["Int"]["input"];
|
||||
@@ -3908,6 +3989,38 @@ export type GetUploadStreamsWithDetailsQuery = {
|
||||
};
|
||||
};
|
||||
|
||||
export const VideoCardFieldsFragmentDoc = gql`
|
||||
fragment VideoCardFields on VideoGQL {
|
||||
id
|
||||
owner {
|
||||
id
|
||||
username
|
||||
profileImageUri
|
||||
}
|
||||
name
|
||||
screenshotUri
|
||||
totalShotsMade
|
||||
totalShots
|
||||
makePercentage
|
||||
createdAt
|
||||
updatedAt
|
||||
startTime
|
||||
endTime
|
||||
elapsedTime
|
||||
screenshotUri
|
||||
stream {
|
||||
id
|
||||
isCompleted
|
||||
}
|
||||
tableSize
|
||||
tags {
|
||||
tagClasses {
|
||||
name
|
||||
}
|
||||
name
|
||||
}
|
||||
}
|
||||
`;
|
||||
export const ShotWithAllFeaturesFragmentDoc = gql`
|
||||
fragment ShotWithAllFeatures on ShotGQL {
|
||||
id
|
||||
@@ -4188,7 +4301,7 @@ export const GetFeedDocument = gql`
|
||||
$after: String = null
|
||||
$filters: VideoFilterInput = null
|
||||
) {
|
||||
getFeedVideos(limit: $limit, after: $after, filters: $filters) {
|
||||
getUserVideos(limit: $limit, after: $after, filters: $filters) {
|
||||
videos {
|
||||
id
|
||||
owner {
|
||||
@@ -4285,6 +4398,92 @@ export type GetFeedQueryResult = Apollo.QueryResult<
|
||||
GetFeedQuery,
|
||||
GetFeedQueryVariables
|
||||
>;
|
||||
export const GetVideoFeedDocument = gql`
|
||||
query GetVideoFeed(
|
||||
$limit: Int! = 5
|
||||
$after: String = null
|
||||
$filters: VideoFilterInput = null
|
||||
) {
|
||||
getFeedVideos(limit: $limit, after: $after, filters: $filters) {
|
||||
videos {
|
||||
...VideoCardFields
|
||||
}
|
||||
pageInfo {
|
||||
hasNextPage
|
||||
endCursor
|
||||
}
|
||||
}
|
||||
}
|
||||
${VideoCardFieldsFragmentDoc}
|
||||
`;
|
||||
|
||||
/**
|
||||
* __useGetVideoFeedQuery__
|
||||
*
|
||||
* To run a query within a React component, call `useGetVideoFeedQuery` and pass it any options that fit your needs.
|
||||
* When your component renders, `useGetVideoFeedQuery` returns an object from Apollo Client that contains loading, error, and data properties
|
||||
* you can use to render your UI.
|
||||
*
|
||||
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
|
||||
*
|
||||
* @example
|
||||
* const { data, loading, error } = useGetVideoFeedQuery({
|
||||
* variables: {
|
||||
* limit: // value for 'limit'
|
||||
* after: // value for 'after'
|
||||
* filters: // value for 'filters'
|
||||
* },
|
||||
* });
|
||||
*/
|
||||
export function useGetVideoFeedQuery(
|
||||
baseOptions?: Apollo.QueryHookOptions<
|
||||
GetVideoFeedQuery,
|
||||
GetVideoFeedQueryVariables
|
||||
>,
|
||||
) {
|
||||
const options = { ...defaultOptions, ...baseOptions };
|
||||
return Apollo.useQuery<GetVideoFeedQuery, GetVideoFeedQueryVariables>(
|
||||
GetVideoFeedDocument,
|
||||
options,
|
||||
);
|
||||
}
|
||||
export function useGetVideoFeedLazyQuery(
|
||||
baseOptions?: Apollo.LazyQueryHookOptions<
|
||||
GetVideoFeedQuery,
|
||||
GetVideoFeedQueryVariables
|
||||
>,
|
||||
) {
|
||||
const options = { ...defaultOptions, ...baseOptions };
|
||||
return Apollo.useLazyQuery<GetVideoFeedQuery, GetVideoFeedQueryVariables>(
|
||||
GetVideoFeedDocument,
|
||||
options,
|
||||
);
|
||||
}
|
||||
export function useGetVideoFeedSuspenseQuery(
|
||||
baseOptions?: Apollo.SuspenseQueryHookOptions<
|
||||
GetVideoFeedQuery,
|
||||
GetVideoFeedQueryVariables
|
||||
>,
|
||||
) {
|
||||
const options = { ...defaultOptions, ...baseOptions };
|
||||
return Apollo.useSuspenseQuery<GetVideoFeedQuery, GetVideoFeedQueryVariables>(
|
||||
GetVideoFeedDocument,
|
||||
options,
|
||||
);
|
||||
}
|
||||
export type GetVideoFeedQueryHookResult = ReturnType<
|
||||
typeof useGetVideoFeedQuery
|
||||
>;
|
||||
export type GetVideoFeedLazyQueryHookResult = ReturnType<
|
||||
typeof useGetVideoFeedLazyQuery
|
||||
>;
|
||||
export type GetVideoFeedSuspenseQueryHookResult = ReturnType<
|
||||
typeof useGetVideoFeedSuspenseQuery
|
||||
>;
|
||||
export type GetVideoFeedQueryResult = Apollo.QueryResult<
|
||||
GetVideoFeedQuery,
|
||||
GetVideoFeedQueryVariables
|
||||
>;
|
||||
export const GetVideoMakePercentageIntervalsDocument = gql`
|
||||
query GetVideoMakePercentageIntervals(
|
||||
$videoId: ID!
|
||||
|
@@ -1,9 +1,10 @@
|
||||
# DO NOT USE: use getVideoFeed instead
|
||||
query GetFeed(
|
||||
$limit: Int! = 5
|
||||
$after: String = null
|
||||
$filters: VideoFilterInput = null
|
||||
) {
|
||||
getFeedVideos(limit: $limit, after: $after, filters: $filters) {
|
||||
getUserVideos(limit: $limit, after: $after, filters: $filters) {
|
||||
videos {
|
||||
id
|
||||
owner {
|
||||
@@ -38,3 +39,50 @@ query GetFeed(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fragment VideoCardFields on VideoGQL {
|
||||
id
|
||||
owner {
|
||||
id
|
||||
username
|
||||
profileImageUri
|
||||
}
|
||||
name
|
||||
screenshotUri
|
||||
totalShotsMade
|
||||
totalShots
|
||||
makePercentage
|
||||
createdAt
|
||||
updatedAt
|
||||
startTime
|
||||
endTime
|
||||
elapsedTime
|
||||
screenshotUri
|
||||
stream {
|
||||
id
|
||||
isCompleted
|
||||
}
|
||||
tableSize
|
||||
tags {
|
||||
tagClasses {
|
||||
name
|
||||
}
|
||||
name
|
||||
}
|
||||
}
|
||||
|
||||
query GetVideoFeed(
|
||||
$limit: Int! = 5
|
||||
$after: String = null
|
||||
$filters: VideoFilterInput = null
|
||||
) {
|
||||
getFeedVideos(limit: $limit, after: $after, filters: $filters) {
|
||||
videos {
|
||||
...VideoCardFields
|
||||
}
|
||||
pageInfo {
|
||||
hasNextPage
|
||||
endCursor
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user