From 808fae04809b1e6bf4959b992631315ff9e53d7c Mon Sep 17 00:00:00 2001 From: Kat Huang Date: Thu, 22 Feb 2024 16:45:26 -0700 Subject: [PATCH] Remove @includes from feed --- after.txt | 17 +++++++++++++++++ before.txt | 17 +++++++++++++++++ src/index.tsx | 30 ++++++++---------------------- src/operations/feed.gql | 19 ++++++------------- 4 files changed, 48 insertions(+), 35 deletions(-) create mode 100644 after.txt create mode 100644 before.txt diff --git a/after.txt b/after.txt new file mode 100644 index 0000000..905196f --- /dev/null +++ b/after.txt @@ -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 diff --git a/before.txt b/before.txt new file mode 100644 index 0000000..905196f --- /dev/null +++ b/before.txt @@ -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 diff --git a/src/index.tsx b/src/index.tsx index b46cc9f..e96956a 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -372,17 +372,10 @@ export type GetAggregateShotsQuery = { __typename?: 'Query', getAggregateShots: export type GetFeedQueryVariables = Exact<{ first?: Scalars['Int']['input']; after?: InputMaybe; - 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; @@ -486,16 +479,16 @@ export type GetAggregateShotsLazyQueryHookResult = ReturnType; export type GetAggregateShotsQueryResult = Apollo.QueryResult; 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' * }, * }); */ diff --git a/src/operations/feed.gql b/src/operations/feed.gql index 0a2425b..c7f3759 100644 --- a/src/operations/feed.gql +++ b/src/operations/feed.gql @@ -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