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
67 lines
2.4 KiB
TypeScript
67 lines
2.4 KiB
TypeScript
import { gql } from "graphql-tag"
|
|
|
|
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"
|
|
|
|
export const GetRewards = gql`
|
|
query GetRewards($locale: String!, $rewardIds: [String!]) {
|
|
all_reward(locale: $locale, where: { reward_id_in: $rewardIds }) {
|
|
items {
|
|
taxonomies {
|
|
term_uid
|
|
}
|
|
label
|
|
grouped_label
|
|
description
|
|
redeem_description {
|
|
json
|
|
embedded_itemsConnection {
|
|
edges {
|
|
node {
|
|
__typename
|
|
...AccountPageLink
|
|
...CampaignOverviewPageLink
|
|
...CampaignPageLink
|
|
...CollectionPageLink
|
|
...ContentPageLink
|
|
...DestinationCityPageLink
|
|
...DestinationCountryPageLink
|
|
...DestinationOverviewPageLink
|
|
...HotelPageLink
|
|
...LoyaltyPageLink
|
|
...StartPageLink
|
|
...PromoCampaignPageLink
|
|
}
|
|
}
|
|
}
|
|
}
|
|
grouped_description
|
|
value
|
|
reward_id
|
|
}
|
|
}
|
|
}
|
|
${AccountPageLink}
|
|
${CampaignOverviewPageLink}
|
|
${CampaignPageLink}
|
|
${CollectionPageLink}
|
|
${ContentPageLink}
|
|
${DestinationCityPageLink}
|
|
${DestinationCountryPageLink}
|
|
${DestinationOverviewPageLink}
|
|
${HotelPageLink}
|
|
${LoyaltyPageLink}
|
|
${StartPageLink}
|
|
${PromoCampaignPageLink}
|
|
`
|