Remove @includes from feed

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

17
after.txt Normal file
View File

@ -0,0 +1,17 @@
2441237583f4b3ca112760cffe1c3c01 .editorconfig
a72f2b637dd6698d628cf0c1aa0e4dac .envrc
cfcf8e735abf378b9e6dc1336accfdde .gitignore
ab929c26b5b908b65dc1f000c9ad70dd bin/assert-no-changes-wrapper.sh
77be582d277c2bb9dba0560c5f1a7d82 bin/assert-no-changes.sh
b41e05a7cb295d1fcbd68cf3236f1aef codegen.yml
436bbeb3e1e180df8765c38d6dd3b64e flake.lock
1322c56095ee10d9f27372f53e0a9486 flake.nix
74d71e5ad62fbc7cfca30d325eb7bee8 package.json
b4f4146809dc41057258b9013d3f8419 src/index.tsx
6b6f2bb00539fba843f0f36f8ba93d3c src/operations/bucketed_metrics.gql
a6a6dc693a9669828f9844138b4aef8d src/operations/feed.gql
eec0a99b5fc4c65ffd4dc38663bfd27c src/operations/shots.gql
ea583cf0c9ef575884f93dbc89d2759b src/operations/video_upload.gql
91150bed08e95be1d9398c0ad4b04bb9 src/schema.gql
9ea58bd454f3956089b678e774f7f343 tsconfig.json
6db1d70741bf55021aea2678f0671750 yarn.lock

17
before.txt Normal file
View File

@ -0,0 +1,17 @@
2441237583f4b3ca112760cffe1c3c01 .editorconfig
a72f2b637dd6698d628cf0c1aa0e4dac .envrc
cfcf8e735abf378b9e6dc1336accfdde .gitignore
ab929c26b5b908b65dc1f000c9ad70dd bin/assert-no-changes-wrapper.sh
77be582d277c2bb9dba0560c5f1a7d82 bin/assert-no-changes.sh
b41e05a7cb295d1fcbd68cf3236f1aef codegen.yml
436bbeb3e1e180df8765c38d6dd3b64e flake.lock
1322c56095ee10d9f27372f53e0a9486 flake.nix
74d71e5ad62fbc7cfca30d325eb7bee8 package.json
b4f4146809dc41057258b9013d3f8419 src/index.tsx
6b6f2bb00539fba843f0f36f8ba93d3c src/operations/bucketed_metrics.gql
a6a6dc693a9669828f9844138b4aef8d src/operations/feed.gql
eec0a99b5fc4c65ffd4dc38663bfd27c src/operations/shots.gql
ea583cf0c9ef575884f93dbc89d2759b src/operations/video_upload.gql
91150bed08e95be1d9398c0ad4b04bb9 src/schema.gql
9ea58bd454f3956089b678e774f7f343 tsconfig.json
6db1d70741bf55021aea2678f0671750 yarn.lock

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