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,27 +1,8 @@
import { gql } from "graphql-tag"
import { AccountPageRef } from "../../Fragments/AccountPage/Ref.graphql"
import {
Accordion_DestinationCountryPage,
Accordion_DestinationCountryPageRefs,
} from "../../Fragments/Blocks/Accordion.graphql"
import {
Content_DestinationCountryPage,
Content_DestinationCountryPageRefs,
} from "../../Fragments/Blocks/Content.graphql"
import { CampaignOverviewPageRef } from "../../Fragments/CampaignOverviewPage/Ref.graphql"
import { CampaignPageRef } from "../../Fragments/CampaignPage/Ref.graphql"
import { CollectionPageRef } from "../../Fragments/CollectionPage/Ref.graphql"
import { ContentPageRef } from "../../Fragments/ContentPage/Ref.graphql"
import { DestinationCityPageRef } from "../../Fragments/DestinationCityPage/Ref.graphql"
import { DestinationCountryPageRef } from "../../Fragments/DestinationCountryPage/Ref.graphql"
import {
DestinationFilter,
DestinationFilterRef,
} from "../../Fragments/DestinationFilter.graphql"
import { DestinationOverviewPageRef } from "../../Fragments/DestinationOverviewPage/Ref.graphql"
import { HotelPageRef } from "../../Fragments/HotelPage/Ref.graphql"
import { LoyaltyPageRef } from "../../Fragments/LoyaltyPage/Ref.graphql"
import { Accordion_DestinationCountryPage } from "../../Fragments/Blocks/Accordion.graphql"
import { Content_DestinationCountryPage } from "../../Fragments/Blocks/Content.graphql"
import { DestinationFilter } from "../../Fragments/DestinationFilter.graphql"
import { AccountPageLink } from "../../Fragments/PageLink/AccountPageLink.graphql"
import { CampaignOverviewPageLink } from "../../Fragments/PageLink/CampaignOverviewPageLink.graphql"
import { CampaignPageLink } from "../../Fragments/PageLink/CampaignPageLink.graphql"
@@ -34,8 +15,6 @@ import { HotelPageLink } from "../../Fragments/PageLink/HotelPageLink.graphql"
import { LoyaltyPageLink } from "../../Fragments/PageLink/LoyaltyPageLink.graphql"
import { PromoCampaignPageLink } from "../../Fragments/PageLink/PromoCampaignPageLink.graphql"
import { StartPageLink } from "../../Fragments/PageLink/StartPageLink.graphql"
import { PromoCampaignPageRef } from "../../Fragments/PromoCampaignPage/Ref.graphql"
import { StartPageRef } from "../../Fragments/StartPage/Ref.graphql"
import { System } from "../../Fragments/System.graphql"
export const GetDestinationCountryPage = gql`
@@ -121,63 +100,6 @@ export const GetDestinationCountryPage = gql`
${Content_DestinationCountryPage}
`
export const GetDestinationCountryPageRefs = gql`
query GetDestinationCountryPageRefs($locale: String!, $uid: String!) {
destination_country_page(locale: $locale, uid: $uid) {
sidepeek_content {
content {
embedded_itemsConnection {
edges {
node {
__typename
...AccountPageRef
...CampaignOverviewPageRef
...CampaignPageRef
...CollectionPageRef
...ContentPageRef
...DestinationCityPageRef
...DestinationCountryPageRef
...DestinationOverviewPageRef
...HotelPageRef
...LoyaltyPageRef
...StartPageRef
...PromoCampaignPageRef
}
}
}
}
}
blocks {
__typename
...Accordion_DestinationCountryPageRefs
...Content_DestinationCountryPageRefs
}
seo_filters {
...DestinationFilterRef
}
system {
...System
}
}
}
${System}
${AccountPageRef}
${CampaignOverviewPageRef}
${CampaignPageRef}
${CollectionPageRef}
${ContentPageRef}
${DestinationCityPageRef}
${DestinationCountryPageRef}
${DestinationOverviewPageRef}
${HotelPageRef}
${LoyaltyPageRef}
${StartPageRef}
${PromoCampaignPageRef}
${Accordion_DestinationCountryPageRefs}
${Content_DestinationCountryPageRefs}
${DestinationFilterRef}
`
export const GetDaDeEnUrlsDestinationCountryPage = gql`
query GetDaDeEnUrlsDestinationCountryPage($uid: String!) {
de: destination_country_page(locale: "de", uid: $uid) {