Skip to content

Commit

Permalink
fix: remove @Cacheable from non cacheable requests (#11070)
Browse files Browse the repository at this point in the history
  • Loading branch information
MounirDhahri authored Nov 8, 2024
1 parent 2b3d7e7 commit a417403
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/app/Scenes/Artist/Artist.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/app/Scenes/HomeView/HomeView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/app/Scenes/HomeView/Sections/HomeViewSectionSales.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ const HomeViewSectionSalesPlaceholder: React.FC<FlexProps> = (flexProps) => {
}

const homeViewSectionSalesQuery = graphql`
query HomeViewSectionSalesQuery($id: String!) @cacheable {
query HomeViewSectionSalesQuery($id: String!) {
homeView {
section(id: $id) {
...HomeViewSectionSales_section
Expand Down
2 changes: 1 addition & 1 deletion src/app/Scenes/HomeView/Sections/HomeViewSectionShows.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const HomeViewSectionShowsPlaceholder: React.FC<FlexProps> = (flexProps) => {
}

const homeViewSectionShowsQuery = graphql`
query HomeViewSectionShowsQuery($id: String!) @cacheable {
query HomeViewSectionShowsQuery($id: String!) {
homeView {
section(id: $id) {
...HomeViewSectionShows_section
Expand Down
2 changes: 1 addition & 1 deletion src/app/Scenes/Partner/Partner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export const PartnerQueryRenderer: React.FC<{
<QueryRenderer<PartnerQuery>
environment={getRelayEnvironment()}
query={graphql`
query PartnerQuery($partnerID: String!) @cacheable {
query PartnerQuery($partnerID: String!) {
partner(id: $partnerID) {
...Partner_partner
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit a417403

Please sign in to comment.