Remove @includes from feed

This commit is contained in:
2024-02-22 16:45:26 -07:00
parent cc597b3cfb
commit 808fae0480
4 changed files with 48 additions and 35 deletions

View File

@@ -372,17 +372,10 @@ export type GetAggregateShotsQuery = { __typename?: 'Query', getAggregateShots:
export type GetFeedQueryVariables = Exact<{
first?: Scalars['Int']['input'];
after?: InputMaybe<Scalars['String']['input']>;
includeTotalShotsMade?: Scalars['Boolean']['input'];
includeMakePercentage?: Scalars['Boolean']['input'];
includeMedianRun?: Scalars['Boolean']['input'];
includeAverageTimeBetweenShots?: Scalars['Boolean']['input'];
includeElapsedTime?: Scalars['Boolean']['input'];
includeFramesPerSecond?: Scalars['Boolean']['input'];
includeStream?: Scalars['Boolean']['input'];
}>;
export type GetFeedQuery = { __typename?: 'Query', getVideoFeedForUser: { __typename?: 'VideoFeedGQL', videos: Array<{ __typename?: 'VideoGQL', id: number, name: string, totalShotsMade?: number, totalShots: number, makePercentage?: number, medianRun?: number | null, averageTimeBetweenShots?: number | null, createdAt: any, updatedAt: any, startTime: any, endTime: any, elapsedTime?: number | null, shots: Array<{ __typename?: 'ShotGQL', id?: number | null, videoId?: number | null, startFrame?: number | null, endFrame?: number | null, createdAt?: any | null, updatedAt?: any | null }>, stream?: { __typename?: 'UploadStreamGQL', id: string, linksRequested: number, uploadsCompleted: number, isCompleted: boolean, createdAt: any, updatedAt: any } | null }>, pageInfo: { __typename?: 'PageInfoGQL', hasNextPage: boolean, endCursor?: string | null } } };
export type GetFeedQuery = { __typename?: 'Query', getVideoFeedForUser: { __typename?: 'VideoFeedGQL', videos: Array<{ __typename?: 'VideoGQL', id: number, name: string, totalShotsMade: number, totalShots: number, makePercentage: number, medianRun?: number | null, averageTimeBetweenShots?: number | null, createdAt: any, updatedAt: any, startTime: any, endTime: any, elapsedTime?: number | null, shots: Array<{ __typename?: 'ShotGQL', id?: number | null, videoId?: number | null, startFrame?: number | null, endFrame?: number | null, createdAt?: any | null, updatedAt?: any | null }>, stream?: { __typename?: 'UploadStreamGQL', id: string, linksRequested: number, uploadsCompleted: number, isCompleted: boolean, createdAt: any, updatedAt: any } | null }>, pageInfo: { __typename?: 'PageInfoGQL', hasNextPage: boolean, endCursor?: string | null } } };
export type GetShotsQueryVariables = Exact<{
filterInput?: InputMaybe<FilterInput>;
@@ -486,16 +479,16 @@ export type GetAggregateShotsLazyQueryHookResult = ReturnType<typeof useGetAggre
export type GetAggregateShotsSuspenseQueryHookResult = ReturnType<typeof useGetAggregateShotsSuspenseQuery>;
export type GetAggregateShotsQueryResult = Apollo.QueryResult<GetAggregateShotsQuery, GetAggregateShotsQueryVariables>;
export const GetFeedDocument = gql`
query GetFeed($first: Int! = 5, $after: String = null, $includeTotalShotsMade: Boolean! = false, $includeMakePercentage: Boolean! = false, $includeMedianRun: Boolean! = false, $includeAverageTimeBetweenShots: Boolean! = false, $includeElapsedTime: Boolean! = false, $includeFramesPerSecond: Boolean! = false, $includeStream: Boolean! = false) {
query GetFeed($first: Int! = 5, $after: String = null) {
getVideoFeedForUser(first: $first, after: $after) {
videos {
id
name
totalShotsMade @include(if: $includeTotalShotsMade)
totalShotsMade
totalShots
makePercentage @include(if: $includeMakePercentage)
medianRun @include(if: $includeMedianRun)
averageTimeBetweenShots @include(if: $includeAverageTimeBetweenShots)
makePercentage
medianRun
averageTimeBetweenShots
createdAt
updatedAt
shots {
@@ -508,8 +501,8 @@ export const GetFeedDocument = gql`
}
startTime
endTime
elapsedTime @include(if: $includeElapsedTime)
stream @include(if: $includeStream) {
elapsedTime
stream {
id
linksRequested
uploadsCompleted
@@ -540,13 +533,6 @@ export const GetFeedDocument = gql`
* variables: {
* first: // value for 'first'
* after: // value for 'after'
* includeTotalShotsMade: // value for 'includeTotalShotsMade'
* includeMakePercentage: // value for 'includeMakePercentage'
* includeMedianRun: // value for 'includeMedianRun'
* includeAverageTimeBetweenShots: // value for 'includeAverageTimeBetweenShots'
* includeElapsedTime: // value for 'includeElapsedTime'
* includeFramesPerSecond: // value for 'includeFramesPerSecond'
* includeStream: // value for 'includeStream'
* },
* });
*/

View File

@@ -1,23 +1,16 @@
query GetFeed(
$first: Int! = 5,
$after: String = null,
$includeTotalShotsMade: Boolean! = false,
$includeMakePercentage: Boolean! = false,
$includeMedianRun: Boolean! = false,
$includeAverageTimeBetweenShots: Boolean! = false,
$includeElapsedTime: Boolean! = false,
$includeFramesPerSecond: Boolean! = false,
$includeStream: Boolean! = false
) {
getVideoFeedForUser(first: $first, after: $after) {
videos {
id
name
totalShotsMade @include(if: $includeTotalShotsMade)
totalShotsMade
totalShots
makePercentage @include(if: $includeMakePercentage)
medianRun @include(if: $includeMedianRun)
averageTimeBetweenShots @include(if: $includeAverageTimeBetweenShots)
makePercentage
medianRun
averageTimeBetweenShots
createdAt
updatedAt
shots {
@@ -30,8 +23,8 @@ query GetFeed(
}
startTime
endTime
elapsedTime @include(if: $includeElapsedTime)
stream @include(if: $includeStream) {
elapsedTime
stream {
id
linksRequested
uploadsCompleted