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
61 lines
1.5 KiB
TypeScript
61 lines
1.5 KiB
TypeScript
import { gql } from "graphql-tag"
|
|
|
|
import { CardGallery_DestinationOverviewPage } from "../../Fragments/Blocks/CardGallery.graphql"
|
|
import { System } from "../../Fragments/System.graphql"
|
|
|
|
export const GetDestinationOverviewPage = gql`
|
|
query GetDestinationOverviewPage($locale: String!, $uid: String!) {
|
|
destination_overview_page(uid: $uid, locale: $locale) {
|
|
heading
|
|
url
|
|
blocks {
|
|
__typename
|
|
...CardGallery_DestinationOverviewPage
|
|
}
|
|
location {
|
|
longitude
|
|
latitude
|
|
default_zoom
|
|
}
|
|
system {
|
|
...System
|
|
created_at
|
|
updated_at
|
|
}
|
|
}
|
|
trackingProps: destination_overview_page(locale: "en", uid: $uid) {
|
|
url
|
|
}
|
|
}
|
|
${System}
|
|
${CardGallery_DestinationOverviewPage}
|
|
`
|
|
|
|
export const GetDaDeEnUrlsDestinationOverviewPage = gql`
|
|
query GetDaDeEnUrlsDestinationOverviewPage($uid: String!) {
|
|
de: destination_overview_page(locale: "de", uid: $uid) {
|
|
url
|
|
}
|
|
en: destination_overview_page(locale: "en", uid: $uid) {
|
|
url
|
|
}
|
|
da: destination_overview_page(locale: "da", uid: $uid) {
|
|
url
|
|
}
|
|
}
|
|
`
|
|
|
|
export const GetFiNoSvUrlsDestinationOverviewPage = gql`
|
|
query GetFiNoSvUrlsDestinationOverviewPage($uid: String!) {
|
|
fi: destination_overview_page(locale: "fi", uid: $uid) {
|
|
url
|
|
}
|
|
no: destination_overview_page(locale: "no", uid: $uid) {
|
|
url
|
|
}
|
|
sv: destination_overview_page(locale: "sv", uid: $uid) {
|
|
url
|
|
}
|
|
}
|
|
`
|