From a41740321ebc54affc8e0680e4f992dd40fc8cee Mon Sep 17 00:00:00 2001 From: Mounir Dhahri Date: Fri, 8 Nov 2024 11:42:43 +0100 Subject: [PATCH] fix: remove @cacheable from non cacheable requests (#11070) --- src/app/Scenes/Artist/Artist.tsx | 2 +- src/app/Scenes/HomeView/HomeView.tsx | 2 +- src/app/Scenes/HomeView/Sections/HomeViewSectionSales.tsx | 2 +- src/app/Scenes/HomeView/Sections/HomeViewSectionShows.tsx | 2 +- src/app/Scenes/Partner/Partner.tsx | 2 +- src/app/system/relay/helpers/cacheHeaderMiddlewareHelpers.ts | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/app/Scenes/Artist/Artist.tsx b/src/app/Scenes/Artist/Artist.tsx index d0ef45d9a05..160d422396a 100644 --- a/src/app/Scenes/Artist/Artist.tsx +++ b/src/app/Scenes/Artist/Artist.tsx @@ -199,7 +199,7 @@ interface ArtistQueryRendererProps { } export const ArtistScreenQuery = graphql` - query ArtistAboveTheFoldQuery($artistID: String!, $input: FilterArtworksInput) @cacheable { + query ArtistAboveTheFoldQuery($artistID: String!, $input: FilterArtworksInput) { artist(id: $artistID) @principalField { ...ArtistHeader_artist ...ArtistArtworks_artist @arguments(input: $input) diff --git a/src/app/Scenes/HomeView/HomeView.tsx b/src/app/Scenes/HomeView/HomeView.tsx index 2cfb06953ef..329b1f02608 100644 --- a/src/app/Scenes/HomeView/HomeView.tsx +++ b/src/app/Scenes/HomeView/HomeView.tsx @@ -211,7 +211,7 @@ const sectionsFragment = graphql` ` export const homeViewScreenQuery = graphql` - query HomeViewQuery($count: Int!, $cursor: String) @cacheable { + query HomeViewQuery($count: Int!, $cursor: String) { homeView { experiments { name diff --git a/src/app/Scenes/HomeView/Sections/HomeViewSectionSales.tsx b/src/app/Scenes/HomeView/Sections/HomeViewSectionSales.tsx index 00603cc0424..dc9342bae58 100644 --- a/src/app/Scenes/HomeView/Sections/HomeViewSectionSales.tsx +++ b/src/app/Scenes/HomeView/Sections/HomeViewSectionSales.tsx @@ -202,7 +202,7 @@ const HomeViewSectionSalesPlaceholder: React.FC = (flexProps) => { } const homeViewSectionSalesQuery = graphql` - query HomeViewSectionSalesQuery($id: String!) @cacheable { + query HomeViewSectionSalesQuery($id: String!) { homeView { section(id: $id) { ...HomeViewSectionSales_section diff --git a/src/app/Scenes/HomeView/Sections/HomeViewSectionShows.tsx b/src/app/Scenes/HomeView/Sections/HomeViewSectionShows.tsx index 219fbef891a..d76a5dcd215 100644 --- a/src/app/Scenes/HomeView/Sections/HomeViewSectionShows.tsx +++ b/src/app/Scenes/HomeView/Sections/HomeViewSectionShows.tsx @@ -70,7 +70,7 @@ const HomeViewSectionShowsPlaceholder: React.FC = (flexProps) => { } const homeViewSectionShowsQuery = graphql` - query HomeViewSectionShowsQuery($id: String!) @cacheable { + query HomeViewSectionShowsQuery($id: String!) { homeView { section(id: $id) { ...HomeViewSectionShows_section diff --git a/src/app/Scenes/Partner/Partner.tsx b/src/app/Scenes/Partner/Partner.tsx index 941d5a7fad5..1699866e7c7 100644 --- a/src/app/Scenes/Partner/Partner.tsx +++ b/src/app/Scenes/Partner/Partner.tsx @@ -152,7 +152,7 @@ export const PartnerQueryRenderer: React.FC<{ environment={getRelayEnvironment()} query={graphql` - query PartnerQuery($partnerID: String!) @cacheable { + query PartnerQuery($partnerID: String!) { partner(id: $partnerID) { ...Partner_partner } diff --git a/src/app/system/relay/helpers/cacheHeaderMiddlewareHelpers.ts b/src/app/system/relay/helpers/cacheHeaderMiddlewareHelpers.ts index 915495b1a67..f78d6ea1498 100644 --- a/src/app/system/relay/helpers/cacheHeaderMiddlewareHelpers.ts +++ b/src/app/system/relay/helpers/cacheHeaderMiddlewareHelpers.ts @@ -26,7 +26,7 @@ export const hasNoCacheParamPresent = (url: string) => { return false } -export const SKIP_CACHE_ARGUMENTS = ["includeArtworksByFollowedArtists"] +export const SKIP_CACHE_ARGUMENTS = ["includeArtworksByFollowedArtists", "isFollowed", "isSaved"] // Important - Add any new personalized argument checks to this list. That way, logged-in queries // _without_ this argument can still be `@cacheable`, and when queries include this argument, // those queries will not be cached.