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
@@ -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,11 +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 { CardBlockRef } from "./Refs/Card.graphql"
import { InfoCardBlockRef } from "./Refs/InfoCard.graphql"
import { LoyaltyCardBlockRef } from "./Refs/LoyaltyCard.graphql"
import { TeaserCardBlockRef } from "./Refs/TeaserCard.graphql"
import { CardBlock } from "./Card.graphql"
import { InfoCardBlock } from "./InfoCard.graphql"
import { LoyaltyCardBlock } from "./LoyaltyCard.graphql"
@@ -56,26 +41,6 @@ export const CardsGrid_ContentPage = gql`
${TeaserCardBlock}
`
export const CardsGrid_ContentPageRefs = gql`
fragment CardsGrid_ContentPageRefs on ContentPageBlocksCardsGrid {
cards_grid {
cardConnection(limit: 10) {
edges {
node {
__typename
...CardBlockRef
...LoyaltyCardBlockRef
...TeaserCardBlockRef
}
}
}
}
}
${CardBlockRef}
${LoyaltyCardBlockRef}
${TeaserCardBlockRef}
`
export const CardsGrid_CollectionPage = gql`
fragment CardsGrid_CollectionPage on CollectionPageBlocksCardsGrid {
cards_grid {
@@ -98,24 +63,6 @@ export const CardsGrid_CollectionPage = gql`
${TeaserCardBlock}
`
export const CardsGrid_CollectionPageRefs = gql`
fragment CardsGrid_CollectionPageRefs on CollectionPageBlocksCardsGrid {
cards_grid {
cardConnection(limit: 10) {
edges {
node {
__typename
...CardBlockRef
...TeaserCardBlockRef
}
}
}
}
}
${CardBlockRef}
${TeaserCardBlockRef}
`
export const CardsGrid_LoyaltyPage = gql`
fragment CardsGrid_LoyaltyPage on LoyaltyPageBlocksCardsGrid {
cards_grid {
@@ -138,24 +85,6 @@ export const CardsGrid_LoyaltyPage = gql`
${LoyaltyCardBlock}
`
export const CardsGrid_LoyaltyPageRefs = gql`
fragment CardsGrid_LoyaltyPageRefs on LoyaltyPageBlocksCardsGrid {
cards_grid {
cardConnection(limit: 10) {
edges {
node {
__typename
...CardBlockRef
...LoyaltyCardBlockRef
}
}
}
}
}
${CardBlockRef}
${LoyaltyCardBlockRef}
`
export const CardsGrid_StartPage = gql`
fragment CardsGrid_StartPage on StartPageBlocksCardsGrid {
cards_grid {
@@ -219,55 +148,3 @@ export const CardsGrid_StartPage = gql`
${StartPageLink}
${PromoCampaignPageLink}
`
export const CardsGrid_StartPageRefs = gql`
fragment CardsGrid_StartPageRefs on StartPageBlocksCardsGrid {
cards_grid {
cardConnection(limit: 10) {
edges {
node {
__typename
...CardBlockRef
...TeaserCardBlockRef
...InfoCardBlockRef
}
}
}
link {
linkConnection {
edges {
node {
__typename
...AccountPageRef
...CampaignOverviewPageRef
...CampaignPageRef
...CollectionPageRef
...ContentPageRef
...DestinationCityPageRef
...DestinationCountryPageRef
...DestinationOverviewPageRef
...HotelPageRef
...LoyaltyPageRef
...StartPageRef
...PromoCampaignPageRef
}
}
}
}
}
}
${CardBlockRef}
${InfoCardBlockRef}
${TeaserCardBlockRef}
${AccountPageRef}
${CampaignOverviewPageRef}
${CampaignPageRef}
${ContentPageRef}
${HotelPageRef}
${LoyaltyPageRef}
${CollectionPageRef}
${DestinationCityPageRef}
${DestinationCountryPageRef}
${DestinationOverviewPageRef}
${PromoCampaignPageRef}
`