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,17 +1,7 @@
import { gql } from "graphql-tag"
import { AccountPageRef } from "../Fragments/AccountPage/Ref.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 { DestinationOverviewPageRef } from "../Fragments/DestinationOverviewPage/Ref.graphql"
import { AppDownloads } from "../Fragments/Footer/AppDownloads.graphql"
import { SocialMedia } from "../Fragments/Footer/SocialMedia.graphql"
import { HotelPageRef } from "../Fragments/HotelPage/Ref.graphql"
import { LoyaltyPageRef } from "../Fragments/LoyaltyPage/Ref.graphql"
import { AccountPageLink } from "../Fragments/PageLink/AccountPageLink.graphql"
import { CampaignOverviewPageLink } from "../Fragments/PageLink/CampaignOverviewPageLink.graphql"
import { CampaignPageLink } from "../Fragments/PageLink/CampaignPageLink.graphql"
@@ -24,9 +14,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 GetFooter = gql`
query GetFooter($locale: String!) {
@@ -133,90 +120,3 @@ export const GetFooter = gql`
${AppDownloads}
${SocialMedia}
`
export const GetFooterRef = gql`
query GetFooterRef($locale: String!) {
all_footer(limit: 1, locale: $locale) {
items {
main_links {
pageConnection {
edges {
node {
...AccountPageRef
...CampaignOverviewPageRef
...CampaignPageRef
...CollectionPageRef
...ContentPageRef
...DestinationCityPageRef
...DestinationCountryPageRef
...DestinationOverviewPageRef
...HotelPageRef
...LoyaltyPageRef
...StartPageRef
...PromoCampaignPageRef
}
}
}
}
secondary_links {
links {
pageConnection {
edges {
node {
...AccountPageRef
...CampaignOverviewPageRef
...CampaignPageRef
...CollectionPageRef
...ContentPageRef
...DestinationCityPageRef
...DestinationCountryPageRef
...DestinationOverviewPageRef
...HotelPageRef
...LoyaltyPageRef
...StartPageRef
...PromoCampaignPageRef
}
}
}
}
}
tertiary_links {
pageConnection {
edges {
node {
...AccountPageRef
...CampaignOverviewPageRef
...CampaignPageRef
...CollectionPageRef
...ContentPageRef
...DestinationCityPageRef
...DestinationCountryPageRef
...DestinationOverviewPageRef
...HotelPageRef
...LoyaltyPageRef
...StartPageRef
...PromoCampaignPageRef
}
}
}
}
system {
...System
}
}
}
}
${System}
${AccountPageRef}
${CampaignOverviewPageRef}
${CampaignPageRef}
${CollectionPageRef}
${ContentPageRef}
${DestinationCityPageRef}
${DestinationCountryPageRef}
${DestinationOverviewPageRef}
${HotelPageRef}
${LoyaltyPageRef}
${StartPageRef}
${PromoCampaignPageRef}
`