From ad704cad75b467b57c5dbeeccef319c722838745 Mon Sep 17 00:00:00 2001 From: Loewy Date: Wed, 30 Apr 2025 14:57:54 -0700 Subject: [PATCH] use entire fragment to prevent cache merge issues --- src/index.tsx | 35 ++++++++++++++++++++++++++++++++--- src/operations/runs.gql | 14 ++++++++++++-- 2 files changed, 44 insertions(+), 5 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index 438b264..aaafb8c 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -3614,6 +3614,17 @@ export type GetRunsForHighlightsQuery = { }; }; +export type PocketingIntentionFragmentFragment = { + __typename?: "PocketingIntentionFeaturesGQL"; + make?: boolean | null; + targetPocketDistance?: number | null; + targetPocketAngle?: number | null; + targetPocketAngleDirection?: ShotDirectionEnum | null; + marginOfErrorInDegrees?: number | null; + intendedPocketType?: PocketEnum | null; + difficulty?: number | null; +}; + export type GetRunsWithTimestampsQueryVariables = Exact<{ filterInput: RunFilterInput; runIds?: InputMaybe | Scalars["Int"]["input"]>; @@ -3637,8 +3648,14 @@ export type GetRunsWithTimestampsQuery = { videoId: number; id: number; createdAt?: any | null; - shotDifficulty?: { + pocketingIntentionFeatures?: { __typename?: "PocketingIntentionFeaturesGQL"; + make?: boolean | null; + targetPocketDistance?: number | null; + targetPocketAngle?: number | null; + targetPocketAngleDirection?: ShotDirectionEnum | null; + marginOfErrorInDegrees?: number | null; + intendedPocketType?: PocketEnum | null; difficulty?: number | null; } | null; }>; @@ -5123,6 +5140,17 @@ export const MedalFieldsFragmentDoc = gql` nickname } `; +export const PocketingIntentionFragmentFragmentDoc = gql` + fragment PocketingIntentionFragment on PocketingIntentionFeaturesGQL { + make + targetPocketDistance + targetPocketAngle + targetPocketAngleDirection + marginOfErrorInDegrees + intendedPocketType + difficulty + } +`; export const ShotWithAllFeaturesFragmentDoc = gql` fragment ShotWithAllFeatures on ShotGQL { id @@ -6210,14 +6238,15 @@ export const GetRunsWithTimestampsDocument = gql` videoId id createdAt - shotDifficulty: pocketingIntentionFeatures { - difficulty + pocketingIntentionFeatures { + ...PocketingIntentionFragment } } } runIds } } + ${PocketingIntentionFragmentFragmentDoc} `; /** diff --git a/src/operations/runs.gql b/src/operations/runs.gql index 61e381f..2b2be69 100644 --- a/src/operations/runs.gql +++ b/src/operations/runs.gql @@ -27,6 +27,16 @@ query GetRunsForHighlights( } } +fragment PocketingIntentionFragment on PocketingIntentionFeaturesGQL { + make + targetPocketDistance + targetPocketAngle + targetPocketAngleDirection + marginOfErrorInDegrees + intendedPocketType + difficulty +} + query GetRunsWithTimestamps( $filterInput: RunFilterInput! $runIds: [Int!] = null @@ -47,8 +57,8 @@ query GetRunsWithTimestamps( videoId id createdAt - shotDifficulty: pocketingIntentionFeatures { - difficulty + pocketingIntentionFeatures { + ...PocketingIntentionFragment } } }