Files
web/packages/trpc/lib/graphql/Query/UsePointsModal.graphql.ts
Emma Zettervall 34526bbaf1 Merged in fix/LOY-400-make-contentstack-data-optional (pull request #3266)
fix(LOY-400): made contentstack data optional so the whole page does not crash if it's empty.

* fix(LOY-400): made contentstack data optional so the whole page does not crash if it's empty.

* Merged in fix/LOY-400-make-contentstack-data-optional-2 (pull request #3269)

Fix/LOY-400 make contentstack data optional 2

* Test

* .

* Correct ref tag

* refactor

* Correct key

* fix(LOY-400): cleaned up


Approved-by: Linus Flood
Approved-by: Matilda Landström
2025-12-02 08:08:12 +00:00

123 lines
4.4 KiB
TypeScript

import { gql } from "graphql-tag"
import { AccountPageRef } from "../Fragments/AccountPage/Ref.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"
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 { PromoCampaignPageRef } from "../Fragments/PromoCampaignPage/Ref.graphql"
import { StartPageRef } from "../Fragments/StartPage/Ref.graphql"
import { System } from "../Fragments/System.graphql"
export const GetUsePointsModal = gql`
query GetUsePointsModal($locale: String!) {
all_usepointsmodal(locale: $locale) {
items {
image
link_group {
link_text
illustration
illustration_size
is_contentstack_link
external_link {
href
}
linkConnection {
edges {
node {
__typename
...AccountPageLink
...CampaignOverviewPageLink
...CampaignPageLink
...CollectionPageLink
...ContentPageLink
...DestinationCityPageLink
...DestinationCountryPageLink
...DestinationOverviewPageLink
...HotelPageLink
...LoyaltyPageLink
...StartPageLink
...PromoCampaignPageLink
}
}
}
}
}
}
}
${AccountPageLink}
${CampaignOverviewPageLink}
${CampaignPageLink}
${CollectionPageLink}
${ContentPageLink}
${DestinationCityPageLink}
${DestinationCountryPageLink}
${DestinationOverviewPageLink}
${HotelPageLink}
${LoyaltyPageLink}
${StartPageLink}
${PromoCampaignPageLink}
`
export const GetUsePointsModalRefs = gql`
query GetUsePointsModalRefs($locale: String!) {
all_usepointsmodal(locale: $locale) {
items {
link_group {
linkConnection {
edges {
node {
__typename
...AccountPageRef
...CampaignOverviewPageRef
...CampaignPageRef
...CollectionPageRef
...ContentPageRef
...DestinationCityPageRef
...DestinationCountryPageRef
...DestinationOverviewPageRef
...HotelPageRef
...LoyaltyPageRef
...StartPageRef
...PromoCampaignPageRef
}
}
}
}
system {
...System
}
}
}
}
${AccountPageRef}
${CampaignOverviewPageRef}
${CampaignPageRef}
${CollectionPageRef}
${ContentPageRef}
${DestinationCityPageRef}
${DestinationCountryPageRef}
${DestinationOverviewPageRef}
${HotelPageRef}
${LoyaltyPageRef}
${StartPageRef}
${PromoCampaignPageRef}
${System}
`