Files
web/packages/trpc/lib/graphql/Query/DestinationCountryPage/DestinationCountryPage.graphql.ts
Linus Flood 5fc93472f4 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
2026-01-27 12:38:36 +00:00

130 lines
4.0 KiB
TypeScript

import { gql } from "graphql-tag"
import { Accordion_DestinationCountryPage } from "../../Fragments/Blocks/Accordion.graphql"
import { Content_DestinationCountryPage } from "../../Fragments/Blocks/Content.graphql"
import { DestinationFilter } from "../../Fragments/DestinationFilter.graphql"
import { AccountPageLink } from "../../Fragments/PageLink/AccountPageLink.graphql"
import { CampaignOverviewPageLink } from "../../Fragments/PageLink/CampaignOverviewPageLink.graphql"
import { CampaignPageLink } from "../../Fragments/PageLink/CampaignPageLink.graphql"
import { CollectionPageLink } from "../../Fragments/PageLink/CollectionPageLink.graphql"
import { ContentPageLink } from "../../Fragments/PageLink/ContentPageLink.graphql"
import { DestinationCityPageLink } from "../../Fragments/PageLink/DestinationCityPageLink.graphql"
import { DestinationCountryPageLink } from "../../Fragments/PageLink/DestinationCountryPageLink.graphql"
import { DestinationOverviewPageLink } from "../../Fragments/PageLink/DestinationOverviewPageLink.graphql"
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 { System } from "../../Fragments/System.graphql"
export const GetDestinationCountryPage = gql`
query GetDestinationCountryPage($locale: String!, $uid: String!) {
destination_country_page(uid: $uid, locale: $locale) {
title
destination_settings {
country
location {
longitude
latitude
default_zoom
}
}
heading
preamble
experiences {
destination_experiences
}
images {
image
}
has_sidepeek
sidepeek_button_text
sidepeek_content {
heading
content {
embedded_itemsConnection {
edges {
node {
__typename
...AccountPageLink
...CampaignOverviewPageLink
...CampaignPageLink
...CollectionPageLink
...ContentPageLink
...DestinationCityPageLink
...DestinationCountryPageLink
...DestinationOverviewPageLink
...HotelPageLink
...LoyaltyPageLink
...StartPageLink
...PromoCampaignPageLink
}
}
}
json
}
}
blocks {
__typename
...Accordion_DestinationCountryPage
...Content_DestinationCountryPage
}
seo_filters {
...DestinationFilter
}
system {
...System
created_at
updated_at
}
}
trackingProps: destination_country_page(locale: "en", uid: $uid) {
url
}
}
${System}
${DestinationFilter}
${AccountPageLink}
${CampaignOverviewPageLink}
${CampaignPageLink}
${CollectionPageLink}
${ContentPageLink}
${DestinationCityPageLink}
${DestinationCountryPageLink}
${DestinationOverviewPageLink}
${HotelPageLink}
${LoyaltyPageLink}
${StartPageLink}
${PromoCampaignPageLink}
${Accordion_DestinationCountryPage}
${Content_DestinationCountryPage}
`
export const GetDaDeEnUrlsDestinationCountryPage = gql`
query GetDaDeEnUrlsDestinationCountryPage($uid: String!) {
de: destination_country_page(locale: "de", uid: $uid) {
url
}
en: destination_country_page(locale: "en", uid: $uid) {
url
}
da: destination_country_page(locale: "da", uid: $uid) {
url
}
}
`
export const GetFiNoSvUrlsDestinationCountryPage = gql`
query GetFiNoSvUrlsDestinationCountryPage($uid: String!) {
fi: destination_country_page(locale: "fi", uid: $uid) {
url
}
no: destination_country_page(locale: "no", uid: $uid) {
url
}
sv: destination_country_page(locale: "sv", uid: $uid) {
url
}
}
`