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,25 +1,10 @@
import { gql } from "graphql-tag"
import {
CardsGrid_StartPage,
CardsGrid_StartPageRefs,
} from "../../Fragments/Blocks/CardsGrid.graphql"
import {
CarouselCards_StartPage,
CarouselCards_StartPageRefs,
} from "../../Fragments/Blocks/CarouselCards.graphql"
import {
FullWidthCampaign,
FullWidthCampaignRefs,
} from "../../Fragments/Blocks/FullWidthCampaign.graphql"
import {
JoinScandicFriends_StartPage,
JoinScandicFriends_StartPageRefs,
} from "../../Fragments/Blocks/JoinScandicFriends.graphql"
import {
VideoCard_StartPage,
VideoCard_StartPageRefs,
} from "../../Fragments/Blocks/VideoCard.graphql"
import { CardsGrid_StartPage } from "../../Fragments/Blocks/CardsGrid.graphql"
import { CarouselCards_StartPage } from "../../Fragments/Blocks/CarouselCards.graphql"
import { FullWidthCampaign } from "../../Fragments/Blocks/FullWidthCampaign.graphql"
import { JoinScandicFriends_StartPage } from "../../Fragments/Blocks/JoinScandicFriends.graphql"
import { VideoCard_StartPage } from "../../Fragments/Blocks/VideoCard.graphql"
import { System } from "../../Fragments/System.graphql"
export const GetStartPage = gql`
@@ -68,40 +53,6 @@ export const GetStartPage = gql`
${VideoCard_StartPage}
`
export const GetStartPageRefs = gql`
query GetStartPageRefs($locale: String!, $uid: String!) {
start_page(locale: $locale, uid: $uid) {
blocks {
__typename
...CardsGrid_StartPageRefs
...CarouselCards_StartPageRefs
... on StartPageBlocksFullWidthCampaign {
full_width_campaign {
full_width_campaignConnection {
edges {
node {
...FullWidthCampaignRefs
}
}
}
}
}
...JoinScandicFriends_StartPageRefs
...VideoCard_StartPageRefs
}
system {
...System
}
}
}
${System}
${CardsGrid_StartPageRefs}
${FullWidthCampaignRefs}
${CarouselCards_StartPageRefs}
${JoinScandicFriends_StartPageRefs}
${VideoCard_StartPageRefs}
`
export const GetDaDeEnUrlsStartPage = gql`
query GetDaDeEnUrlsStartPage($uid: String!) {
de: start_page(locale: "de", uid: $uid) {