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,30 +1,12 @@
import { gql } from "graphql-tag"
import {
CardsGrid_LoyaltyPage,
CardsGrid_LoyaltyPageRefs,
} from "../../Fragments/Blocks/CardsGrid.graphql"
import {
Content_LoyaltyPage,
Content_LoyaltyPageRefs,
} from "../../Fragments/Blocks/Content.graphql"
import {
DynamicContent_LoyaltyPage,
DynamicContent_LoyaltyPageRefs,
} from "../../Fragments/Blocks/DynamicContent.graphql"
import {
Shortcuts_LoyaltyPage,
Shortcuts_LoyaltyPageRefs,
} from "../../Fragments/Blocks/Shortcuts.graphql"
import {
ContentSidebar_LoyaltyPage,
ContentSidebar_LoyaltyPageRefs,
} from "../../Fragments/Sidebar/Content.graphql"
import { CardsGrid_LoyaltyPage } from "../../Fragments/Blocks/CardsGrid.graphql"
import { Content_LoyaltyPage } from "../../Fragments/Blocks/Content.graphql"
import { DynamicContent_LoyaltyPage } from "../../Fragments/Blocks/DynamicContent.graphql"
import { Shortcuts_LoyaltyPage } from "../../Fragments/Blocks/Shortcuts.graphql"
import { ContentSidebar_LoyaltyPage } from "../../Fragments/Sidebar/Content.graphql"
import { DynamicContentSidebar_LoyaltyPage } from "../../Fragments/Sidebar/DynamicContent.graphql"
import {
JoinLoyaltyContactSidebar_LoyaltyPage,
JoinLoyaltyContactSidebar_LoyaltyPageRefs,
} from "../../Fragments/Sidebar/JoinLoyaltyContact.graphql"
import { JoinLoyaltyContactSidebar_LoyaltyPage } from "../../Fragments/Sidebar/JoinLoyaltyContact.graphql"
import { System } from "../../Fragments/System.graphql"
export const GetLoyaltyPage = gql`
@@ -67,35 +49,6 @@ export const GetLoyaltyPage = gql`
${JoinLoyaltyContactSidebar_LoyaltyPage}
`
export const GetLoyaltyPageRefs = gql`
query GetLoyaltyPageRefs($locale: String!, $uid: String!) {
loyalty_page(locale: $locale, uid: $uid) {
blocks {
__typename
...CardsGrid_LoyaltyPageRefs
...Content_LoyaltyPageRefs
...DynamicContent_LoyaltyPageRefs
...Shortcuts_LoyaltyPageRefs
}
sidebar {
__typename
...ContentSidebar_LoyaltyPageRefs
...JoinLoyaltyContactSidebar_LoyaltyPageRefs
}
system {
...System
}
}
}
${System}
${CardsGrid_LoyaltyPageRefs}
${Content_LoyaltyPageRefs}
${DynamicContent_LoyaltyPageRefs}
${Shortcuts_LoyaltyPageRefs}
${ContentSidebar_LoyaltyPageRefs}
${JoinLoyaltyContactSidebar_LoyaltyPageRefs}
`
export const GetDaDeEnUrlsLoyaltyPage = gql`
query GetDaDeEnUrlsLoyaltyPage($uid: String!) {
de: loyalty_page(locale: "de", uid: $uid) {