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:
@@ -1,17 +1,6 @@
|
||||
import { gql } from "graphql-tag"
|
||||
|
||||
import { AccountPageRef } from "../Fragments/AccountPage/Ref.graphql"
|
||||
import { CardBlock } from "../Fragments/Blocks/Card.graphql"
|
||||
import { CardBlockRef } from "../Fragments/Blocks/Refs/Card.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 { 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 +13,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 GetHeader = gql`
|
||||
query GetHeader($locale: String!) {
|
||||
@@ -199,146 +185,3 @@ export const GetHeader = gql`
|
||||
${StartPageLink}
|
||||
${PromoCampaignPageLink}
|
||||
`
|
||||
|
||||
export const GetHeaderRef = gql`
|
||||
query GetHeaderRef($locale: String!) {
|
||||
all_header(limit: 1, locale: $locale) {
|
||||
items {
|
||||
top_link {
|
||||
logged_in {
|
||||
linkConnection {
|
||||
edges {
|
||||
node {
|
||||
__typename
|
||||
...AccountPageRef
|
||||
...CampaignOverviewPageRef
|
||||
...CampaignPageRef
|
||||
...CollectionPageRef
|
||||
...ContentPageRef
|
||||
...DestinationCityPageRef
|
||||
...DestinationCountryPageRef
|
||||
...DestinationOverviewPageRef
|
||||
...HotelPageRef
|
||||
...LoyaltyPageRef
|
||||
...StartPageRef
|
||||
...PromoCampaignPageRef
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
logged_out {
|
||||
linkConnection {
|
||||
edges {
|
||||
node {
|
||||
__typename
|
||||
...AccountPageRef
|
||||
...CampaignOverviewPageRef
|
||||
...CampaignPageRef
|
||||
...CollectionPageRef
|
||||
...ContentPageRef
|
||||
...DestinationCityPageRef
|
||||
...DestinationCountryPageRef
|
||||
...DestinationOverviewPageRef
|
||||
...HotelPageRef
|
||||
...LoyaltyPageRef
|
||||
...StartPageRef
|
||||
...PromoCampaignPageRef
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
menu_items {
|
||||
linkConnection {
|
||||
edges {
|
||||
node {
|
||||
__typename
|
||||
...AccountPageRef
|
||||
...CampaignOverviewPageRef
|
||||
...CampaignPageRef
|
||||
...CollectionPageRef
|
||||
...ContentPageRef
|
||||
...DestinationCityPageRef
|
||||
...DestinationCountryPageRef
|
||||
...DestinationOverviewPageRef
|
||||
...HotelPageRef
|
||||
...LoyaltyPageRef
|
||||
...StartPageRef
|
||||
...PromoCampaignPageRef
|
||||
}
|
||||
}
|
||||
}
|
||||
see_all_link {
|
||||
linkConnection {
|
||||
edges {
|
||||
node {
|
||||
__typename
|
||||
...AccountPageRef
|
||||
...CampaignOverviewPageRef
|
||||
...CampaignPageRef
|
||||
...CollectionPageRef
|
||||
...ContentPageRef
|
||||
...DestinationCityPageRef
|
||||
...DestinationCountryPageRef
|
||||
...DestinationOverviewPageRef
|
||||
...HotelPageRef
|
||||
...LoyaltyPageRef
|
||||
...StartPageRef
|
||||
...PromoCampaignPageRef
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
submenu {
|
||||
links {
|
||||
linkConnection {
|
||||
edges {
|
||||
node {
|
||||
__typename
|
||||
...AccountPageRef
|
||||
...CampaignOverviewPageRef
|
||||
...CampaignPageRef
|
||||
...CollectionPageRef
|
||||
...ContentPageRef
|
||||
...DestinationCityPageRef
|
||||
...DestinationCountryPageRef
|
||||
...DestinationOverviewPageRef
|
||||
...HotelPageRef
|
||||
...LoyaltyPageRef
|
||||
...StartPageRef
|
||||
...PromoCampaignPageRef
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
cardConnection {
|
||||
edges {
|
||||
node {
|
||||
__typename
|
||||
...CardBlockRef
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
system {
|
||||
...System
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
${System}
|
||||
${CardBlockRef}
|
||||
${AccountPageRef}
|
||||
${CampaignOverviewPageRef}
|
||||
${CampaignPageRef}
|
||||
${CollectionPageRef}
|
||||
${ContentPageRef}
|
||||
${DestinationCityPageRef}
|
||||
${DestinationCountryPageRef}
|
||||
${DestinationOverviewPageRef}
|
||||
${HotelPageRef}
|
||||
${LoyaltyPageRef}
|
||||
${StartPageRef}
|
||||
${PromoCampaignPageRef}
|
||||
`
|
||||
|
||||
Reference in New Issue
Block a user