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,35 +1,14 @@
import { gql } from "graphql-tag"
import {
CardsGrid_CollectionPage,
CardsGrid_CollectionPageRefs,
} from "../../Fragments/Blocks/CardsGrid.graphql"
import {
DynamicContent_CollectionPage,
DynamicContent_CollectionPageRefs,
} from "../../Fragments/Blocks/DynamicContent.graphql"
import {
Shortcuts_CollectionPage,
Shortcuts_CollectionPageRefs,
} from "../../Fragments/Blocks/Shortcuts.graphql"
import {
UspGrid_CollectionPage,
UspGrid_CollectionPageRefs,
} from "../../Fragments/Blocks/UspGrid.graphql"
import {
VideoCard_CollectionPage,
VideoCard_CollectionPageRefs,
} from "../../Fragments/Blocks/VideoCard.graphql"
import {
NavigationLinks_CollectionPage,
NavigationLinksRef_CollectionPage,
} from "../../Fragments/CollectionPage/NavigationLinks.graphql"
import {
TopPrimaryButton_CollectionPage,
TopPrimaryButtonRef_CollectionPage,
} from "../../Fragments/CollectionPage/TopPrimaryButton.graphql"
import { CardsGrid_CollectionPage } from "../../Fragments/Blocks/CardsGrid.graphql"
import { DynamicContent_CollectionPage } from "../../Fragments/Blocks/DynamicContent.graphql"
import { Shortcuts_CollectionPage } from "../../Fragments/Blocks/Shortcuts.graphql"
import { UspGrid_CollectionPage } from "../../Fragments/Blocks/UspGrid.graphql"
import { VideoCard_CollectionPage } from "../../Fragments/Blocks/VideoCard.graphql"
import { NavigationLinks_CollectionPage } from "../../Fragments/CollectionPage/NavigationLinks.graphql"
import { TopPrimaryButton_CollectionPage } from "../../Fragments/CollectionPage/TopPrimaryButton.graphql"
import { System } from "../../Fragments/System.graphql"
import { Video, VideoRef } from "../../Fragments/Video.graphql"
import { Video } from "../../Fragments/Video.graphql"
export const GetCollectionPage = gql`
query GetCollectionPage($locale: String!, $uid: String!) {
@@ -78,40 +57,6 @@ export const GetCollectionPage = gql`
${Video}
`
export const GetCollectionPageRefs = gql`
query GetCollectionPageRefs($locale: String!, $uid: String!) {
collection_page(locale: $locale, uid: $uid) {
hero_video {
...VideoRef
}
header {
...TopPrimaryButtonRef_CollectionPage
...NavigationLinksRef_CollectionPage
}
blocks {
__typename
...CardsGrid_CollectionPageRefs
...Shortcuts_CollectionPageRefs
...UspGrid_CollectionPageRefs
...DynamicContent_CollectionPageRefs
...VideoCard_CollectionPageRefs
}
system {
...System
}
}
}
${System}
${TopPrimaryButtonRef_CollectionPage}
${NavigationLinksRef_CollectionPage}
${CardsGrid_CollectionPageRefs}
${Shortcuts_CollectionPageRefs}
${UspGrid_CollectionPageRefs}
${DynamicContent_CollectionPageRefs}
${VideoRef}
${VideoCard_CollectionPageRefs}
`
export const GetDaDeEnUrlsCollectionPage = gql`
query GetDaDeEnUrlsCollectionPage($uid: String!) {
de: collection_page(locale: "de", uid: $uid) {