Merged in feat/rework-contentstack (pull request #3493)

Feat(SW-3708): refactor contentstack fetching (removing all refs) and cache invalidation

* Remove all REFS

* Revalidate correct language

* PR fixes

* PR fixes

* Throw when errors from contentstack api


Approved-by: Joakim Jäderberg
This commit is contained in:
Linus Flood
2026-01-27 12:38:36 +00:00
parent a5e214f783
commit 5fc93472f4
193 changed files with 489 additions and 9018 deletions

View File

@@ -1,15 +1,5 @@
import { gql } from "graphql-tag"
import { AccountPageRef } from "../AccountPage/Ref.graphql"
import { CampaignOverviewPageRef } from "../CampaignOverviewPage/Ref.graphql"
import { CampaignPageRef } from "../CampaignPage/Ref.graphql"
import { CollectionPageRef } from "../CollectionPage/Ref.graphql"
import { ContentPageRef } from "../ContentPage/Ref.graphql"
import { DestinationCityPageRef } from "../DestinationCityPage/Ref.graphql"
import { DestinationCountryPageRef } from "../DestinationCountryPage/Ref.graphql"
import { DestinationOverviewPageRef } from "../DestinationOverviewPage/Ref.graphql"
import { HotelPageRef } from "../HotelPage/Ref.graphql"
import { LoyaltyPageRef } from "../LoyaltyPage/Ref.graphql"
import { AccountPageLink } from "../PageLink/AccountPageLink.graphql"
import { CampaignOverviewPageLink } from "../PageLink/CampaignOverviewPageLink.graphql"
import { CampaignPageLink } from "../PageLink/CampaignPageLink.graphql"
@@ -22,8 +12,6 @@ import { HotelPageLink } from "../PageLink/HotelPageLink.graphql"
import { LoyaltyPageLink } from "../PageLink/LoyaltyPageLink.graphql"
import { PromoCampaignPageLink } from "../PageLink/PromoCampaignPageLink.graphql"
import { StartPageLink } from "../PageLink/StartPageLink.graphql"
import { PromoCampaignPageRef } from "../PromoCampaignPage/Ref.graphql"
import { StartPageRef } from "../StartPage/Ref.graphql"
export const NavigationLinks_CampaignOverviewPage = gql`
fragment NavigationLinks_CampaignOverviewPage on CampaignOverviewPageHeader {
@@ -63,41 +51,3 @@ export const NavigationLinks_CampaignOverviewPage = gql`
${StartPageLink}
${PromoCampaignPageLink}
`
export const NavigationLinksRef_CampaignOverviewPage = gql`
fragment NavigationLinksRef_CampaignOverviewPage on CampaignOverviewPageHeader {
navigation_links {
linkConnection {
edges {
node {
__typename
...AccountPageRef
...CampaignOverviewPageRef
...CampaignPageRef
...CollectionPageRef
...ContentPageRef
...DestinationCityPageRef
...DestinationCountryPageRef
...DestinationOverviewPageRef
...HotelPageRef
...LoyaltyPageRef
...StartPageRef
...PromoCampaignPageRef
}
}
}
}
}
${AccountPageRef}
${CampaignOverviewPageRef}
${CampaignPageRef}
${CollectionPageRef}
${ContentPageRef}
${DestinationCityPageRef}
${DestinationCountryPageRef}
${DestinationOverviewPageRef}
${HotelPageRef}
${LoyaltyPageRef}
${StartPageRef}
${PromoCampaignPageRef}
`

View File

@@ -1,12 +0,0 @@
import { gql } from "graphql-tag"
import { System } from "../System.graphql"
export const CampaignOverviewPageRef = gql`
fragment CampaignOverviewPageRef on CampaignOverviewPage {
system {
...System
}
}
${System}
`

View File

@@ -3,7 +3,6 @@ import { gql } from "graphql-tag"
import { HotelListing_CampaignPage } from "../Blocks/HotelListing.graphql"
import { Hero_CampaignPage } from "../CampaignPage/Hero.graphql"
import { CampaignPageIncludedHotels } from "../CampaignPage/IncludedHotels.graphql"
import { System } from "../System.graphql"
export const TopCampaign = gql`
fragment TopCampaign on CampaignPage {
@@ -22,15 +21,6 @@ export const TopCampaign = gql`
${Hero_CampaignPage}
`
export const TopCampaignRef = gql`
fragment TopCampaignRef on CampaignPage {
system {
...System
}
}
${System}
`
export const TopPromoCampaign = gql`
fragment TopPromoCampaign on PromoCampaignPage {
url
@@ -41,12 +31,3 @@ export const TopPromoCampaign = gql`
}
}
`
export const TopPromoCampaignRef = gql`
fragment TopPromoCampaignRef on PromoCampaignPage {
system {
...System
}
}
${System}
`