diff --git a/apps/partner-sas/next.config.ts b/apps/partner-sas/next.config.ts index 06b8472a3..ce41377be 100644 --- a/apps/partner-sas/next.config.ts +++ b/apps/partner-sas/next.config.ts @@ -27,6 +27,16 @@ const nextConfig: NextConfig = { ], ], }, + + webpack: function (config) { + config.module.rules.push({ + test: /\.(graphql|gql)/, + exclude: /node_modules/, + loader: "graphql-tag/loader", + }) + + return config + }, } export default Sentry.withSentryConfig(nextConfig, { diff --git a/apps/partner-sas/package.json b/apps/partner-sas/package.json index ddd53abc8..fcdc13fea 100644 --- a/apps/partner-sas/package.json +++ b/apps/partner-sas/package.json @@ -4,7 +4,7 @@ "private": true, "type": "module", "scripts": { - "dev": "NODE_OPTIONS=--openssl-legacy-provider PORT=3001 NEXT_PUBLIC_PORT=3001 next dev --turbo", + "dev": "NODE_OPTIONS=--openssl-legacy-provider PORT=3001 NEXT_PUBLIC_PORT=3001 next dev", "build": "next build", "start": "node .next/standalone/server.js", "lint": "next lint --max-warnings 0 && tsgo --noEmit", diff --git a/apps/scandic-web/next.config.ts b/apps/scandic-web/next.config.ts index 2bca05238..2d1df0269 100644 --- a/apps/scandic-web/next.config.ts +++ b/apps/scandic-web/next.config.ts @@ -92,6 +92,17 @@ const nextConfig = { output: "standalone", + // eslint-disable-next-line @typescript-eslint/no-explicit-any + webpack: function (config: any) { + config.module.rules.push({ + test: /\.(graphql|gql)/, + exclude: /node_modules/, + loader: "graphql-tag/loader", + }) + + return config + }, + // https://nextjs.org/docs/app/api-reference/next-config-js/redirects#header-cookie-and-query-matching redirects() { // Param checks needs to be split as Next.js handles everything diff --git a/apps/scandic-web/package.json b/apps/scandic-web/package.json index 8cdd2d3e1..d571cd06e 100644 --- a/apps/scandic-web/package.json +++ b/apps/scandic-web/package.json @@ -5,7 +5,7 @@ "type": "module", "scripts": { "build": "next build", - "dev": "NODE_OPTIONS=--openssl-legacy-provider PORT=3000 NEXT_PUBLIC_PORT=3000 next dev --turbo", + "dev": "NODE_OPTIONS=--openssl-legacy-provider PORT=3000 NEXT_PUBLIC_PORT=3000 next dev", "lint": "yarn clean && next lint --max-warnings 0 && tsc", "lint:fix": "yarn clean && next lint --fix --max-warnings 0 && tsc", "start": "node .next/standalone/server.js", diff --git a/apps/scandic-web/vitest.config.ts b/apps/scandic-web/vitest.config.ts index 9fa48e2a6..430ca8962 100644 --- a/apps/scandic-web/vitest.config.ts +++ b/apps/scandic-web/vitest.config.ts @@ -4,8 +4,7 @@ import { defineConfig } from "vitest/config" export default defineConfig({ plugins: [ - // eslint-disable-next-line @typescript-eslint/no-explicit-any - tsconfigPaths() as any, + tsconfigPaths(), react({ babel: { plugins: [ diff --git a/packages/design-system/lib/components/InfoCard/InfoCard.stories.tsx b/packages/design-system/lib/components/InfoCard/InfoCard.stories.tsx index 1c179d24e..e1bf8c470 100644 --- a/packages/design-system/lib/components/InfoCard/InfoCard.stories.tsx +++ b/packages/design-system/lib/components/InfoCard/InfoCard.stories.tsx @@ -115,6 +115,7 @@ const meta: Meta = { style={{ display: 'grid', gap: '1rem' }} > {Object.keys(infoCardConfig.variants.theme).map((theme) => { + console.log(theme) const args = { ...context.args, backgroundImage: diff --git a/packages/trpc/env/server.ts b/packages/trpc/env/server.ts index 4cd42a0d5..9bf661a3f 100644 --- a/packages/trpc/env/server.ts +++ b/packages/trpc/env/server.ts @@ -35,6 +35,11 @@ export const env = createEnv({ CMS_PREVIEW_TOKEN: z.string(), SENTRY_ENVIRONMENT: z.string().default("development"), PUBLIC_URL: z.string().default(""), + PRINT_QUERY: z + .string() + .refine((s) => s === "true" || s === "false") + .transform((s) => s === "true") + .default("false"), SALESFORCE_PREFERENCE_BASE_URL: z.string(), }, emptyStringAsUndefined: true, @@ -55,6 +60,7 @@ export const env = createEnv({ CMS_PREVIEW_TOKEN: process.env.CMS_PREVIEW_TOKEN, SENTRY_ENVIRONMENT: process.env.SENTRY_ENVIRONMENT, PUBLIC_URL: process.env.NEXT_PUBLIC_PUBLIC_URL, + PRINT_QUERY: process.env.PRINT_QUERY, SALESFORCE_PREFERENCE_BASE_URL: process.env.SALESFORCE_PREFERENCE_BASE_URL, }, }) diff --git a/packages/trpc/lib/graphql/Fragments/AccountPage/Ref.graphql b/packages/trpc/lib/graphql/Fragments/AccountPage/Ref.graphql new file mode 100644 index 000000000..043af22f9 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/AccountPage/Ref.graphql @@ -0,0 +1,7 @@ +#import "../System.graphql" + +fragment AccountPageRef on AccountPage { + system { + ...System + } +} diff --git a/packages/trpc/lib/graphql/Fragments/AccountPage/Ref.graphql.ts b/packages/trpc/lib/graphql/Fragments/AccountPage/Ref.graphql.ts deleted file mode 100644 index ff8a87987..000000000 --- a/packages/trpc/lib/graphql/Fragments/AccountPage/Ref.graphql.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { gql } from "graphql-tag" - -import { System } from "../System.graphql" - -export const AccountPageRef = gql` -fragment AccountPageRef on AccountPage { - system { - ...System - } -} -${System} -` diff --git a/packages/trpc/lib/graphql/Fragments/Alert.graphql b/packages/trpc/lib/graphql/Fragments/Alert.graphql new file mode 100644 index 000000000..fd33afa64 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Alert.graphql @@ -0,0 +1,141 @@ +#import "./PageLink/AccountPageLink.graphql" +#import "./PageLink/CampaignOverviewPageLink.graphql" +#import "./PageLink/CampaignPageLink.graphql" +#import "./PageLink/CollectionPageLink.graphql" +#import "./PageLink/ContentPageLink.graphql" +#import "./PageLink/DestinationCityPageLink.graphql" +#import "./PageLink/DestinationCountryPageLink.graphql" +#import "./PageLink/DestinationOverviewPageLink.graphql" +#import "./PageLink/HotelPageLink.graphql" +#import "./PageLink/LoyaltyPageLink.graphql" +#import "./PageLink/StartPageLink.graphql" +#import "./PageLink/PromoCampaignPageLink.graphql" + +#import "./AccountPage/Ref.graphql" +#import "./CampaignOverviewPage/Ref.graphql" +#import "./CampaignPage/Ref.graphql" +#import "./CollectionPage/Ref.graphql" +#import "./ContentPage/Ref.graphql" +#import "./DestinationCityPage/Ref.graphql" +#import "./DestinationCountryPage/Ref.graphql" +#import "./DestinationOverviewPage/Ref.graphql" +#import "./HotelPage/Ref.graphql" +#import "./LoyaltyPage/Ref.graphql" +#import "./StartPage/Ref.graphql" +#import "./PromoCampaignPage/Ref.graphql" + +fragment Alert on Alert { + type + heading + text + phone_contact { + display_text + phone_number + footnote + } + has_link + link { + title + linkConnection { + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + } + has_sidepeek_button + sidepeek_button { + cta_text + } + sidepeek_content { + heading + content { + embedded_itemsConnection { + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + json + } + } + visible_on +} + +fragment AlertRef on Alert { + link { + linkConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + sidepeek_content { + content { + embedded_itemsConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + json + } + } + system { + ...System + } + visible_on +} diff --git a/packages/trpc/lib/graphql/Fragments/Alert.graphql.ts b/packages/trpc/lib/graphql/Fragments/Alert.graphql.ts deleted file mode 100644 index 0367fd80c..000000000 --- a/packages/trpc/lib/graphql/Fragments/Alert.graphql.ts +++ /dev/null @@ -1,173 +0,0 @@ -import { gql } from "graphql-tag" - -import { AccountPageRef } from "./AccountPage/Ref.graphql" -import { CampaignOverviewPageRef } from "./CampaignOverviewPage/Ref.graphql" -import { CampaignPageRef } from "./CampaignPage/Ref.graphql" -import { CollectionPageRef } from "./CollectionPage/Ref.graphql" -import { ContentPageRef } from "./ContentPage/Ref.graphql" -import { DestinationCityPageRef } from "./DestinationCityPage/Ref.graphql" -import { DestinationCountryPageRef } from "./DestinationCountryPage/Ref.graphql" -import { DestinationOverviewPageRef } from "./DestinationOverviewPage/Ref.graphql" -import { HotelPageRef } from "./HotelPage/Ref.graphql" -import { LoyaltyPageRef } from "./LoyaltyPage/Ref.graphql" -import { AccountPageLink } from "./PageLink/AccountPageLink.graphql" -import { CampaignOverviewPageLink } from "./PageLink/CampaignOverviewPageLink.graphql" -import { CampaignPageLink } from "./PageLink/CampaignPageLink.graphql" -import { CollectionPageLink } from "./PageLink/CollectionPageLink.graphql" -import { ContentPageLink } from "./PageLink/ContentPageLink.graphql" -import { DestinationCityPageLink } from "./PageLink/DestinationCityPageLink.graphql" -import { DestinationCountryPageLink } from "./PageLink/DestinationCountryPageLink.graphql" -import { DestinationOverviewPageLink } from "./PageLink/DestinationOverviewPageLink.graphql" -import { HotelPageLink } from "./PageLink/HotelPageLink.graphql" -import { LoyaltyPageLink } from "./PageLink/LoyaltyPageLink.graphql" -import { PromoCampaignPageLink } from "./PageLink/PromoCampaignPageLink.graphql" -import { StartPageLink } from "./PageLink/StartPageLink.graphql" -import { PromoCampaignPageRef } from "./PromoCampaignPage/Ref.graphql" -import { StartPageRef } from "./StartPage/Ref.graphql" -import { System } from "./System.graphql" - -export const Alert = gql` - fragment Alert on Alert { - type - heading - text - phone_contact { - display_text - phone_number - footnote - } - has_link - link { - title - linkConnection { - edges { - node { - __typename - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - } - has_sidepeek_button - sidepeek_button { - cta_text - } - sidepeek_content { - heading - content { - embedded_itemsConnection { - edges { - node { - __typename - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - json - } - } - visible_on - } - - ${AccountPageLink} - ${CampaignOverviewPageLink} - ${CampaignPageLink} - ${CollectionPageLink} - ${ContentPageLink} - ${DestinationCityPageLink} - ${DestinationCountryPageLink} - ${DestinationOverviewPageLink} - ${HotelPageLink} - ${LoyaltyPageLink} - ${StartPageLink} - ${PromoCampaignPageLink} -` - -export const AlertRef = gql` - fragment AlertRef on Alert { - link { - linkConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - sidepeek_content { - content { - embedded_itemsConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - json - } - } - system { - ...System - } - visible_on - } - ${System} - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${CollectionPageRef} - ${ContentPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${StartPageRef} - ${PromoCampaignPageRef} -` diff --git a/packages/trpc/lib/graphql/Fragments/Aside/Contact.graphql b/packages/trpc/lib/graphql/Fragments/Aside/Contact.graphql new file mode 100644 index 000000000..32c51dbd5 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Aside/Contact.graphql @@ -0,0 +1,14 @@ +#import "../Contact.graphql" + +fragment ContactAside on CurrentBlocksPageAsideContact { + contact { + contactConnection { + edges { + node { + ...Contact + } + } + totalCount + } + } +} diff --git a/packages/trpc/lib/graphql/Fragments/Aside/Contact.graphql.ts b/packages/trpc/lib/graphql/Fragments/Aside/Contact.graphql.ts deleted file mode 100644 index 0b3f4f325..000000000 --- a/packages/trpc/lib/graphql/Fragments/Aside/Contact.graphql.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { gql } from "graphql-tag" - -import { Contact } from "../Contact.graphql" - -export const ContactAside = gql` - fragment ContactAside on CurrentBlocksPageAsideContact { - contact { - contactConnection { - edges { - node { - ...Contact - } - } - totalCount - } - } - } - ${Contact} -` diff --git a/packages/trpc/lib/graphql/Fragments/Aside/Puff.graphql b/packages/trpc/lib/graphql/Fragments/Aside/Puff.graphql new file mode 100644 index 000000000..1ed6ba3ca --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Aside/Puff.graphql @@ -0,0 +1,7 @@ +#import "../Puff.graphql" + +fragment PuffAside on CurrentBlocksPageAsidePuff { + puff { + ...Puff + } +} diff --git a/packages/trpc/lib/graphql/Fragments/Aside/Puff.graphql.ts b/packages/trpc/lib/graphql/Fragments/Aside/Puff.graphql.ts deleted file mode 100644 index cbde5eabe..000000000 --- a/packages/trpc/lib/graphql/Fragments/Aside/Puff.graphql.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { gql } from "graphql-tag" - -import { Puff } from "../Puff.graphql" - -export const PuffAside = gql` -fragment PuffAside on CurrentBlocksPageAsidePuff { - puff { - ...Puff - } -} -${Puff} -` diff --git a/packages/trpc/lib/graphql/Fragments/Banner.graphql b/packages/trpc/lib/graphql/Fragments/Banner.graphql new file mode 100644 index 000000000..4f73f049e --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Banner.graphql @@ -0,0 +1,82 @@ +#import "./PageLink/AccountPageLink.graphql" +#import "./PageLink/CampaignOverviewPageLink.graphql" +#import "./PageLink/CampaignPageLink.graphql" +#import "./PageLink/CollectionPageLink.graphql" +#import "./PageLink/ContentPageLink.graphql" +#import "./PageLink/DestinationCityPageLink.graphql" +#import "./PageLink/DestinationCountryPageLink.graphql" +#import "./PageLink/DestinationOverviewPageLink.graphql" +#import "./PageLink/HotelPageLink.graphql" +#import "./PageLink/LoyaltyPageLink.graphql" +#import "./PageLink/StartPageLink.graphql" +#import "./PageLink/PromoCampaignPageLink.graphql" + +#import "./AccountPage/Ref.graphql" +#import "./CampaignOverviewPage/Ref.graphql" +#import "./CampaignPage/Ref.graphql" +#import "./CollectionPage/Ref.graphql" +#import "./ContentPage/Ref.graphql" +#import "./DestinationCityPage/Ref.graphql" +#import "./DestinationCountryPage/Ref.graphql" +#import "./DestinationOverviewPage/Ref.graphql" +#import "./HotelPage/Ref.graphql" +#import "./LoyaltyPage/Ref.graphql" +#import "./StartPage/Ref.graphql" +#import "./PromoCampaignPage/Ref.graphql" + +fragment Banner on Banner { + tag + text + link { + title + linkConnection { + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + } + booking_code + visible_on +} + +fragment BannerRef on Banner { + link { + linkConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + visible_on + system { + ...System + } +} diff --git a/packages/trpc/lib/graphql/Fragments/Banner.graphql.ts b/packages/trpc/lib/graphql/Fragments/Banner.graphql.ts deleted file mode 100644 index a67a9ea46..000000000 --- a/packages/trpc/lib/graphql/Fragments/Banner.graphql.ts +++ /dev/null @@ -1,111 +0,0 @@ -import { gql } from "graphql-tag" - -import { AccountPageRef } from "./AccountPage/Ref.graphql" -import { CampaignOverviewPageRef } from "./CampaignOverviewPage/Ref.graphql" -import { CampaignPageRef } from "./CampaignPage/Ref.graphql" -import { CollectionPageRef } from "./CollectionPage/Ref.graphql" -import { ContentPageRef } from "./ContentPage/Ref.graphql" -import { DestinationCityPageRef } from "./DestinationCityPage/Ref.graphql" -import { DestinationCountryPageRef } from "./DestinationCountryPage/Ref.graphql" -import { DestinationOverviewPageRef } from "./DestinationOverviewPage/Ref.graphql" -import { HotelPageRef } from "./HotelPage/Ref.graphql" -import { LoyaltyPageRef } from "./LoyaltyPage/Ref.graphql" -import { AccountPageLink } from "./PageLink/AccountPageLink.graphql" -import { CampaignOverviewPageLink } from "./PageLink/CampaignOverviewPageLink.graphql" -import { CampaignPageLink } from "./PageLink/CampaignPageLink.graphql" -import { CollectionPageLink } from "./PageLink/CollectionPageLink.graphql" -import { ContentPageLink } from "./PageLink/ContentPageLink.graphql" -import { DestinationCityPageLink } from "./PageLink/DestinationCityPageLink.graphql" -import { DestinationCountryPageLink } from "./PageLink/DestinationCountryPageLink.graphql" -import { DestinationOverviewPageLink } from "./PageLink/DestinationOverviewPageLink.graphql" -import { HotelPageLink } from "./PageLink/HotelPageLink.graphql" -import { LoyaltyPageLink } from "./PageLink/LoyaltyPageLink.graphql" -import { PromoCampaignPageLink } from "./PageLink/PromoCampaignPageLink.graphql" -import { StartPageLink } from "./PageLink/StartPageLink.graphql" -import { PromoCampaignPageRef } from "./PromoCampaignPage/Ref.graphql" -import { StartPageRef } from "./StartPage/Ref.graphql" - -export const Banner = gql` - fragment Banner on Banner { - tag - text - link { - title - linkConnection { - edges { - node { - __typename - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - } - booking_code - visible_on - } - ${AccountPageLink} - ${CampaignOverviewPageLink} - ${CampaignPageLink} - ${CollectionPageLink} - ${ContentPageLink} - ${DestinationCityPageLink} - ${DestinationCountryPageLink} - ${DestinationOverviewPageLink} - ${HotelPageLink} - ${LoyaltyPageLink} - ${StartPageLink} - ${PromoCampaignPageLink} -` - -export const BannerRef = gql` - fragment BannerRef on Banner { - link { - linkConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - visible_on - system { - ...System - } - } - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${CollectionPageRef} - ${ContentPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${StartPageRef} - ${PromoCampaignPageRef} -` diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/Accordion.graphql b/packages/trpc/lib/graphql/Fragments/Blocks/Accordion.graphql new file mode 100644 index 000000000..28d5533d7 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/Accordion.graphql @@ -0,0 +1,838 @@ +#import "../SysAsset.graphql" + +#import "../PageLink/AccountPageLink.graphql" +#import "../PageLink/CampaignOverviewPageLink.graphql" +#import "../PageLink/CampaignPageLink.graphql" +#import "../PageLink/CollectionPageLink.graphql" +#import "../PageLink/ContentPageLink.graphql" +#import "../PageLink/DestinationCityPageLink.graphql" +#import "../PageLink/DestinationCountryPageLink.graphql" +#import "../PageLink/DestinationOverviewPageLink.graphql" +#import "../PageLink/HotelPageLink.graphql" +#import "../PageLink/LoyaltyPageLink.graphql" +#import "../PageLink/StartPageLink.graphql" +#import "../PageLink/PromoCampaignPageLink.graphql" + +#import "../AccountPage/Ref.graphql" +#import "../CampaignOverviewPage/Ref.graphql" +#import "../CampaignPage/Ref.graphql" +#import "../CollectionPage/Ref.graphql" +#import "../ContentPage/Ref.graphql" +#import "../DestinationCityPage/Ref.graphql" +#import "../DestinationCountryPage/Ref.graphql" +#import "../DestinationOverviewPage/Ref.graphql" +#import "../HotelPage/Ref.graphql" +#import "../LoyaltyPage/Ref.graphql" +#import "../StartPage/Ref.graphql" +#import "../PromoCampaignPage/Ref.graphql" + +#import "./Refs/Accordion.graphql" + +fragment AccordionBlock on Accordion { + __typename + title + questions { + question + answer { + json + embedded_itemsConnection { + edges { + node { + __typename + ...SysAsset + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + } + } +} + +fragment GlobalAccordionBlock on GlobalAccordion { + __typename + questions { + question + answer { + json + embedded_itemsConnection { + edges { + node { + __typename + ...SysAsset + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + } + } +} + +fragment Accordion_AccountPage on AccountPageContentAccordion { + __typename + accordion { + title + accordions { + __typename + ...GlobalAccordion_AccountPage + ...SpecificAccordion_AccountPage + } + } +} + +fragment GlobalAccordion_AccountPage on AccountPageContentAccordionBlockAccordionsGlobalAccordion { + __typename + global_accordion { + global_accordionConnection { + edges { + node { + ...AccordionBlock + } + } + } + } +} + +fragment SpecificAccordion_AccountPage on AccountPageContentAccordionBlockAccordionsSpecificAccordion { + __typename + specific_accordion { + questions { + question + answer { + json + embedded_itemsConnection { + edges { + node { + __typename + ...SysAsset + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + } + } + } +} + +fragment Accordion_AccountPageRefs on AccountPageContentAccordion { + accordion { + accordions { + __typename + ...GlobalAccordion_AccountPageRefs + ...SpecificAccordion_AccountPageRefs + } + } +} + +fragment GlobalAccordion_AccountPageRefs on AccountPageContentAccordionBlockAccordionsGlobalAccordion { + global_accordion { + global_accordionConnection { + edges { + node { + ...AccordionBlockRefs + } + } + } + } +} + +fragment SpecificAccordion_AccountPageRefs on AccountPageContentAccordionBlockAccordionsSpecificAccordion { + specific_accordion { + questions { + answer { + embedded_itemsConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + } + } +} + +fragment Accordion_ContentPage on ContentPageBlocksAccordion { + __typename + accordion { + title + accordions { + __typename + ...GlobalAccordion_ContentPage + ...SpecificAccordion_ContentPage + } + } +} + +fragment GlobalAccordion_ContentPage on ContentPageBlocksAccordionBlockAccordionsGlobalAccordion { + __typename + global_accordion { + global_accordionConnection { + edges { + node { + ...AccordionBlock + } + } + } + } +} + +fragment SpecificAccordion_ContentPage on ContentPageBlocksAccordionBlockAccordionsSpecificAccordion { + __typename + specific_accordion { + questions { + question + answer { + json + embedded_itemsConnection { + edges { + node { + __typename + ...SysAsset + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + } + } + } +} + +fragment Accordion_ContentPageRefs on ContentPageBlocksAccordion { + accordion { + accordions { + __typename + ...GlobalAccordion_ContentPageRefs + ...SpecificAccordion_ContentPageRefs + } + } +} + +fragment GlobalAccordion_ContentPageRefs on ContentPageBlocksAccordionBlockAccordionsGlobalAccordion { + global_accordion { + global_accordionConnection { + edges { + node { + ...AccordionBlockRefs + } + } + } + } +} + +fragment SpecificAccordion_ContentPageRefs on ContentPageBlocksAccordionBlockAccordionsSpecificAccordion { + specific_accordion { + questions { + answer { + embedded_itemsConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + } + } +} + +fragment Accordion_DestinationCityPage on DestinationCityPageBlocksAccordion { + __typename + accordion { + title + accordions { + __typename + ...GlobalAccordion_DestinationCityPage + ...SpecificAccordion_DestinationCityPage + } + } +} + +fragment GlobalAccordion_DestinationCityPage on DestinationCityPageBlocksAccordionBlockAccordionsGlobalAccordion { + __typename + global_accordion { + global_accordionConnection { + edges { + node { + ...AccordionBlock + } + } + } + } +} + +fragment SpecificAccordion_DestinationCityPage on DestinationCityPageBlocksAccordionBlockAccordionsSpecificAccordion { + __typename + specific_accordion { + questions { + question + answer { + json + embedded_itemsConnection { + edges { + node { + __typename + ...SysAsset + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + } + } + } +} + +fragment Accordion_DestinationCityPageRefs on DestinationCityPageBlocksAccordion { + accordion { + accordions { + __typename + ...GlobalAccordion_DestinationCityPageRefs + ...SpecificAccordion_DestinationCityPageRefs + } + } +} + +fragment GlobalAccordion_DestinationCityPageRefs on DestinationCityPageBlocksAccordionBlockAccordionsGlobalAccordion { + global_accordion { + global_accordionConnection { + edges { + node { + ...AccordionBlockRefs + } + } + } + } +} + +fragment SpecificAccordion_DestinationCityPageRefs on DestinationCityPageBlocksAccordionBlockAccordionsSpecificAccordion { + specific_accordion { + questions { + answer { + embedded_itemsConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + } + } +} + +fragment Accordion_DestinationCountryPage on DestinationCountryPageBlocksAccordion { + __typename + accordion { + title + accordions { + __typename + ...GlobalAccordion_DestinationCountryPage + ...SpecificAccordion_DestinationCountryPage + } + } +} + +fragment GlobalAccordion_DestinationCountryPage on DestinationCountryPageBlocksAccordionBlockAccordionsGlobalAccordion { + __typename + global_accordion { + global_accordionConnection { + edges { + node { + ...AccordionBlock + } + } + } + } +} + +fragment SpecificAccordion_DestinationCountryPage on DestinationCountryPageBlocksAccordionBlockAccordionsSpecificAccordion { + __typename + specific_accordion { + questions { + question + answer { + json + embedded_itemsConnection { + edges { + node { + __typename + ...SysAsset + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + } + } + } +} + +fragment Accordion_DestinationCountryPageRefs on DestinationCountryPageBlocksAccordion { + accordion { + accordions { + __typename + ...GlobalAccordion_DestinationCountryPageRefs + ...SpecificAccordion_DestinationCountryPageRefs + } + } +} + +fragment GlobalAccordion_DestinationCountryPageRefs on DestinationCountryPageBlocksAccordionBlockAccordionsGlobalAccordion { + global_accordion { + global_accordionConnection { + edges { + node { + ...AccordionBlockRefs + } + } + } + } +} + +fragment SpecificAccordion_DestinationCountryPageRefs on DestinationCountryPageBlocksAccordionBlockAccordionsSpecificAccordion { + specific_accordion { + questions { + answer { + embedded_itemsConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + } + } +} + +fragment Accordion_CampaignPage on CampaignPageBlocksAccordion { + __typename + accordion { + title + accordions { + __typename + ...GlobalAccordion_CampaignPage + ...SpecificAccordion_CampaignPage + } + } +} + +fragment GlobalAccordion_CampaignPage on CampaignPageBlocksAccordionBlockAccordionsGlobalAccordion { + __typename + global_accordion { + global_accordionConnection { + edges { + node { + ...AccordionBlock + } + } + } + } +} + +fragment SpecificAccordion_CampaignPage on CampaignPageBlocksAccordionBlockAccordionsSpecificAccordion { + __typename + specific_accordion { + questions { + question + answer { + json + embedded_itemsConnection { + edges { + node { + __typename + ...SysAsset + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + } + } + } +} + +fragment Accordion_CampaignPageRefs on CampaignPageBlocksAccordion { + accordion { + accordions { + __typename + ...GlobalAccordion_CampaignPageRefs + ...SpecificAccordion_CampaignPageRefs + } + } +} + +fragment GlobalAccordion_CampaignPageRefs on CampaignPageBlocksAccordionBlockAccordionsGlobalAccordion { + global_accordion { + global_accordionConnection { + edges { + node { + ...AccordionBlockRefs + } + } + } + } +} + +fragment SpecificAccordion_CampaignPageRefs on CampaignPageBlocksAccordionBlockAccordionsSpecificAccordion { + specific_accordion { + questions { + answer { + embedded_itemsConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + } + } +} + +fragment Accordion_DestinationFilterBlocks on DestinationFilterBlocksAccordion { + __typename + accordion { + title + accordions { + __typename + ...GlobalAccordion_DestinationFilterBlocks + ...SpecificAccordion_DestinationFilterBlocks + } + } +} + +fragment GlobalAccordion_DestinationFilterBlocks on DestinationFilterBlocksAccordionBlockAccordionsGlobalAccordion { + __typename + global_accordion { + global_accordionConnection { + edges { + node { + ...AccordionBlock + } + } + } + } +} + +fragment SpecificAccordion_DestinationFilterBlocks on DestinationFilterBlocksAccordionBlockAccordionsSpecificAccordion { + __typename + specific_accordion { + questions { + question + answer { + json + embedded_itemsConnection { + edges { + node { + __typename + ...SysAsset + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + } + } + } +} + +fragment Accordion_DestinationFilterBlocksRefs on DestinationFilterBlocksAccordion { + accordion { + accordions { + __typename + ...GlobalAccordion_DestinationFilterBlocksRefs + ...SpecificAccordion_DestinationFilterBlocksRefs + } + } +} + +fragment GlobalAccordion_DestinationFilterBlocksRefs on DestinationFilterBlocksAccordionBlockAccordionsGlobalAccordion { + global_accordion { + global_accordionConnection { + edges { + node { + ...AccordionBlockRefs + } + } + } + } +} + +fragment SpecificAccordion_DestinationFilterBlocksRefs on DestinationFilterBlocksAccordionBlockAccordionsSpecificAccordion { + specific_accordion { + questions { + answer { + embedded_itemsConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + } + } +} + +fragment Accordion_PromoCampaignPage on PromoCampaignPageBlocksAccordion { + __typename + accordion { + accordions { + __typename + ...GlobalAccordion_PromoCampaignPage + ...SpecificAccordion_PromoCampaignPage + } + } +} + +fragment GlobalAccordion_PromoCampaignPage on PromoCampaignPageBlocksAccordionBlockAccordionsGlobalAccordion { + __typename + global_accordion { + global_accordionConnection { + edges { + node { + ...AccordionBlock + } + } + } + } +} + +fragment SpecificAccordion_PromoCampaignPage on PromoCampaignPageBlocksAccordionBlockAccordionsSpecificAccordion { + __typename + specific_accordion { + questions { + question + answer { + json + embedded_itemsConnection { + edges { + node { + __typename + ...SysAsset + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + } + } + } +} + +fragment Accordion_PromoCampaignPageRefs on PromoCampaignPageBlocksAccordion { + accordion { + accordions { + __typename + ...GlobalAccordion_PromoCampaignPageRefs + ...SpecificAccordion_PromoCampaignPageRefs + } + } +} + +fragment GlobalAccordion_PromoCampaignPageRefs on PromoCampaignPageBlocksAccordionBlockAccordionsGlobalAccordion { + global_accordion { + global_accordionConnection { + edges { + node { + ...AccordionBlockRefs + } + } + } + } +} + +fragment SpecificAccordion_PromoCampaignPageRefs on PromoCampaignPageBlocksAccordionBlockAccordionsSpecificAccordion { + specific_accordion { + questions { + answer { + embedded_itemsConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + } + } +} diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/Accordion.graphql.ts b/packages/trpc/lib/graphql/Fragments/Blocks/Accordion.graphql.ts deleted file mode 100644 index b028baa96..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/Accordion.graphql.ts +++ /dev/null @@ -1,1162 +0,0 @@ -import { gql } from "graphql-tag" - -import { AccountPageRef } from "../AccountPage/Ref.graphql" -import { CampaignOverviewPageRef } from "../CampaignOverviewPage/Ref.graphql" -import { CampaignPageRef } from "../CampaignPage/Ref.graphql" -import { CollectionPageRef } from "../CollectionPage/Ref.graphql" -import { ContentPageRef } from "../ContentPage/Ref.graphql" -import { DestinationCityPageRef } from "../DestinationCityPage/Ref.graphql" -import { DestinationCountryPageRef } from "../DestinationCountryPage/Ref.graphql" -import { DestinationOverviewPageRef } from "../DestinationOverviewPage/Ref.graphql" -import { HotelPageRef } from "../HotelPage/Ref.graphql" -import { LoyaltyPageRef } from "../LoyaltyPage/Ref.graphql" -import { AccountPageLink } from "../PageLink/AccountPageLink.graphql" -import { CampaignOverviewPageLink } from "../PageLink/CampaignOverviewPageLink.graphql" -import { CampaignPageLink } from "../PageLink/CampaignPageLink.graphql" -import { CollectionPageLink } from "../PageLink/CollectionPageLink.graphql" -import { ContentPageLink } from "../PageLink/ContentPageLink.graphql" -import { DestinationCityPageLink } from "../PageLink/DestinationCityPageLink.graphql" -import { DestinationCountryPageLink } from "../PageLink/DestinationCountryPageLink.graphql" -import { DestinationOverviewPageLink } from "../PageLink/DestinationOverviewPageLink.graphql" -import { HotelPageLink } from "../PageLink/HotelPageLink.graphql" -import { LoyaltyPageLink } from "../PageLink/LoyaltyPageLink.graphql" -import { PromoCampaignPageLink } from "../PageLink/PromoCampaignPageLink.graphql" -import { StartPageLink } from "../PageLink/StartPageLink.graphql" -import { PromoCampaignPageRef } from "../PromoCampaignPage/Ref.graphql" -import { StartPageRef } from "../StartPage/Ref.graphql" -import { SysAsset } from "../SysAsset.graphql" -import { AccordionBlockRefs } from "./Refs/Accordion.graphql" - -export const AccordionBlock = gql` - fragment AccordionBlock on Accordion { - __typename - title - questions { - question - answer { - json - embedded_itemsConnection { - edges { - node { - __typename - ...SysAsset - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - } - } - } - ${SysAsset} - ${AccountPageLink} - ${CampaignOverviewPageLink} - ${CampaignPageLink} - ${CollectionPageLink} - ${ContentPageLink} - ${DestinationCityPageLink} - ${DestinationCountryPageLink} - ${DestinationOverviewPageLink} - ${HotelPageLink} - ${LoyaltyPageLink} - ${StartPageLink} - ${PromoCampaignPageLink} -` - -export const GlobalAccordionBlock = gql` - fragment GlobalAccordionBlock on GlobalAccordion { - __typename - questions { - question - answer { - json - embedded_itemsConnection { - edges { - node { - __typename - ...SysAsset - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - } - } - } - ${SysAsset} - ${AccountPageLink} - ${CampaignOverviewPageLink} - ${CampaignPageLink} - ${CollectionPageLink} - ${ContentPageLink} - ${DestinationCityPageLink} - ${DestinationCountryPageLink} - ${DestinationOverviewPageLink} - ${HotelPageLink} - ${LoyaltyPageLink} - ${StartPageLink} - ${PromoCampaignPageLink} -` - -export const GlobalAccordion_AccountPage = gql` - fragment GlobalAccordion_AccountPage on AccountPageContentAccordionBlockAccordionsGlobalAccordion { - __typename - global_accordion { - global_accordionConnection { - edges { - node { - ...AccordionBlock - } - } - } - } - } - ${AccordionBlock} -` - -export const SpecificAccordion_AccountPage = gql` - fragment SpecificAccordion_AccountPage on AccountPageContentAccordionBlockAccordionsSpecificAccordion { - __typename - specific_accordion { - questions { - question - answer { - json - embedded_itemsConnection { - edges { - node { - __typename - ...SysAsset - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - } - } - } - } - ${SysAsset} - ${AccountPageLink} - ${CampaignOverviewPageLink} - ${CampaignPageLink} - ${CollectionPageLink} - ${ContentPageLink} - ${DestinationCityPageLink} - ${DestinationCountryPageLink} - ${DestinationOverviewPageLink} - ${HotelPageLink} - ${LoyaltyPageLink} - ${StartPageLink} - ${PromoCampaignPageLink} -` -export const Accordion_AccountPage = gql` - fragment Accordion_AccountPage on AccountPageContentAccordion { - __typename - accordion { - title - accordions { - __typename - ...GlobalAccordion_AccountPage - ...SpecificAccordion_AccountPage - } - } - } - ${GlobalAccordion_AccountPage} - ${SpecificAccordion_AccountPage} -` - -export const GlobalAccordion_AccountPageRefs = gql` - fragment GlobalAccordion_AccountPageRefs on AccountPageContentAccordionBlockAccordionsGlobalAccordion { - global_accordion { - global_accordionConnection { - edges { - node { - ...AccordionBlockRefs - } - } - } - } - } - ${AccordionBlockRefs} -` - -export const SpecificAccordion_AccountPageRefs = gql` - fragment SpecificAccordion_AccountPageRefs on AccountPageContentAccordionBlockAccordionsSpecificAccordion { - specific_accordion { - questions { - answer { - embedded_itemsConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - } - } - } - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${CollectionPageRef} - ${ContentPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${StartPageRef} - ${PromoCampaignPageRef} -` -export const Accordion_AccountPageRefs = gql` - fragment Accordion_AccountPageRefs on AccountPageContentAccordion { - accordion { - accordions { - __typename - ...GlobalAccordion_AccountPageRefs - ...SpecificAccordion_AccountPageRefs - } - } - } - ${GlobalAccordion_AccountPageRefs} - ${SpecificAccordion_AccountPageRefs} -` - -export const GlobalAccordion_ContentPage = gql` - fragment GlobalAccordion_ContentPage on ContentPageBlocksAccordionBlockAccordionsGlobalAccordion { - __typename - global_accordion { - global_accordionConnection { - edges { - node { - ...AccordionBlock - } - } - } - } - } - ${AccordionBlock} -` - -export const SpecificAccordion_ContentPage = gql` - fragment SpecificAccordion_ContentPage on ContentPageBlocksAccordionBlockAccordionsSpecificAccordion { - __typename - specific_accordion { - questions { - question - answer { - json - embedded_itemsConnection { - edges { - node { - __typename - ...SysAsset - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - } - } - } - } - ${SysAsset} - ${AccountPageLink} - ${CampaignOverviewPageLink} - ${CampaignPageLink} - ${CollectionPageLink} - ${ContentPageLink} - ${DestinationCityPageLink} - ${DestinationCountryPageLink} - ${DestinationOverviewPageLink} - ${HotelPageLink} - ${LoyaltyPageLink} - ${StartPageLink} - ${PromoCampaignPageLink} -` - -export const Accordion_ContentPage = gql` - fragment Accordion_ContentPage on ContentPageBlocksAccordion { - __typename - accordion { - title - accordions { - __typename - ...GlobalAccordion_ContentPage - ...SpecificAccordion_ContentPage - } - } - } - ${GlobalAccordion_ContentPage} - ${SpecificAccordion_ContentPage} -` - -export const GlobalAccordion_ContentPageRefs = gql` - fragment GlobalAccordion_ContentPageRefs on ContentPageBlocksAccordionBlockAccordionsGlobalAccordion { - global_accordion { - global_accordionConnection { - edges { - node { - ...AccordionBlockRefs - } - } - } - } - } - - ${AccordionBlockRefs} -` - -export const SpecificAccordion_ContentPageRefs = gql` - fragment SpecificAccordion_ContentPageRefs on ContentPageBlocksAccordionBlockAccordionsSpecificAccordion { - specific_accordion { - questions { - answer { - embedded_itemsConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - } - } - } - - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${CollectionPageRef} - ${ContentPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${StartPageRef} - ${PromoCampaignPageRef} -` - -export const GlobalAccordion_DestinationCityPage = gql` - fragment GlobalAccordion_DestinationCityPage on DestinationCityPageBlocksAccordionBlockAccordionsGlobalAccordion { - __typename - global_accordion { - global_accordionConnection { - edges { - node { - ...AccordionBlock - } - } - } - } - } - ${AccordionBlock} -` - -export const SpecificAccordion_DestinationCityPage = gql` - fragment SpecificAccordion_DestinationCityPage on DestinationCityPageBlocksAccordionBlockAccordionsSpecificAccordion { - __typename - specific_accordion { - questions { - question - answer { - json - embedded_itemsConnection { - edges { - node { - __typename - ...SysAsset - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - } - } - } - } - ${SysAsset} - ${AccountPageLink} - ${CampaignOverviewPageLink} - ${CampaignPageLink} - ${CollectionPageLink} - ${ContentPageLink} - ${DestinationCityPageLink} - ${DestinationCountryPageLink} - ${DestinationOverviewPageLink} - ${HotelPageLink} - ${LoyaltyPageLink} - ${StartPageLink} - ${PromoCampaignPageLink} -` - -export const GlobalAccordion_DestinationCityPageRefs = gql` - fragment GlobalAccordion_DestinationCityPageRefs on DestinationCityPageBlocksAccordionBlockAccordionsGlobalAccordion { - global_accordion { - global_accordionConnection { - edges { - node { - ...AccordionBlockRefs - } - } - } - } - } - - ${AccordionBlockRefs} -` -export const Accordion_ContentPageRefs = gql` - fragment Accordion_ContentPageRefs on ContentPageBlocksAccordion { - accordion { - accordions { - __typename - ...GlobalAccordion_ContentPageRefs - ...SpecificAccordion_ContentPageRefs - } - } - } - ${GlobalAccordion_ContentPageRefs} - ${SpecificAccordion_ContentPageRefs} -` - -export const SpecificAccordion_DestinationCityPageRefs = gql` - fragment SpecificAccordion_DestinationCityPageRefs on DestinationCityPageBlocksAccordionBlockAccordionsSpecificAccordion { - specific_accordion { - questions { - answer { - embedded_itemsConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - } - } - } - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${CollectionPageRef} - ${ContentPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${StartPageRef} - ${PromoCampaignPageRef} -` -export const Accordion_DestinationCityPageRefs = gql` - fragment Accordion_DestinationCityPageRefs on DestinationCityPageBlocksAccordion { - accordion { - accordions { - __typename - ...GlobalAccordion_DestinationCityPageRefs - ...SpecificAccordion_DestinationCityPageRefs - } - } - } - ${GlobalAccordion_DestinationCityPageRefs} - ${SpecificAccordion_DestinationCityPageRefs} -` - -export const GlobalAccordion_DestinationCountryPage = gql` - fragment GlobalAccordion_DestinationCountryPage on DestinationCountryPageBlocksAccordionBlockAccordionsGlobalAccordion { - __typename - global_accordion { - global_accordionConnection { - edges { - node { - ...AccordionBlock - } - } - } - } - } - ${AccordionBlock} -` - -export const SpecificAccordion_DestinationCountryPage = gql` - fragment SpecificAccordion_DestinationCountryPage on DestinationCountryPageBlocksAccordionBlockAccordionsSpecificAccordion { - __typename - specific_accordion { - questions { - question - answer { - json - embedded_itemsConnection { - edges { - node { - __typename - ...SysAsset - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - } - } - } - } - ${SysAsset} - ${AccountPageLink} - ${CampaignOverviewPageLink} - ${CampaignPageLink} - ${CollectionPageLink} - ${ContentPageLink} - ${DestinationCityPageLink} - ${DestinationCountryPageLink} - ${DestinationOverviewPageLink} - ${HotelPageLink} - ${LoyaltyPageLink} - ${StartPageLink} - ${PromoCampaignPageLink} -` - -export const Accordion_DestinationCountryPage = gql` - fragment Accordion_DestinationCountryPage on DestinationCountryPageBlocksAccordion { - __typename - accordion { - title - accordions { - __typename - ...GlobalAccordion_DestinationCountryPage - ...SpecificAccordion_DestinationCountryPage - } - } - } - ${GlobalAccordion_DestinationCountryPage} - ${SpecificAccordion_DestinationCountryPage} -` - -export const GlobalAccordion_DestinationCountryPageRefs = gql` - fragment GlobalAccordion_DestinationCountryPageRefs on DestinationCountryPageBlocksAccordionBlockAccordionsGlobalAccordion { - global_accordion { - global_accordionConnection { - edges { - node { - ...AccordionBlockRefs - } - } - } - } - } - ${AccordionBlockRefs} -` - -export const SpecificAccordion_DestinationCountryPageRefs = gql` - fragment SpecificAccordion_DestinationCountryPageRefs on DestinationCountryPageBlocksAccordionBlockAccordionsSpecificAccordion { - specific_accordion { - questions { - answer { - embedded_itemsConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - } - } - } - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${CollectionPageRef} - ${ContentPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${StartPageRef} - ${PromoCampaignPageRef} -` - -export const Accordion_DestinationCountryPageRefs = gql` - fragment Accordion_DestinationCountryPageRefs on DestinationCountryPageBlocksAccordion { - accordion { - accordions { - __typename - ...GlobalAccordion_DestinationCountryPageRefs - ...SpecificAccordion_DestinationCountryPageRefs - } - } - } - ${GlobalAccordion_DestinationCountryPageRefs} - ${SpecificAccordion_DestinationCountryPageRefs} -` - -export const GlobalAccordion_CampaignPage = gql` - fragment GlobalAccordion_CampaignPage on CampaignPageBlocksAccordionBlockAccordionsGlobalAccordion { - __typename - global_accordion { - global_accordionConnection { - edges { - node { - ...AccordionBlock - } - } - } - } - } - ${AccordionBlock} -` - -export const SpecificAccordion_CampaignPage = gql` - fragment SpecificAccordion_CampaignPage on CampaignPageBlocksAccordionBlockAccordionsSpecificAccordion { - __typename - specific_accordion { - questions { - question - answer { - json - embedded_itemsConnection { - edges { - node { - __typename - ...SysAsset - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - } - } - } - } - ${SysAsset} - ${AccountPageLink} - ${CampaignOverviewPageLink} - ${CampaignPageLink} - ${CollectionPageLink} - ${ContentPageLink} - ${DestinationCityPageLink} - ${DestinationCountryPageLink} - ${DestinationOverviewPageLink} - ${HotelPageLink} - ${LoyaltyPageLink} - ${StartPageLink} - ${PromoCampaignPageLink} -` -export const Accordion_CampaignPage = gql` - fragment Accordion_CampaignPage on CampaignPageBlocksAccordion { - __typename - accordion { - title - accordions { - __typename - ...GlobalAccordion_CampaignPage - ...SpecificAccordion_CampaignPage - } - } - } - ${GlobalAccordion_CampaignPage} - ${SpecificAccordion_CampaignPage} -` - -export const GlobalAccordion_CampaignPageRefs = gql` - fragment GlobalAccordion_CampaignPageRefs on CampaignPageBlocksAccordionBlockAccordionsGlobalAccordion { - global_accordion { - global_accordionConnection { - edges { - node { - ...AccordionBlockRefs - } - } - } - } - } - ${AccordionBlockRefs} -` - -export const SpecificAccordion_CampaignPageRefs = gql` - fragment SpecificAccordion_CampaignPageRefs on CampaignPageBlocksAccordionBlockAccordionsSpecificAccordion { - specific_accordion { - questions { - answer { - embedded_itemsConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - } - } - } - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${CollectionPageRef} - ${ContentPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${StartPageRef} - ${PromoCampaignPageRef} -` -export const Accordion_CampaignPageRefs = gql` - fragment Accordion_CampaignPageRefs on CampaignPageBlocksAccordion { - accordion { - accordions { - __typename - ...GlobalAccordion_CampaignPageRefs - ...SpecificAccordion_CampaignPageRefs - } - } - } - ${GlobalAccordion_CampaignPageRefs} - ${SpecificAccordion_CampaignPageRefs} -` - -export const GlobalAccordion_DestinationFilterBlocks = gql` - fragment GlobalAccordion_DestinationFilterBlocks on DestinationFilterBlocksAccordionBlockAccordionsGlobalAccordion { - __typename - global_accordion { - global_accordionConnection { - edges { - node { - ...AccordionBlock - } - } - } - } - } - ${AccordionBlock} -` - -export const SpecificAccordion_DestinationFilterBlocks = gql` - fragment SpecificAccordion_DestinationFilterBlocks on DestinationFilterBlocksAccordionBlockAccordionsSpecificAccordion { - __typename - specific_accordion { - questions { - question - answer { - json - embedded_itemsConnection { - edges { - node { - __typename - ...SysAsset - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - } - } - } - } - ${SysAsset} - ${AccountPageLink} - ${CampaignOverviewPageLink} - ${CampaignPageLink} - ${CollectionPageLink} - ${ContentPageLink} - ${DestinationCityPageLink} - ${DestinationCountryPageLink} - ${DestinationOverviewPageLink} - ${HotelPageLink} - ${LoyaltyPageLink} - ${StartPageLink} - ${PromoCampaignPageLink} -` -export const Accordion_DestinationFilterBlocks = gql` - fragment Accordion_DestinationFilterBlocks on DestinationFilterBlocksAccordion { - __typename - accordion { - title - accordions { - __typename - ...GlobalAccordion_DestinationFilterBlocks - ...SpecificAccordion_DestinationFilterBlocks - } - } - } - ${GlobalAccordion_DestinationFilterBlocks} - ${SpecificAccordion_DestinationFilterBlocks} -` - -export const GlobalAccordion_DestinationFilterBlocksRefs = gql` - fragment GlobalAccordion_DestinationFilterBlocksRefs on DestinationFilterBlocksAccordionBlockAccordionsGlobalAccordion { - global_accordion { - global_accordionConnection { - edges { - node { - ...AccordionBlockRefs - } - } - } - } - } - ${AccordionBlockRefs} -` - -export const SpecificAccordion_DestinationFilterBlocksRefs = gql` - fragment SpecificAccordion_DestinationFilterBlocksRefs on DestinationFilterBlocksAccordionBlockAccordionsSpecificAccordion { - specific_accordion { - questions { - answer { - embedded_itemsConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - } - } - } - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${CollectionPageRef} - ${ContentPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${StartPageRef} - ${PromoCampaignPageRef} -` -export const Accordion_DestinationFilterBlocksRefs = gql` - fragment Accordion_DestinationFilterBlocksRefs on DestinationFilterBlocksAccordion { - accordion { - accordions { - __typename - ...GlobalAccordion_DestinationFilterBlocksRefs - ...SpecificAccordion_DestinationFilterBlocksRefs - } - } - } - ${GlobalAccordion_DestinationFilterBlocksRefs} - ${SpecificAccordion_DestinationFilterBlocksRefs} -` - -export const GlobalAccordion_PromoCampaignPage = gql` - fragment GlobalAccordion_PromoCampaignPage on PromoCampaignPageBlocksAccordionBlockAccordionsGlobalAccordion { - __typename - global_accordion { - global_accordionConnection { - edges { - node { - ...AccordionBlock - } - } - } - } - } - ${AccordionBlock} -` - -export const SpecificAccordion_PromoCampaignPage = gql` - fragment SpecificAccordion_PromoCampaignPage on PromoCampaignPageBlocksAccordionBlockAccordionsSpecificAccordion { - __typename - specific_accordion { - questions { - question - answer { - json - embedded_itemsConnection { - edges { - node { - __typename - ...SysAsset - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - } - } - } - } - ${SysAsset} - ${AccountPageLink} - ${CampaignOverviewPageLink} - ${CampaignPageLink} - ${CollectionPageLink} - ${ContentPageLink} - ${DestinationCityPageLink} - ${DestinationCountryPageLink} - ${DestinationOverviewPageLink} - ${HotelPageLink} - ${LoyaltyPageLink} - ${StartPageLink} - ${PromoCampaignPageLink} -` -export const Accordion_PromoCampaignPage = gql` - fragment Accordion_PromoCampaignPage on PromoCampaignPageBlocksAccordion { - __typename - accordion { - accordions { - __typename - ...GlobalAccordion_PromoCampaignPage - ...SpecificAccordion_PromoCampaignPage - } - } - } - ${GlobalAccordion_PromoCampaignPage} - ${SpecificAccordion_PromoCampaignPage} -` - -export const GlobalAccordion_PromoCampaignPageRefs = gql` - fragment GlobalAccordion_PromoCampaignPageRefs on PromoCampaignPageBlocksAccordionBlockAccordionsGlobalAccordion { - global_accordion { - global_accordionConnection { - edges { - node { - ...AccordionBlockRefs - } - } - } - } - } - ${AccordionBlockRefs} -` - -export const SpecificAccordion_PromoCampaignPageRefs = gql` - fragment SpecificAccordion_PromoCampaignPageRefs on PromoCampaignPageBlocksAccordionBlockAccordionsSpecificAccordion { - specific_accordion { - questions { - answer { - embedded_itemsConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - } - } - } - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${CollectionPageRef} - ${ContentPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${StartPageRef} - ${PromoCampaignPageRef} -` - -export const Accordion_PromoCampaignPageRefs = gql` - fragment Accordion_PromoCampaignPageRefs on PromoCampaignPageBlocksAccordion { - accordion { - accordions { - __typename - ...GlobalAccordion_PromoCampaignPageRefs - ...SpecificAccordion_PromoCampaignPageRefs - } - } - } - ${GlobalAccordion_PromoCampaignPageRefs} - ${SpecificAccordion_PromoCampaignPageRefs} -` - -export const Accordion_DestinationCityPage = gql` - fragment Accordion_DestinationCityPage on DestinationCityPageBlocksAccordion { - __typename - accordion { - title - accordions { - __typename - ...GlobalAccordion_DestinationCityPage - ...SpecificAccordion_DestinationCityPage - } - } - } - ${GlobalAccordion_DestinationCityPage} - ${SpecificAccordion_DestinationCityPage} -` diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/AllCampaigns.graphql b/packages/trpc/lib/graphql/Fragments/Blocks/AllCampaigns.graphql new file mode 100644 index 000000000..53b13236a --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/AllCampaigns.graphql @@ -0,0 +1,38 @@ +#import "../CampaignPage/Ref.graphql" + +fragment AllCampaigns on CampaignOverviewPageBlocksAllCampaigns { + all_campaigns { + heading + preamble + campaignsConnection { + edges { + node { + ... on CampaignPage { + url + card_content { + heading + image + text + } + system { + locale + } + } + } + } + } + } +} + +fragment AllCampaignsRefs on CampaignOverviewPageBlocksAllCampaigns { + all_campaigns { + campaignsConnection { + edges { + node { + __typename + ...CampaignPageRef + } + } + } + } +} diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/AllCampaigns.graphql.ts b/packages/trpc/lib/graphql/Fragments/Blocks/AllCampaigns.graphql.ts deleted file mode 100644 index e7d60df07..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/AllCampaigns.graphql.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { gql } from "graphql-tag" - -import { CampaignPageRef } from "../CampaignPage/Ref.graphql" - -export const AllCampaigns = gql` - fragment AllCampaigns on CampaignOverviewPageBlocksAllCampaigns { - all_campaigns { - heading - preamble - campaignsConnection { - edges { - node { - ... on CampaignPage { - url - card_content { - heading - image - text - } - system { - locale - } - } - } - } - } - } - } -` - -export const AllCampaignsRefs = gql` - fragment AllCampaignsRefs on CampaignOverviewPageBlocksAllCampaigns { - all_campaigns { - campaignsConnection { - edges { - node { - __typename - ...CampaignPageRef - } - } - } - } - } - ${CampaignPageRef} -` diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/Card.graphql b/packages/trpc/lib/graphql/Fragments/Blocks/Card.graphql new file mode 100644 index 000000000..c978f914f --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/Card.graphql @@ -0,0 +1,83 @@ +#import "../System.graphql" + +#import "../PageLink/AccountPageLink.graphql" +#import "../PageLink/CampaignOverviewPageLink.graphql" +#import "../PageLink/CampaignPageLink.graphql" +#import "../PageLink/CollectionPageLink.graphql" +#import "../PageLink/ContentPageLink.graphql" +#import "../PageLink/DestinationCityPageLink.graphql" +#import "../PageLink/DestinationCountryPageLink.graphql" +#import "../PageLink/DestinationOverviewPageLink.graphql" +#import "../PageLink/HotelPageLink.graphql" +#import "../PageLink/LoyaltyPageLink.graphql" +#import "../PageLink/StartPageLink.graphql" +#import "../PageLink/PromoCampaignPageLink.graphql" + +fragment CardBlock on Card { + background_image + body_text + has_primary_button + has_secondary_button + heading + scripted_top_title + title + primary_button { + cta_text + is_contentstack_link + open_in_new_tab + external_link { + href + title + } + linkConnection { + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + } + secondary_button { + cta_text + is_contentstack_link + open_in_new_tab + external_link { + href + title + } + linkConnection { + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + } + system { + ...System + } +} diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/Card.graphql.ts b/packages/trpc/lib/graphql/Fragments/Blocks/Card.graphql.ts deleted file mode 100644 index fd6bed1ac..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/Card.graphql.ts +++ /dev/null @@ -1,99 +0,0 @@ -import { gql } from "graphql-tag" - -import { AccountPageLink } from "../PageLink/AccountPageLink.graphql" -import { CampaignOverviewPageLink } from "../PageLink/CampaignOverviewPageLink.graphql" -import { CampaignPageLink } from "../PageLink/CampaignPageLink.graphql" -import { CollectionPageLink } from "../PageLink/CollectionPageLink.graphql" -import { ContentPageLink } from "../PageLink/ContentPageLink.graphql" -import { DestinationCityPageLink } from "../PageLink/DestinationCityPageLink.graphql" -import { DestinationCountryPageLink } from "../PageLink/DestinationCountryPageLink.graphql" -import { DestinationOverviewPageLink } from "../PageLink/DestinationOverviewPageLink.graphql" -import { HotelPageLink } from "../PageLink/HotelPageLink.graphql" -import { LoyaltyPageLink } from "../PageLink/LoyaltyPageLink.graphql" -import { PromoCampaignPageLink } from "../PageLink/PromoCampaignPageLink.graphql" -import { StartPageLink } from "../PageLink/StartPageLink.graphql" -import { System } from "../System.graphql" - -export const CardBlock = gql` - fragment CardBlock on Card { - background_image - body_text - has_primary_button - has_secondary_button - heading - scripted_top_title - title - primary_button { - cta_text - is_contentstack_link - open_in_new_tab - external_link { - href - title - } - linkConnection { - edges { - node { - __typename - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - } - secondary_button { - cta_text - is_contentstack_link - open_in_new_tab - external_link { - href - title - } - linkConnection { - edges { - node { - __typename - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - } - system { - ...System - } - } - ${System} - ${AccountPageLink} - ${CampaignOverviewPageLink} - ${CampaignPageLink} - ${CollectionPageLink} - ${ContentPageLink} - ${DestinationCityPageLink} - ${DestinationCountryPageLink} - ${DestinationOverviewPageLink} - ${HotelPageLink} - ${LoyaltyPageLink} - ${StartPageLink} - ${PromoCampaignPageLink} -` diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/CardGallery.graphql b/packages/trpc/lib/graphql/Fragments/Blocks/CardGallery.graphql new file mode 100644 index 000000000..07e6697ab --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/CardGallery.graphql @@ -0,0 +1,108 @@ +#import "../System.graphql" +#import "./ContentCard.graphql" + +#import "../PageLink/AccountPageLink.graphql" +#import "../PageLink/CampaignOverviewPageLink.graphql" +#import "../PageLink/CampaignPageLink.graphql" +#import "../PageLink/CollectionPageLink.graphql" +#import "../PageLink/ContentPageLink.graphql" +#import "../PageLink/DestinationCityPageLink.graphql" +#import "../PageLink/DestinationCountryPageLink.graphql" +#import "../PageLink/DestinationOverviewPageLink.graphql" +#import "../PageLink/HotelPageLink.graphql" +#import "../PageLink/LoyaltyPageLink.graphql" +#import "../PageLink/StartPageLink.graphql" +#import "../PageLink/PromoCampaignPageLink.graphql" + +#import "../AccountPage/Ref.graphql" +#import "../CampaignOverviewPage/Ref.graphql" +#import "../CampaignPage/Ref.graphql" +#import "../CollectionPage/Ref.graphql" +#import "../ContentPage/Ref.graphql" +#import "../DestinationCityPage/Ref.graphql" +#import "../DestinationCountryPage/Ref.graphql" +#import "../DestinationOverviewPage/Ref.graphql" +#import "../HotelPage/Ref.graphql" +#import "../LoyaltyPage/Ref.graphql" +#import "../StartPage/Ref.graphql" +#import "../PromoCampaignPage/Ref.graphql" + +fragment CardGallery_DestinationOverviewPage on DestinationOverviewPageBlocksCardGallery { + card_gallery { + heading + card_groups { + filter_identifier + filter_label + cardsConnection { + edges { + node { + ...ContentCardBlock + } + } + } + } + link { + cta_text + is_contentstack_link + open_in_new_tab + external_link { + href + title + } + linkConnection { + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + } + } +} + +fragment CardGallery_DestinationOverviewPageRefs on DestinationOverviewPageBlocksCardGallery { + card_gallery { + card_groups { + cardsConnection { + edges { + node { + ...ContentCardBlockRef + } + } + } + } + link { + linkConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + } +} diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/CardGallery.graphql.ts b/packages/trpc/lib/graphql/Fragments/Blocks/CardGallery.graphql.ts deleted file mode 100644 index 370908791..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/CardGallery.graphql.ts +++ /dev/null @@ -1,139 +0,0 @@ -import { gql } from "graphql-tag" - -import { AccountPageRef } from "../AccountPage/Ref.graphql" -import { CampaignOverviewPageRef } from "../CampaignOverviewPage/Ref.graphql" -import { CampaignPageRef } from "../CampaignPage/Ref.graphql" -import { CollectionPageRef } from "../CollectionPage/Ref.graphql" -import { ContentPageRef } from "../ContentPage/Ref.graphql" -import { DestinationCityPageRef } from "../DestinationCityPage/Ref.graphql" -import { DestinationCountryPageRef } from "../DestinationCountryPage/Ref.graphql" -import { DestinationOverviewPageRef } from "../DestinationOverviewPage/Ref.graphql" -import { HotelPageRef } from "../HotelPage/Ref.graphql" -import { LoyaltyPageRef } from "../LoyaltyPage/Ref.graphql" -import { AccountPageLink } from "../PageLink/AccountPageLink.graphql" -import { CampaignOverviewPageLink } from "../PageLink/CampaignOverviewPageLink.graphql" -import { CampaignPageLink } from "../PageLink/CampaignPageLink.graphql" -import { CollectionPageLink } from "../PageLink/CollectionPageLink.graphql" -import { ContentPageLink } from "../PageLink/ContentPageLink.graphql" -import { DestinationCityPageLink } from "../PageLink/DestinationCityPageLink.graphql" -import { DestinationCountryPageLink } from "../PageLink/DestinationCountryPageLink.graphql" -import { DestinationOverviewPageLink } from "../PageLink/DestinationOverviewPageLink.graphql" -import { HotelPageLink } from "../PageLink/HotelPageLink.graphql" -import { LoyaltyPageLink } from "../PageLink/LoyaltyPageLink.graphql" -import { PromoCampaignPageLink } from "../PageLink/PromoCampaignPageLink.graphql" -import { StartPageLink } from "../PageLink/StartPageLink.graphql" -import { PromoCampaignPageRef } from "../PromoCampaignPage/Ref.graphql" -import { StartPageRef } from "../StartPage/Ref.graphql" -import { System } from "../System.graphql" -import { ContentCardBlock, ContentCardBlockRef } from "./ContentCard.graphql" - -export const CardGallery_DestinationOverviewPage = gql` - fragment CardGallery_DestinationOverviewPage on DestinationOverviewPageBlocksCardGallery { - card_gallery { - heading - card_groups { - filter_identifier - filter_label - cardsConnection { - edges { - node { - ...ContentCardBlock - } - } - } - } - link { - cta_text - is_contentstack_link - open_in_new_tab - external_link { - href - title - } - linkConnection { - edges { - node { - __typename - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - } - } - } - ${System} - ${ContentCardBlock} - ${AccountPageLink} - ${CampaignOverviewPageLink} - ${CampaignPageLink} - ${CollectionPageLink} - ${ContentPageLink} - ${DestinationCityPageLink} - ${DestinationCountryPageLink} - ${DestinationOverviewPageLink} - ${HotelPageLink} - ${LoyaltyPageLink} - ${StartPageLink} - ${PromoCampaignPageLink} -` - -export const CardGallery_DestinationOverviewPageRefs = gql` - fragment CardGallery_DestinationOverviewPageRefs on DestinationOverviewPageBlocksCardGallery { - card_gallery { - card_groups { - cardsConnection { - edges { - node { - ...ContentCardBlockRef - } - } - } - } - link { - linkConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - } - } - ${ContentCardBlockRef} - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${CollectionPageRef} - ${ContentPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${StartPageRef} - ${PromoCampaignPageRef} -` diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/CardsGrid.graphql b/packages/trpc/lib/graphql/Fragments/Blocks/CardsGrid.graphql new file mode 100644 index 000000000..2887d88d6 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/CardsGrid.graphql @@ -0,0 +1,215 @@ +#import "./Card.graphql" +#import "./InfoCard.graphql" +#import "./LoyaltyCard.graphql" +#import "./TeaserCard.graphql" + +#import "./Refs/Card.graphql" +#import "./Refs/InfoCard.graphql" +#import "./Refs/LoyaltyCard.graphql" +#import "./Refs/TeaserCard.graphql" + +#import "../PageLink/AccountPageLink.graphql" +#import "../PageLink/CampaignOverviewPageLink.graphql" +#import "../PageLink/CampaignPageLink.graphql" +#import "../PageLink/CollectionPageLink.graphql" +#import "../PageLink/ContentPageLink.graphql" +#import "../PageLink/DestinationCityPageLink.graphql" +#import "../PageLink/DestinationCountryPageLink.graphql" +#import "../PageLink/DestinationOverviewPageLink.graphql" +#import "../PageLink/HotelPageLink.graphql" +#import "../PageLink/LoyaltyPageLink.graphql" +#import "../PageLink/StartPageLink.graphql" +#import "../PageLink/PromoCampaignPageLink.graphql" + +#import "../AccountPage/Ref.graphql" +#import "../CampaignOverviewPage/Ref.graphql" +#import "../CampaignPage/Ref.graphql" +#import "../ContentPage/Ref.graphql" +#import "../HotelPage/Ref.graphql" +#import "../LoyaltyPage/Ref.graphql" +#import "../CollectionPage/Ref.graphql" +#import "../DestinationCityPage/Ref.graphql" +#import "../DestinationCountryPage/Ref.graphql" +#import "../DestinationOverviewPage/Ref.graphql" +#import "../PromoCampaignPage/Ref.graphql" + +fragment CardsGrid_ContentPage on ContentPageBlocksCardsGrid { + cards_grid { + layout + preamble + theme + title + cardConnection(limit: 10) { + edges { + node { + __typename + ...CardBlock + ...LoyaltyCardBlock + ...TeaserCardBlock + } + } + } + } +} + +fragment CardsGrid_ContentPageRefs on ContentPageBlocksCardsGrid { + cards_grid { + cardConnection(limit: 10) { + edges { + node { + __typename + ...CardBlockRef + ...LoyaltyCardBlockRef + ...TeaserCardBlockRef + } + } + } + } +} + +fragment CardsGrid_CollectionPage on CollectionPageBlocksCardsGrid { + cards_grid { + layout + preamble + theme + title + cardConnection(limit: 10) { + edges { + node { + __typename + ...CardBlock + ...TeaserCardBlock + } + } + } + } +} + +fragment CardsGrid_CollectionPageRefs on CollectionPageBlocksCardsGrid { + cards_grid { + cardConnection(limit: 10) { + edges { + node { + __typename + ...CardBlockRef + ...TeaserCardBlockRef + } + } + } + } +} + +fragment CardsGrid_LoyaltyPage on LoyaltyPageBlocksCardsGrid { + cards_grid { + layout + preamble + theme + title + cardConnection(limit: 10) { + edges { + node { + __typename + ...CardBlock + ...LoyaltyCardBlock + } + } + } + } +} + +fragment CardsGrid_LoyaltyPageRefs on LoyaltyPageBlocksCardsGrid { + cards_grid { + cardConnection(limit: 10) { + edges { + node { + __typename + ...CardBlockRef + ...LoyaltyCardBlockRef + } + } + } + } +} + +fragment CardsGrid_StartPage on StartPageBlocksCardsGrid { + cards_grid { + layout + preamble + theme + title + cardConnection(limit: 10) { + edges { + node { + __typename + ...CardBlock + ...TeaserCardBlock + ...InfoCardBlock + } + } + } + link { + cta_text + is_contentstack_link + open_in_new_tab + external_link { + href + title + } + linkConnection { + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + } + } +} + +fragment CardsGrid_StartPageRefs on StartPageBlocksCardsGrid { + cards_grid { + cardConnection(limit: 10) { + edges { + node { + __typename + ...CardBlockRef + ...TeaserCardBlockRef + ...InfoCardBlockRef + } + } + } + link { + linkConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + } +} diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/CardsGrid.graphql.ts b/packages/trpc/lib/graphql/Fragments/Blocks/CardsGrid.graphql.ts deleted file mode 100644 index eaed17ebc..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/CardsGrid.graphql.ts +++ /dev/null @@ -1,273 +0,0 @@ -import { gql } from "graphql-tag" - -import { AccountPageRef } from "../AccountPage/Ref.graphql" -import { CampaignOverviewPageRef } from "../CampaignOverviewPage/Ref.graphql" -import { CampaignPageRef } from "../CampaignPage/Ref.graphql" -import { CollectionPageRef } from "../CollectionPage/Ref.graphql" -import { ContentPageRef } from "../ContentPage/Ref.graphql" -import { DestinationCityPageRef } from "../DestinationCityPage/Ref.graphql" -import { DestinationCountryPageRef } from "../DestinationCountryPage/Ref.graphql" -import { DestinationOverviewPageRef } from "../DestinationOverviewPage/Ref.graphql" -import { HotelPageRef } from "../HotelPage/Ref.graphql" -import { LoyaltyPageRef } from "../LoyaltyPage/Ref.graphql" -import { AccountPageLink } from "../PageLink/AccountPageLink.graphql" -import { CampaignOverviewPageLink } from "../PageLink/CampaignOverviewPageLink.graphql" -import { CampaignPageLink } from "../PageLink/CampaignPageLink.graphql" -import { CollectionPageLink } from "../PageLink/CollectionPageLink.graphql" -import { ContentPageLink } from "../PageLink/ContentPageLink.graphql" -import { DestinationCityPageLink } from "../PageLink/DestinationCityPageLink.graphql" -import { DestinationCountryPageLink } from "../PageLink/DestinationCountryPageLink.graphql" -import { DestinationOverviewPageLink } from "../PageLink/DestinationOverviewPageLink.graphql" -import { HotelPageLink } from "../PageLink/HotelPageLink.graphql" -import { LoyaltyPageLink } from "../PageLink/LoyaltyPageLink.graphql" -import { PromoCampaignPageLink } from "../PageLink/PromoCampaignPageLink.graphql" -import { StartPageLink } from "../PageLink/StartPageLink.graphql" -import { PromoCampaignPageRef } from "../PromoCampaignPage/Ref.graphql" -import { CardBlockRef } from "./Refs/Card.graphql" -import { InfoCardBlockRef } from "./Refs/InfoCard.graphql" -import { LoyaltyCardBlockRef } from "./Refs/LoyaltyCard.graphql" -import { TeaserCardBlockRef } from "./Refs/TeaserCard.graphql" -import { CardBlock } from "./Card.graphql" -import { InfoCardBlock } from "./InfoCard.graphql" -import { LoyaltyCardBlock } from "./LoyaltyCard.graphql" -import { TeaserCardBlock } from "./TeaserCard.graphql" - -export const CardsGrid_ContentPage = gql` - fragment CardsGrid_ContentPage on ContentPageBlocksCardsGrid { - cards_grid { - layout - preamble - theme - title - cardConnection(limit: 10) { - edges { - node { - __typename - ...CardBlock - ...LoyaltyCardBlock - ...TeaserCardBlock - } - } - } - } - } - ${CardBlock} - ${LoyaltyCardBlock} - ${TeaserCardBlock} -` - -export const CardsGrid_ContentPageRefs = gql` - fragment CardsGrid_ContentPageRefs on ContentPageBlocksCardsGrid { - cards_grid { - cardConnection(limit: 10) { - edges { - node { - __typename - ...CardBlockRef - ...LoyaltyCardBlockRef - ...TeaserCardBlockRef - } - } - } - } - } - ${CardBlockRef} - ${LoyaltyCardBlockRef} - ${TeaserCardBlockRef} -` - -export const CardsGrid_CollectionPage = gql` - fragment CardsGrid_CollectionPage on CollectionPageBlocksCardsGrid { - cards_grid { - layout - preamble - theme - title - cardConnection(limit: 10) { - edges { - node { - __typename - ...CardBlock - ...TeaserCardBlock - } - } - } - } - } - ${CardBlock} - ${TeaserCardBlock} -` - -export const CardsGrid_CollectionPageRefs = gql` - fragment CardsGrid_CollectionPageRefs on CollectionPageBlocksCardsGrid { - cards_grid { - cardConnection(limit: 10) { - edges { - node { - __typename - ...CardBlockRef - ...TeaserCardBlockRef - } - } - } - } - } - ${CardBlockRef} - ${TeaserCardBlockRef} -` - -export const CardsGrid_LoyaltyPage = gql` - fragment CardsGrid_LoyaltyPage on LoyaltyPageBlocksCardsGrid { - cards_grid { - layout - preamble - theme - title - cardConnection(limit: 10) { - edges { - node { - __typename - ...CardBlock - ...LoyaltyCardBlock - } - } - } - } - } - ${CardBlock} - ${LoyaltyCardBlock} -` - -export const CardsGrid_LoyaltyPageRefs = gql` - fragment CardsGrid_LoyaltyPageRefs on LoyaltyPageBlocksCardsGrid { - cards_grid { - cardConnection(limit: 10) { - edges { - node { - __typename - ...CardBlockRef - ...LoyaltyCardBlockRef - } - } - } - } - } - ${CardBlockRef} - ${LoyaltyCardBlockRef} -` - -export const CardsGrid_StartPage = gql` - fragment CardsGrid_StartPage on StartPageBlocksCardsGrid { - cards_grid { - layout - preamble - theme - title - cardConnection(limit: 10) { - edges { - node { - __typename - ...CardBlock - ...TeaserCardBlock - ...InfoCardBlock - } - } - } - link { - cta_text - is_contentstack_link - open_in_new_tab - external_link { - href - title - } - linkConnection { - edges { - node { - __typename - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - } - } - } - ${CardBlock} - ${InfoCardBlock} - ${TeaserCardBlock} - ${AccountPageLink} - ${CampaignOverviewPageLink} - ${CampaignPageLink} - ${CollectionPageLink} - ${ContentPageLink} - ${DestinationCityPageLink} - ${DestinationCountryPageLink} - ${DestinationOverviewPageLink} - ${HotelPageLink} - ${LoyaltyPageLink} - ${StartPageLink} - ${PromoCampaignPageLink} -` - -export const CardsGrid_StartPageRefs = gql` - fragment CardsGrid_StartPageRefs on StartPageBlocksCardsGrid { - cards_grid { - cardConnection(limit: 10) { - edges { - node { - __typename - ...CardBlockRef - ...TeaserCardBlockRef - ...InfoCardBlockRef - } - } - } - link { - linkConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - } - } - ${CardBlockRef} - ${InfoCardBlockRef} - ${TeaserCardBlockRef} - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${ContentPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${CollectionPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${PromoCampaignPageRef} -` diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/CarouselCards.graphql b/packages/trpc/lib/graphql/Fragments/Blocks/CarouselCards.graphql new file mode 100644 index 000000000..55b468904 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/CarouselCards.graphql @@ -0,0 +1,171 @@ +#import "../System.graphql" +#import "./ContentCard.graphql" + +#import "../PageLink/AccountPageLink.graphql" +#import "../PageLink/CampaignOverviewPageLink.graphql" +#import "../PageLink/CampaignPageLink.graphql" +#import "../PageLink/CollectionPageLink.graphql" +#import "../PageLink/ContentPageLink.graphql" +#import "../PageLink/DestinationCityPageLink.graphql" +#import "../PageLink/DestinationCountryPageLink.graphql" +#import "../PageLink/DestinationOverviewPageLink.graphql" +#import "../PageLink/HotelPageLink.graphql" +#import "../PageLink/LoyaltyPageLink.graphql" +#import "../PageLink/StartPageLink.graphql" +#import "../PageLink/PromoCampaignPageLink.graphql" + +#import "../AccountPage/Ref.graphql" +#import "../CampaignOverviewPage/Ref.graphql" +#import "../CampaignPage/Ref.graphql" +#import "../ContentPage/Ref.graphql" +#import "../HotelPage/Ref.graphql" +#import "../LoyaltyPage/Ref.graphql" +#import "../CollectionPage/Ref.graphql" +#import "../DestinationCityPage/Ref.graphql" +#import "../DestinationCountryPage/Ref.graphql" +#import "../DestinationOverviewPage/Ref.graphql" +#import "../PromoCampaignPage/Ref.graphql" + +fragment CarouselCards_StartPage on StartPageBlocksCarouselCards { + carousel_cards { + heading + enable_filters + card_groups { + filter_label + filter_identifier + cardConnection { + edges { + node { + ...ContentCardBlock + } + } + } + } + link { + cta_text + is_contentstack_link + open_in_new_tab + external_link { + href + title + } + linkConnection { + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...PromoCampaignPageLink + } + } + } + } + } +} + +fragment CarouselCards_StartPageRefs on StartPageBlocksCarouselCards { + carousel_cards { + card_groups { + cardConnection { + edges { + node { + ...ContentCardBlockRef + } + } + } + } + link { + linkConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...PromoCampaignPageRef + } + } + } + } + } +} + +fragment CarouselCards_CampaignPage on CampaignPageBlocksCarouselCards { + carousel_cards { + heading + preamble + enable_filters + card_groups { + filter_label + filter_identifier + cardConnection { + edges { + node { + ...ContentCardBlock + } + } + } + } + } +} + +fragment CarouselCards_CampaignPageRefs on CampaignPageBlocksCarouselCards { + carousel_cards { + card_groups { + cardConnection { + edges { + node { + ...ContentCardBlockRef + } + } + } + } + } +} + +fragment CarouselCards_CampaignOverviewPage on CampaignOverviewPageBlocksCarouselCards { + carousel_cards { + heading + enable_filters + card_groups { + filter_label + filter_identifier + cardConnection { + edges { + node { + ...ContentCardBlock + } + } + } + } + } +} + +fragment CarouselCards_CampaignOverviewPageRefs on CampaignOverviewPageBlocksCarouselCards { + carousel_cards { + card_groups { + cardConnection { + edges { + node { + ...ContentCardBlockRef + } + } + } + } + } +} diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/CarouselCards.graphql.ts b/packages/trpc/lib/graphql/Fragments/Blocks/CarouselCards.graphql.ts deleted file mode 100644 index 5a6d02f95..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/CarouselCards.graphql.ts +++ /dev/null @@ -1,209 +0,0 @@ -import { gql } from "graphql-tag" - -import { AccountPageRef } from "../AccountPage/Ref.graphql" -import { CampaignOverviewPageRef } from "../CampaignOverviewPage/Ref.graphql" -import { CampaignPageRef } from "../CampaignPage/Ref.graphql" -import { CollectionPageRef } from "../CollectionPage/Ref.graphql" -import { ContentPageRef } from "../ContentPage/Ref.graphql" -import { DestinationCityPageRef } from "../DestinationCityPage/Ref.graphql" -import { DestinationCountryPageRef } from "../DestinationCountryPage/Ref.graphql" -import { DestinationOverviewPageRef } from "../DestinationOverviewPage/Ref.graphql" -import { HotelPageRef } from "../HotelPage/Ref.graphql" -import { LoyaltyPageRef } from "../LoyaltyPage/Ref.graphql" -import { AccountPageLink } from "../PageLink/AccountPageLink.graphql" -import { CampaignOverviewPageLink } from "../PageLink/CampaignOverviewPageLink.graphql" -import { CampaignPageLink } from "../PageLink/CampaignPageLink.graphql" -import { CollectionPageLink } from "../PageLink/CollectionPageLink.graphql" -import { ContentPageLink } from "../PageLink/ContentPageLink.graphql" -import { DestinationCityPageLink } from "../PageLink/DestinationCityPageLink.graphql" -import { DestinationCountryPageLink } from "../PageLink/DestinationCountryPageLink.graphql" -import { DestinationOverviewPageLink } from "../PageLink/DestinationOverviewPageLink.graphql" -import { HotelPageLink } from "../PageLink/HotelPageLink.graphql" -import { LoyaltyPageLink } from "../PageLink/LoyaltyPageLink.graphql" -import { PromoCampaignPageLink } from "../PageLink/PromoCampaignPageLink.graphql" -import { PromoCampaignPageRef } from "../PromoCampaignPage/Ref.graphql" -import { ContentCardBlock, ContentCardBlockRef } from "./ContentCard.graphql" - -export const CarouselCards_StartPage = gql` - fragment CarouselCards_StartPage on StartPageBlocksCarouselCards { - carousel_cards { - heading - enable_filters - card_groups { - filter_label - filter_identifier - cardConnection { - edges { - node { - ...ContentCardBlock - } - } - } - } - link { - cta_text - is_contentstack_link - open_in_new_tab - external_link { - href - title - } - linkConnection { - edges { - node { - __typename - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...PromoCampaignPageLink - } - } - } - } - } - } - ${ContentCardBlock} - ${AccountPageLink} - ${CampaignOverviewPageLink} - ${CampaignPageLink} - ${CollectionPageLink} - ${ContentPageLink} - ${DestinationCityPageLink} - ${DestinationCountryPageLink} - ${DestinationOverviewPageLink} - ${HotelPageLink} - ${LoyaltyPageLink} - ${PromoCampaignPageLink} -` - -export const CarouselCards_StartPageRefs = gql` - fragment CarouselCards_StartPageRefs on StartPageBlocksCarouselCards { - carousel_cards { - card_groups { - cardConnection { - edges { - node { - ...ContentCardBlockRef - } - } - } - } - link { - linkConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...PromoCampaignPageRef - } - } - } - } - } - } - ${ContentCardBlockRef} - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${ContentPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${CollectionPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${PromoCampaignPageRef} -` - -export const CarouselCards_CampaignPage = gql` - fragment CarouselCards_CampaignPage on CampaignPageBlocksCarouselCards { - carousel_cards { - heading - preamble - enable_filters - card_groups { - filter_label - filter_identifier - cardConnection { - edges { - node { - ...ContentCardBlock - } - } - } - } - } - } - ${ContentCardBlock} -` - -export const CarouselCards_CampaignPageRefs = gql` - fragment CarouselCards_CampaignPageRefs on CampaignPageBlocksCarouselCards { - carousel_cards { - card_groups { - cardConnection { - edges { - node { - ...ContentCardBlockRef - } - } - } - } - } - } - ${ContentCardBlockRef} -` - -export const CarouselCards_CampaignOverviewPage = gql` - fragment CarouselCards_CampaignOverviewPage on CampaignOverviewPageBlocksCarouselCards { - carousel_cards { - heading - enable_filters - card_groups { - filter_label - filter_identifier - cardConnection { - edges { - node { - ...ContentCardBlock - } - } - } - } - } - } - ${ContentCardBlock} -` - -export const CarouselCards_CampaignOverviewPageRefs = gql` - fragment CarouselCards_CampaignOverviewPageRefs on CampaignOverviewPageBlocksCarouselCards { - carousel_cards { - card_groups { - cardConnection { - edges { - node { - ...ContentCardBlockRef - } - } - } - } - } - } - ${ContentCardBlockRef} -` diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/Content.graphql b/packages/trpc/lib/graphql/Fragments/Blocks/Content.graphql new file mode 100644 index 000000000..5b3cbfbbe --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/Content.graphql @@ -0,0 +1,351 @@ +#import "../SysAsset.graphql" +#import "../ImageContainer.graphql" + +#import "../PageLink/AccountPageLink.graphql" +#import "../PageLink/CampaignOverviewPageLink.graphql" +#import "../PageLink/CampaignPageLink.graphql" +#import "../PageLink/CollectionPageLink.graphql" +#import "../PageLink/ContentPageLink.graphql" +#import "../PageLink/DestinationCityPageLink.graphql" +#import "../PageLink/DestinationCountryPageLink.graphql" +#import "../PageLink/DestinationOverviewPageLink.graphql" +#import "../PageLink/HotelPageLink.graphql" +#import "../PageLink/LoyaltyPageLink.graphql" +#import "../PageLink/StartPageLink.graphql" +#import "../PageLink/PromoCampaignPageLink.graphql" + +#import "../AccountPage/Ref.graphql" +#import "../CampaignOverviewPage/Ref.graphql" +#import "../CampaignPage/Ref.graphql" +#import "../CollectionPage/Ref.graphql" +#import "../ContentPage/Ref.graphql" +#import "../DestinationCityPage/Ref.graphql" +#import "../DestinationCountryPage/Ref.graphql" +#import "../DestinationOverviewPage/Ref.graphql" +#import "../HotelPage/Ref.graphql" +#import "../LoyaltyPage/Ref.graphql" +#import "../StartPage/Ref.graphql" +#import "../PromoCampaignPage/Ref.graphql" + +fragment Content_ContentPage on ContentPageBlocksContent { + content { + content { + embedded_itemsConnection { + edges { + node { + __typename + ...SysAsset + ...ImageContainer + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + json + } + } +} + +fragment Content_ContentPageRefs on ContentPageBlocksContent { + content { + content { + embedded_itemsConnection { + edges { + node { + __typename + ...ImageContainerRef + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + } +} + +fragment Content_LoyaltyPage on LoyaltyPageBlocksContent { + content { + content { + json + embedded_itemsConnection { + edges { + node { + __typename + ...SysAsset + ...ImageContainer + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + } + } +} + +fragment Content_LoyaltyPageRefs on LoyaltyPageBlocksContent { + content { + content { + embedded_itemsConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + } +} + +fragment Content_DestinationCityPage on DestinationCityPageBlocksContent { + content { + content { + embedded_itemsConnection { + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + json + } + } +} + +fragment Content_DestinationCityPageRefs on DestinationCityPageBlocksContent { + content { + content { + embedded_itemsConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + } +} + +fragment Content_DestinationCountryPage on DestinationCountryPageBlocksContent { + content { + content { + embedded_itemsConnection { + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + json + } + } +} + +fragment Content_DestinationCountryPageRefs on DestinationCountryPageBlocksContent { + content { + content { + embedded_itemsConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + } +} + +fragment Content_DestinationFilterBlocks on DestinationFilterBlocksContent { + content { + content { + embedded_itemsConnection { + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + json + } + } +} + +fragment Content_DestinationFilterBlocksRefs on DestinationFilterBlocksContent { + content { + content { + embedded_itemsConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + } +} + +fragment Content_PromoCampaignPage on PromoCampaignPageBlocksContent { + content { + content { + embedded_itemsConnection { + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + json + } + } +} + +fragment Content_PromoCampaignPageRefs on PromoCampaignPageBlocksContent { + content { + content { + embedded_itemsConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + } +} diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/Content.graphql.ts b/packages/trpc/lib/graphql/Fragments/Blocks/Content.graphql.ts deleted file mode 100644 index f6be9694d..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/Content.graphql.ts +++ /dev/null @@ -1,524 +0,0 @@ -import { gql } from "graphql-tag" - -import { AccountPageRef } from "../AccountPage/Ref.graphql" -import { CampaignOverviewPageRef } from "../CampaignOverviewPage/Ref.graphql" -import { CampaignPageRef } from "../CampaignPage/Ref.graphql" -import { CollectionPageRef } from "../CollectionPage/Ref.graphql" -import { ContentPageRef } from "../ContentPage/Ref.graphql" -import { DestinationCityPageRef } from "../DestinationCityPage/Ref.graphql" -import { DestinationCountryPageRef } from "../DestinationCountryPage/Ref.graphql" -import { DestinationOverviewPageRef } from "../DestinationOverviewPage/Ref.graphql" -import { HotelPageRef } from "../HotelPage/Ref.graphql" -import { ImageContainer, ImageContainerRef } from "../ImageContainer.graphql" -import { LoyaltyPageRef } from "../LoyaltyPage/Ref.graphql" -import { AccountPageLink } from "../PageLink/AccountPageLink.graphql" -import { CampaignOverviewPageLink } from "../PageLink/CampaignOverviewPageLink.graphql" -import { CampaignPageLink } from "../PageLink/CampaignPageLink.graphql" -import { CollectionPageLink } from "../PageLink/CollectionPageLink.graphql" -import { ContentPageLink } from "../PageLink/ContentPageLink.graphql" -import { DestinationCityPageLink } from "../PageLink/DestinationCityPageLink.graphql" -import { DestinationCountryPageLink } from "../PageLink/DestinationCountryPageLink.graphql" -import { DestinationOverviewPageLink } from "../PageLink/DestinationOverviewPageLink.graphql" -import { HotelPageLink } from "../PageLink/HotelPageLink.graphql" -import { LoyaltyPageLink } from "../PageLink/LoyaltyPageLink.graphql" -import { PromoCampaignPageLink } from "../PageLink/PromoCampaignPageLink.graphql" -import { StartPageLink } from "../PageLink/StartPageLink.graphql" -import { PromoCampaignPageRef } from "../PromoCampaignPage/Ref.graphql" -import { StartPageRef } from "../StartPage/Ref.graphql" -import { SysAsset } from "../SysAsset.graphql" - -export const Content_ContentPage = gql` - fragment Content_ContentPage on ContentPageBlocksContent { - content { - content { - embedded_itemsConnection { - edges { - node { - __typename - ...SysAsset - ...ImageContainer - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - json - } - } - } - ${SysAsset} - ${ImageContainer} - ${AccountPageLink} - ${CampaignOverviewPageLink} - ${CampaignPageLink} - ${CollectionPageLink} - ${ContentPageLink} - ${DestinationCityPageLink} - ${DestinationCountryPageLink} - ${DestinationOverviewPageLink} - ${HotelPageLink} - ${LoyaltyPageLink} - ${StartPageLink} - ${PromoCampaignPageLink} -` - -export const Content_ContentPageRefs = gql` - fragment Content_ContentPageRefs on ContentPageBlocksContent { - content { - content { - embedded_itemsConnection { - edges { - node { - __typename - ...ImageContainerRef - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - } - } - ${ImageContainerRef} - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${CollectionPageRef} - ${ContentPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${StartPageRef} - ${PromoCampaignPageRef} -` - -export const Content_LoyaltyPage = gql` - fragment Content_LoyaltyPage on LoyaltyPageBlocksContent { - content { - content { - json - embedded_itemsConnection { - edges { - node { - __typename - ...SysAsset - ...ImageContainer - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - } - } - } - ${SysAsset} - ${ImageContainer} - ${AccountPageLink} - ${CampaignOverviewPageLink} - ${CampaignPageLink} - ${CollectionPageLink} - ${ContentPageLink} - ${DestinationCityPageLink} - ${DestinationCountryPageLink} - ${DestinationOverviewPageLink} - ${HotelPageLink} - ${LoyaltyPageLink} - ${StartPageLink} - ${PromoCampaignPageLink} -` - -export const Content_LoyaltyPageRefs = gql` - fragment Content_LoyaltyPageRefs on LoyaltyPageBlocksContent { - content { - content { - embedded_itemsConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - } - } - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${CollectionPageRef} - ${ContentPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${StartPageRef} - ${PromoCampaignPageRef} -` - -export const Content_DestinationCityPage = gql` - fragment Content_DestinationCityPage on DestinationCityPageBlocksContent { - content { - content { - embedded_itemsConnection { - edges { - node { - __typename - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - json - } - } - } - ${AccountPageLink} - ${CampaignOverviewPageLink} - ${CampaignPageLink} - ${CollectionPageLink} - ${ContentPageLink} - ${DestinationCityPageLink} - ${DestinationCountryPageLink} - ${DestinationOverviewPageLink} - ${HotelPageLink} - ${LoyaltyPageLink} - ${StartPageLink} - ${PromoCampaignPageLink} -` - -export const Content_DestinationCityPageRefs = gql` - fragment Content_DestinationCityPageRefs on DestinationCityPageBlocksContent { - content { - content { - embedded_itemsConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - } - } - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${CollectionPageRef} - ${ContentPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${StartPageRef} - ${PromoCampaignPageRef} -` - -export const Content_DestinationCountryPage = gql` - fragment Content_DestinationCountryPage on DestinationCountryPageBlocksContent { - content { - content { - embedded_itemsConnection { - edges { - node { - __typename - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - json - } - } - } - ${AccountPageLink} - ${CampaignOverviewPageLink} - ${CampaignPageLink} - ${CollectionPageLink} - ${ContentPageLink} - ${DestinationCityPageLink} - ${DestinationCountryPageLink} - ${DestinationOverviewPageLink} - ${HotelPageLink} - ${LoyaltyPageLink} - ${StartPageLink} - ${PromoCampaignPageLink} -` - -export const Content_DestinationCountryPageRefs = gql` - fragment Content_DestinationCountryPageRefs on DestinationCountryPageBlocksContent { - content { - content { - embedded_itemsConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - } - } - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${CollectionPageRef} - ${ContentPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${StartPageRef} - ${PromoCampaignPageRef} -` - -export const Content_DestinationFilterBlocks = gql` - fragment Content_DestinationFilterBlocks on DestinationFilterBlocksContent { - content { - content { - embedded_itemsConnection { - edges { - node { - __typename - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - json - } - } - } - ${AccountPageLink} - ${CampaignOverviewPageLink} - ${CampaignPageLink} - ${CollectionPageLink} - ${ContentPageLink} - ${DestinationCityPageLink} - ${DestinationCountryPageLink} - ${DestinationOverviewPageLink} - ${HotelPageLink} - ${LoyaltyPageLink} - ${StartPageLink} - ${PromoCampaignPageLink} -` - -export const Content_DestinationFilterBlocksRefs = gql` - fragment Content_DestinationFilterBlocksRefs on DestinationFilterBlocksContent { - content { - content { - embedded_itemsConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - } - } - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${CollectionPageRef} - ${ContentPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${StartPageRef} - ${PromoCampaignPageRef} -` - -export const Content_PromoCampaignPage = gql` - fragment Content_PromoCampaignPage on PromoCampaignPageBlocksContent { - content { - content { - embedded_itemsConnection { - edges { - node { - __typename - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - json - } - } - } - ${AccountPageLink} - ${CampaignOverviewPageLink} - ${CampaignPageLink} - ${CollectionPageLink} - ${ContentPageLink} - ${DestinationCityPageLink} - ${DestinationCountryPageLink} - ${DestinationOverviewPageLink} - ${HotelPageLink} - ${LoyaltyPageLink} - ${StartPageLink} - ${PromoCampaignPageLink} -` - -export const Content_PromoCampaignPageRefs = gql` - fragment Content_PromoCampaignPageRefs on PromoCampaignPageBlocksContent { - content { - content { - embedded_itemsConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - } - } - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${CollectionPageRef} - ${ContentPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${StartPageRef} - ${PromoCampaignPageRef} -` diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/ContentCard.graphql b/packages/trpc/lib/graphql/Fragments/Blocks/ContentCard.graphql new file mode 100644 index 000000000..788af8069 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/ContentCard.graphql @@ -0,0 +1,95 @@ +#import "../System.graphql" + +#import "../PageLink/AccountPageLink.graphql" +#import "../PageLink/CampaignOverviewPageLink.graphql" +#import "../PageLink/CampaignPageLink.graphql" +#import "../PageLink/CollectionPageLink.graphql" +#import "../PageLink/ContentPageLink.graphql" +#import "../PageLink/DestinationCityPageLink.graphql" +#import "../PageLink/DestinationCountryPageLink.graphql" +#import "../PageLink/DestinationOverviewPageLink.graphql" +#import "../PageLink/HotelPageLink.graphql" +#import "../PageLink/LoyaltyPageLink.graphql" +#import "../PageLink/StartPageLink.graphql" +#import "../PageLink/PromoCampaignPageLink.graphql" + +#import "../AccountPage/Ref.graphql" +#import "../CampaignOverviewPage/Ref.graphql" +#import "../CampaignPage/Ref.graphql" +#import "../ContentPage/Ref.graphql" +#import "../HotelPage/Ref.graphql" +#import "../LoyaltyPage/Ref.graphql" +#import "../CollectionPage/Ref.graphql" +#import "../DestinationCityPage/Ref.graphql" +#import "../DestinationCountryPage/Ref.graphql" +#import "../DestinationOverviewPage/Ref.graphql" +#import "../StartPage/Ref.graphql" +#import "../PromoCampaignPage/Ref.graphql" + +fragment ContentCardBlock on ContentCard { + __typename + title + heading + image + body_text + has_card_link + promo_text + card_link { + is_contentstack_link + open_in_new_tab + external_link { + href + title + } + linkConnection { + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + } + system { + ...System + } +} + +fragment ContentCardBlockRef on ContentCard { + __typename + card_link { + linkConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + system { + ...System + } +} diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/ContentCard.graphql.ts b/packages/trpc/lib/graphql/Fragments/Blocks/ContentCard.graphql.ts deleted file mode 100644 index 68982aefa..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/ContentCard.graphql.ts +++ /dev/null @@ -1,125 +0,0 @@ -import { gql } from "graphql-tag" - -import { AccountPageRef } from "../AccountPage/Ref.graphql" -import { CampaignOverviewPageRef } from "../CampaignOverviewPage/Ref.graphql" -import { CampaignPageRef } from "../CampaignPage/Ref.graphql" -import { CollectionPageRef } from "../CollectionPage/Ref.graphql" -import { ContentPageRef } from "../ContentPage/Ref.graphql" -import { DestinationCityPageRef } from "../DestinationCityPage/Ref.graphql" -import { DestinationCountryPageRef } from "../DestinationCountryPage/Ref.graphql" -import { DestinationOverviewPageRef } from "../DestinationOverviewPage/Ref.graphql" -import { HotelPageRef } from "../HotelPage/Ref.graphql" -import { LoyaltyPageRef } from "../LoyaltyPage/Ref.graphql" -import { AccountPageLink } from "../PageLink/AccountPageLink.graphql" -import { CampaignOverviewPageLink } from "../PageLink/CampaignOverviewPageLink.graphql" -import { CampaignPageLink } from "../PageLink/CampaignPageLink.graphql" -import { CollectionPageLink } from "../PageLink/CollectionPageLink.graphql" -import { ContentPageLink } from "../PageLink/ContentPageLink.graphql" -import { DestinationCityPageLink } from "../PageLink/DestinationCityPageLink.graphql" -import { DestinationCountryPageLink } from "../PageLink/DestinationCountryPageLink.graphql" -import { DestinationOverviewPageLink } from "../PageLink/DestinationOverviewPageLink.graphql" -import { HotelPageLink } from "../PageLink/HotelPageLink.graphql" -import { LoyaltyPageLink } from "../PageLink/LoyaltyPageLink.graphql" -import { PromoCampaignPageLink } from "../PageLink/PromoCampaignPageLink.graphql" -import { StartPageLink } from "../PageLink/StartPageLink.graphql" -import { PromoCampaignPageRef } from "../PromoCampaignPage/Ref.graphql" -import { StartPageRef } from "../StartPage/Ref.graphql" -import { System } from "../System.graphql" - -export const ContentCardBlock = gql` - fragment ContentCardBlock on ContentCard { - __typename - title - heading - image - body_text - has_card_link - promo_text - card_link { - is_contentstack_link - open_in_new_tab - external_link { - href - title - } - linkConnection { - edges { - node { - __typename - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - } - system { - ...System - } - } - ${System} - ${AccountPageLink} - ${CampaignOverviewPageLink} - ${CampaignPageLink} - ${CollectionPageLink} - ${ContentPageLink} - ${DestinationCityPageLink} - ${DestinationCountryPageLink} - ${DestinationOverviewPageLink} - ${HotelPageLink} - ${LoyaltyPageLink} - ${StartPageLink} - ${PromoCampaignPageLink} -` - -export const ContentCardBlockRef = gql` - fragment ContentCardBlockRef on ContentCard { - __typename - card_link { - linkConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - system { - ...System - } - } - ${System} - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${ContentPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${CollectionPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${StartPageRef} - ${PromoCampaignPageRef} -` diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/DynamicContent.graphql b/packages/trpc/lib/graphql/Fragments/Blocks/DynamicContent.graphql new file mode 100644 index 000000000..3774f58c0 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/DynamicContent.graphql @@ -0,0 +1,249 @@ +#import "../PageLink/AccountPageLink.graphql" +#import "../PageLink/CampaignOverviewPageLink.graphql" +#import "../PageLink/CampaignPageLink.graphql" +#import "../PageLink/CollectionPageLink.graphql" +#import "../PageLink/ContentPageLink.graphql" +#import "../PageLink/DestinationCityPageLink.graphql" +#import "../PageLink/DestinationCountryPageLink.graphql" +#import "../PageLink/DestinationOverviewPageLink.graphql" +#import "../PageLink/HotelPageLink.graphql" +#import "../PageLink/LoyaltyPageLink.graphql" +#import "../PageLink/StartPageLink.graphql" +#import "../PageLink/PromoCampaignPageLink.graphql" + +#import "../AccountPage/Ref.graphql" +#import "../CampaignOverviewPage/Ref.graphql" +#import "../CampaignPage/Ref.graphql" +#import "../CollectionPage/Ref.graphql" +#import "../ContentPage/Ref.graphql" +#import "../DestinationCityPage/Ref.graphql" +#import "../DestinationCountryPage/Ref.graphql" +#import "../DestinationOverviewPage/Ref.graphql" +#import "../HotelPage/Ref.graphql" +#import "../LoyaltyPage/Ref.graphql" +#import "../StartPage/Ref.graphql" +#import "../PromoCampaignPage/Ref.graphql" + +fragment DynamicContent_AccountPage on AccountPageContentDynamicContent { + dynamic_content { + component + subtitle: preamble + title + link { + text: link_text + linkConnection { + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + } + } +} + +fragment DynamicContent_AccountPageRefs on AccountPageContentDynamicContent { + dynamic_content { + link { + linkConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + } +} + +fragment DynamicContent_CollectionPage on CollectionPageBlocksDynamicContent { + dynamic_content { + component + subtitle + title + link { + text + linkConnection: pageConnection { + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + } + } +} + +fragment DynamicContent_CollectionPageRefs on CollectionPageBlocksDynamicContent { + dynamic_content { + link { + linkConnection: pageConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + } +} + +fragment DynamicContent_ContentPage on ContentPageBlocksDynamicContent { + dynamic_content { + component + subtitle + title + link { + text + linkConnection: pageConnection { + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + } + } +} + +fragment DynamicContent_ContentPageRefs on ContentPageBlocksDynamicContent { + dynamic_content { + link { + linkConnection: pageConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + } +} + +fragment DynamicContent_LoyaltyPage on LoyaltyPageBlocksDynamicContent { + dynamic_content { + component + subtitle + title + link { + text + linkConnection: pageConnection { + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + } + } +} + +fragment DynamicContent_LoyaltyPageRefs on LoyaltyPageBlocksDynamicContent { + dynamic_content { + link { + linkConnection: pageConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + } +} diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/DynamicContent.graphql.ts b/packages/trpc/lib/graphql/Fragments/Blocks/DynamicContent.graphql.ts deleted file mode 100644 index f7bb40a24..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/DynamicContent.graphql.ts +++ /dev/null @@ -1,362 +0,0 @@ -import { gql } from "graphql-tag" - -import { AccountPageRef } from "../AccountPage/Ref.graphql" -import { CampaignOverviewPageRef } from "../CampaignOverviewPage/Ref.graphql" -import { CampaignPageRef } from "../CampaignPage/Ref.graphql" -import { CollectionPageRef } from "../CollectionPage/Ref.graphql" -import { ContentPageRef } from "../ContentPage/Ref.graphql" -import { DestinationCityPageRef } from "../DestinationCityPage/Ref.graphql" -import { DestinationCountryPageRef } from "../DestinationCountryPage/Ref.graphql" -import { DestinationOverviewPageRef } from "../DestinationOverviewPage/Ref.graphql" -import { HotelPageRef } from "../HotelPage/Ref.graphql" -import { LoyaltyPageRef } from "../LoyaltyPage/Ref.graphql" -import { AccountPageLink } from "../PageLink/AccountPageLink.graphql" -import { CampaignOverviewPageLink } from "../PageLink/CampaignOverviewPageLink.graphql" -import { CampaignPageLink } from "../PageLink/CampaignPageLink.graphql" -import { CollectionPageLink } from "../PageLink/CollectionPageLink.graphql" -import { ContentPageLink } from "../PageLink/ContentPageLink.graphql" -import { DestinationCityPageLink } from "../PageLink/DestinationCityPageLink.graphql" -import { DestinationCountryPageLink } from "../PageLink/DestinationCountryPageLink.graphql" -import { DestinationOverviewPageLink } from "../PageLink/DestinationOverviewPageLink.graphql" -import { HotelPageLink } from "../PageLink/HotelPageLink.graphql" -import { LoyaltyPageLink } from "../PageLink/LoyaltyPageLink.graphql" -import { PromoCampaignPageLink } from "../PageLink/PromoCampaignPageLink.graphql" -import { StartPageLink } from "../PageLink/StartPageLink.graphql" -import { PromoCampaignPageRef } from "../PromoCampaignPage/Ref.graphql" -import { StartPageRef } from "../StartPage/Ref.graphql" - -export const DynamicContent_AccountPage = gql` - fragment DynamicContent_AccountPage on AccountPageContentDynamicContent { - dynamic_content { - component - subtitle: preamble - title - link { - text: link_text - 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 DynamicContent_AccountPageRefs = gql` - fragment DynamicContent_AccountPageRefs on AccountPageContentDynamicContent { - dynamic_content { - link { - linkConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - } - } - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${CollectionPageRef} - ${ContentPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${StartPageRef} - ${PromoCampaignPageRef} -` - -export const DynamicContent_CollectionPage = gql` - fragment DynamicContent_CollectionPage on CollectionPageBlocksDynamicContent { - dynamic_content { - component - subtitle - title - link { - text - linkConnection: pageConnection { - 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 DynamicContent_CollectionPageRefs = gql` - fragment DynamicContent_CollectionPageRefs on CollectionPageBlocksDynamicContent { - dynamic_content { - link { - linkConnection: pageConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - } - } - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${CollectionPageRef} - ${ContentPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${StartPageRef} - ${PromoCampaignPageRef} -` - -export const DynamicContent_ContentPage = gql` - fragment DynamicContent_ContentPage on ContentPageBlocksDynamicContent { - dynamic_content { - component - subtitle - title - link { - text - linkConnection: pageConnection { - 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 DynamicContent_ContentPageRefs = gql` - fragment DynamicContent_ContentPageRefs on ContentPageBlocksDynamicContent { - dynamic_content { - link { - linkConnection: pageConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - } - } - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${CollectionPageRef} - ${ContentPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${StartPageRef} - ${PromoCampaignPageRef} -` - -export const DynamicContent_LoyaltyPage = gql` - fragment DynamicContent_LoyaltyPage on LoyaltyPageBlocksDynamicContent { - dynamic_content { - component - subtitle - title - link { - text - linkConnection: pageConnection { - 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 DynamicContent_LoyaltyPageRefs = gql` - fragment DynamicContent_LoyaltyPageRefs on LoyaltyPageBlocksDynamicContent { - dynamic_content { - link { - linkConnection: pageConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - } - } - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${CollectionPageRef} - ${ContentPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${StartPageRef} - ${PromoCampaignPageRef} -` diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/Essentials.graphql.ts b/packages/trpc/lib/graphql/Fragments/Blocks/Essentials.graphql similarity index 69% rename from packages/trpc/lib/graphql/Fragments/Blocks/Essentials.graphql.ts rename to packages/trpc/lib/graphql/Fragments/Blocks/Essentials.graphql index 9f014eaa4..9803aa4f7 100644 --- a/packages/trpc/lib/graphql/Fragments/Blocks/Essentials.graphql.ts +++ b/packages/trpc/lib/graphql/Fragments/Blocks/Essentials.graphql @@ -1,6 +1,3 @@ -import { gql } from "graphql-tag" - -export const Essentials_CampaignPage = gql` fragment Essentials_CampaignPage on CampaignPageBlocksEssentials { essentials { title @@ -12,4 +9,3 @@ fragment Essentials_CampaignPage on CampaignPageBlocksEssentials { } } } -` diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/FullWidthCampaign.graphql b/packages/trpc/lib/graphql/Fragments/Blocks/FullWidthCampaign.graphql new file mode 100644 index 000000000..d03a25efa --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/FullWidthCampaign.graphql @@ -0,0 +1,135 @@ +#import "../PageLink/AccountPageLink.graphql" +#import "../PageLink/CampaignOverviewPageLink.graphql" +#import "../PageLink/CampaignPageLink.graphql" +#import "../PageLink/ContentPageLink.graphql" +#import "../PageLink/LoyaltyPageLink.graphql" +#import "../PageLink/HotelPageLink.graphql" +#import "../PageLink/CollectionPageLink.graphql" +#import "../PageLink/DestinationCityPageLink.graphql" +#import "../PageLink/DestinationCountryPageLink.graphql" +#import "../PageLink/DestinationOverviewPageLink.graphql" +#import "../PageLink/PromoCampaignPageLink.graphql" + +#import "../AccountPage/Ref.graphql" +#import "../CampaignOverviewPage/Ref.graphql" +#import "../CampaignPage/Ref.graphql" +#import "../ContentPage/Ref.graphql" +#import "../HotelPage/Ref.graphql" +#import "../LoyaltyPage/Ref.graphql" +#import "../CollectionPage/Ref.graphql" +#import "../DestinationCityPage/Ref.graphql" +#import "../DestinationCountryPage/Ref.graphql" +#import "../DestinationOverviewPage/Ref.graphql" +#import "../PromoCampaignPage/Ref.graphql" + +fragment FullWidthCampaign on FullWidthCampaign { + background_image + scripted_top_title + heading + body_text + has_primary_button + primary_button { + cta_text + open_in_new_tab + is_contentstack_link + external_link { + href + title + } + linkConnection { + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...PromoCampaignPageLink + } + } + } + } + has_secondary_button + secondary_button { + cta_text + open_in_new_tab + is_contentstack_link + external_link { + href + title + } + linkConnection { + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...PromoCampaignPageLink + } + } + } + } + system { + ...System + } +} + +fragment FullWidthCampaignRefs on FullWidthCampaign { + primary_button { + linkConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...PromoCampaignPageRef + } + } + } + } + secondary_button { + linkConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...PromoCampaignPageRef + } + } + } + } + system { + ...System + } +} diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/FullWidthCampaign.graphql.ts b/packages/trpc/lib/graphql/Fragments/Blocks/FullWidthCampaign.graphql.ts deleted file mode 100644 index 57a0368dd..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/FullWidthCampaign.graphql.ts +++ /dev/null @@ -1,162 +0,0 @@ -import { gql } from "graphql-tag" - -import { AccountPageRef } from "../AccountPage/Ref.graphql" -import { CampaignOverviewPageRef } from "../CampaignOverviewPage/Ref.graphql" -import { CampaignPageRef } from "../CampaignPage/Ref.graphql" -import { CollectionPageRef } from "../CollectionPage/Ref.graphql" -import { ContentPageRef } from "../ContentPage/Ref.graphql" -import { DestinationCityPageRef } from "../DestinationCityPage/Ref.graphql" -import { DestinationCountryPageRef } from "../DestinationCountryPage/Ref.graphql" -import { DestinationOverviewPageRef } from "../DestinationOverviewPage/Ref.graphql" -import { HotelPageRef } from "../HotelPage/Ref.graphql" -import { LoyaltyPageRef } from "../LoyaltyPage/Ref.graphql" -import { AccountPageLink } from "../PageLink/AccountPageLink.graphql" -import { CampaignOverviewPageLink } from "../PageLink/CampaignOverviewPageLink.graphql" -import { CampaignPageLink } from "../PageLink/CampaignPageLink.graphql" -import { CollectionPageLink } from "../PageLink/CollectionPageLink.graphql" -import { ContentPageLink } from "../PageLink/ContentPageLink.graphql" -import { DestinationCityPageLink } from "../PageLink/DestinationCityPageLink.graphql" -import { DestinationCountryPageLink } from "../PageLink/DestinationCountryPageLink.graphql" -import { DestinationOverviewPageLink } from "../PageLink/DestinationOverviewPageLink.graphql" -import { HotelPageLink } from "../PageLink/HotelPageLink.graphql" -import { LoyaltyPageLink } from "../PageLink/LoyaltyPageLink.graphql" -import { PromoCampaignPageLink } from "../PageLink/PromoCampaignPageLink.graphql" -import { PromoCampaignPageRef } from "../PromoCampaignPage/Ref.graphql" - -export const FullWidthCampaign = gql` - fragment FullWidthCampaign on FullWidthCampaign { - background_image - scripted_top_title - heading - body_text - has_primary_button - primary_button { - cta_text - open_in_new_tab - is_contentstack_link - external_link { - href - title - } - linkConnection { - edges { - node { - __typename - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...PromoCampaignPageLink - } - } - } - } - has_secondary_button - secondary_button { - cta_text - open_in_new_tab - is_contentstack_link - external_link { - href - title - } - linkConnection { - edges { - node { - __typename - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...PromoCampaignPageLink - } - } - } - } - system { - ...System - } - } - ${AccountPageLink} - ${CampaignOverviewPageLink} - ${CampaignPageLink} - ${ContentPageLink} - ${LoyaltyPageLink} - ${HotelPageLink} - ${CollectionPageLink} - ${DestinationCityPageLink} - ${DestinationCountryPageLink} - ${DestinationOverviewPageLink} - ${PromoCampaignPageLink} -` - -export const FullWidthCampaignRefs = gql` - fragment FullWidthCampaignRefs on FullWidthCampaign { - primary_button { - linkConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...PromoCampaignPageRef - } - } - } - } - secondary_button { - linkConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...PromoCampaignPageRef - } - } - } - } - system { - ...System - } - } - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${ContentPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${CollectionPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${PromoCampaignPageRef} -` diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/HotelListing.graphql b/packages/trpc/lib/graphql/Fragments/Blocks/HotelListing.graphql new file mode 100644 index 000000000..5b3033c41 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/HotelListing.graphql @@ -0,0 +1,46 @@ +fragment HotelListing on HotelListing { + heading + location_filter { + city_denmark + city_finland + city_germany + city_norway + city_poland + city_sweden + country + excluded + } + manual_filter { + hotels + } + content_type +} + +fragment HotelListing_ContentPage on ContentPageBlocksHotelListing { + __typename + hotel_listing { + ...HotelListing + } +} + +fragment HotelListing_CampaignPage on CampaignPageBlocksHotelListing { + hotel_listing { + heading + } +} + +fragment HotelListing_CampaignOverviewPage on CampaignOverviewPageBlocksHotelListing { + hotel_listing { + heading + preamble + included_hotelsConnection { + edges { + node { + ... on HotelPage { + hotel_page_id + } + } + } + } + } +} diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/HotelListing.graphql.ts b/packages/trpc/lib/graphql/Fragments/Blocks/HotelListing.graphql.ts deleted file mode 100644 index 010b56f84..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/HotelListing.graphql.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { gql } from "graphql-tag" - -export const HotelListing = gql` - fragment HotelListing on HotelListing { - heading - location_filter { - city_denmark - city_finland - city_germany - city_norway - city_poland - city_sweden - country - excluded - } - manual_filter { - hotels - } - content_type - } -` - -export const HotelListing_ContentPage = gql` - fragment HotelListing_ContentPage on ContentPageBlocksHotelListing { - __typename - hotel_listing { - ...HotelListing - } - } - ${HotelListing} -` - -export const HotelListing_CampaignPage = gql` - fragment HotelListing_CampaignPage on CampaignPageBlocksHotelListing { - hotel_listing { - heading - } - } -` - -export const HotelListing_CampaignOverviewPage = gql` - fragment HotelListing_CampaignOverviewPage on CampaignOverviewPageBlocksHotelListing { - hotel_listing { - heading - preamble - included_hotelsConnection { - edges { - node { - ... on HotelPage { - hotel_page_id - } - } - } - } - } - } -` diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/InfoCard.graphql b/packages/trpc/lib/graphql/Fragments/Blocks/InfoCard.graphql new file mode 100644 index 000000000..59447c074 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/InfoCard.graphql @@ -0,0 +1,83 @@ +#import "../System.graphql" + +#import "../PageLink/AccountPageLink.graphql" +#import "../PageLink/CampaignOverviewPageLink.graphql" +#import "../PageLink/CampaignPageLink.graphql" +#import "../PageLink/CollectionPageLink.graphql" +#import "../PageLink/ContentPageLink.graphql" +#import "../PageLink/DestinationCityPageLink.graphql" +#import "../PageLink/DestinationCountryPageLink.graphql" +#import "../PageLink/DestinationOverviewPageLink.graphql" +#import "../PageLink/HotelPageLink.graphql" +#import "../PageLink/LoyaltyPageLink.graphql" +#import "../PageLink/StartPageLink.graphql" +#import "../PageLink/PromoCampaignPageLink.graphql" + +fragment InfoCardBlock on InfoCard { + scripted_top_title + heading + body_text + image + title + theme + + primary_button { + is_contentstack_link + cta_text + open_in_new_tab + external_link { + title + href + } + linkConnection { + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + } + secondary_button { + is_contentstack_link + cta_text + open_in_new_tab + external_link { + title + href + } + linkConnection { + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + } + system { + ...System + } +} diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/InfoCard.graphql.ts b/packages/trpc/lib/graphql/Fragments/Blocks/InfoCard.graphql.ts deleted file mode 100644 index 62018acf4..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/InfoCard.graphql.ts +++ /dev/null @@ -1,98 +0,0 @@ -import { gql } from "graphql-tag" - -import { AccountPageLink } from "../PageLink/AccountPageLink.graphql" -import { CampaignOverviewPageLink } from "../PageLink/CampaignOverviewPageLink.graphql" -import { CampaignPageLink } from "../PageLink/CampaignPageLink.graphql" -import { CollectionPageLink } from "../PageLink/CollectionPageLink.graphql" -import { ContentPageLink } from "../PageLink/ContentPageLink.graphql" -import { DestinationCityPageLink } from "../PageLink/DestinationCityPageLink.graphql" -import { DestinationCountryPageLink } from "../PageLink/DestinationCountryPageLink.graphql" -import { DestinationOverviewPageLink } from "../PageLink/DestinationOverviewPageLink.graphql" -import { HotelPageLink } from "../PageLink/HotelPageLink.graphql" -import { LoyaltyPageLink } from "../PageLink/LoyaltyPageLink.graphql" -import { PromoCampaignPageLink } from "../PageLink/PromoCampaignPageLink.graphql" -import { StartPageLink } from "../PageLink/StartPageLink.graphql" -import { System } from "../System.graphql" - -export const InfoCardBlock = gql` - fragment InfoCardBlock on InfoCard { - scripted_top_title - heading - body_text - image - title - theme - primary_button { - is_contentstack_link - cta_text - open_in_new_tab - external_link { - title - href - } - linkConnection { - edges { - node { - __typename - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - } - secondary_button { - is_contentstack_link - cta_text - open_in_new_tab - external_link { - title - href - } - linkConnection { - edges { - node { - __typename - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - } - system { - ...System - } - } - ${System} - ${AccountPageLink} - ${CampaignOverviewPageLink} - ${CampaignPageLink} - ${CollectionPageLink} - ${ContentPageLink} - ${DestinationCityPageLink} - ${DestinationCountryPageLink} - ${DestinationOverviewPageLink} - ${HotelPageLink} - ${LoyaltyPageLink} - ${StartPageLink} - ${PromoCampaignPageLink} -` diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/JoinScandicFriends.graphql b/packages/trpc/lib/graphql/Fragments/Blocks/JoinScandicFriends.graphql new file mode 100644 index 000000000..117a87b1e --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/JoinScandicFriends.graphql @@ -0,0 +1,89 @@ +#import "../PageLink/AccountPageLink.graphql" +#import "../PageLink/CampaignOverviewPageLink.graphql" +#import "../PageLink/CampaignPageLink.graphql" +#import "../PageLink/CollectionPageLink.graphql" +#import "../PageLink/ContentPageLink.graphql" +#import "../PageLink/DestinationCityPageLink.graphql" +#import "../PageLink/DestinationCountryPageLink.graphql" +#import "../PageLink/DestinationOverviewPageLink.graphql" +#import "../PageLink/HotelPageLink.graphql" +#import "../PageLink/LoyaltyPageLink.graphql" +#import "../PageLink/PromoCampaignPageLink.graphql" + +#import "../AccountPage/Ref.graphql" +#import "../CampaignOverviewPage/Ref.graphql" +#import "../CampaignPage/Ref.graphql" +#import "../CollectionPage/Ref.graphql" +#import "../ContentPage/Ref.graphql" +#import "../DestinationCityPage/Ref.graphql" +#import "../DestinationCountryPage/Ref.graphql" +#import "../DestinationOverviewPage/Ref.graphql" +#import "../HotelPage/Ref.graphql" +#import "../LoyaltyPage/Ref.graphql" +#import "../PromoCampaignPage/Ref.graphql" + +fragment JoinScandicFriends_StartPage on StartPageBlocksJoinScandicFriends { + __typename + join_scandic_friends { + show_header + scripted_top_title + title + preamble + image + show_usp + usp + has_primary_button + primary_button { + cta_text + open_in_new_tab + is_contentstack_link + external_link { + href + title + } + linkConnection { + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...PromoCampaignPageLink + } + } + } + } + } +} + +fragment JoinScandicFriends_StartPageRefs on StartPageBlocksJoinScandicFriends { + join_scandic_friends { + primary_button { + linkConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...PromoCampaignPageRef + } + } + } + } + } +} diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/JoinScandicFriends.graphql.ts b/packages/trpc/lib/graphql/Fragments/Blocks/JoinScandicFriends.graphql.ts deleted file mode 100644 index 90055862c..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/JoinScandicFriends.graphql.ts +++ /dev/null @@ -1,116 +0,0 @@ -import { gql } from "graphql-tag" - -import { AccountPageRef } from "../AccountPage/Ref.graphql" -import { CampaignOverviewPageRef } from "../CampaignOverviewPage/Ref.graphql" -import { CampaignPageRef } from "../CampaignPage/Ref.graphql" -import { CollectionPageRef } from "../CollectionPage/Ref.graphql" -import { ContentPageRef } from "../ContentPage/Ref.graphql" -import { DestinationCityPageRef } from "../DestinationCityPage/Ref.graphql" -import { DestinationCountryPageRef } from "../DestinationCountryPage/Ref.graphql" -import { DestinationOverviewPageRef } from "../DestinationOverviewPage/Ref.graphql" -import { HotelPageRef } from "../HotelPage/Ref.graphql" -import { LoyaltyPageRef } from "../LoyaltyPage/Ref.graphql" -import { AccountPageLink } from "../PageLink/AccountPageLink.graphql" -import { CampaignOverviewPageLink } from "../PageLink/CampaignOverviewPageLink.graphql" -import { CampaignPageLink } from "../PageLink/CampaignPageLink.graphql" -import { CollectionPageLink } from "../PageLink/CollectionPageLink.graphql" -import { ContentPageLink } from "../PageLink/ContentPageLink.graphql" -import { DestinationCityPageLink } from "../PageLink/DestinationCityPageLink.graphql" -import { DestinationCountryPageLink } from "../PageLink/DestinationCountryPageLink.graphql" -import { DestinationOverviewPageLink } from "../PageLink/DestinationOverviewPageLink.graphql" -import { HotelPageLink } from "../PageLink/HotelPageLink.graphql" -import { LoyaltyPageLink } from "../PageLink/LoyaltyPageLink.graphql" -import { PromoCampaignPageLink } from "../PageLink/PromoCampaignPageLink.graphql" -import { PromoCampaignPageRef } from "../PromoCampaignPage/Ref.graphql" - -export const JoinScandicFriends_StartPage = gql` - fragment JoinScandicFriends_StartPage on StartPageBlocksJoinScandicFriends { - __typename - join_scandic_friends { - show_header - scripted_top_title - title - preamble - image - show_usp - usp - has_primary_button - primary_button { - cta_text - open_in_new_tab - is_contentstack_link - external_link { - href - title - } - linkConnection { - edges { - node { - __typename - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...PromoCampaignPageLink - } - } - } - } - } - } - ${AccountPageLink} - ${CampaignOverviewPageLink} - ${CampaignPageLink} - ${CollectionPageLink} - ${ContentPageLink} - ${DestinationCityPageLink} - ${DestinationCountryPageLink} - ${DestinationOverviewPageLink} - ${HotelPageLink} - ${LoyaltyPageLink} - ${PromoCampaignPageLink} -` - -export const JoinScandicFriends_StartPageRefs = gql` - fragment JoinScandicFriends_StartPageRefs on StartPageBlocksJoinScandicFriends { - join_scandic_friends { - primary_button { - linkConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...PromoCampaignPageRef - } - } - } - } - } - } - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${CollectionPageRef} - ${ContentPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${PromoCampaignPageRef} -` diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/List.graphql b/packages/trpc/lib/graphql/Fragments/Blocks/List.graphql new file mode 100644 index 000000000..17720ffea --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/List.graphql @@ -0,0 +1,29 @@ +fragment ListItem on CurrentBlocksPageBlocksListBlockListItemsListItem { + list_item { + list_item_style + subtitle + title + } +} + +fragment ListItemExternalLink on CurrentBlocksPageBlocksListBlockListItemsListItemExternalLink { + list_item_external_link { + link { + href + title + } + list_item_style + subtitle + } +} + +fragment ListBlock on CurrentBlocksPageBlocksList { + list { + list_items { + __typename + ...ListItem + ...ListItemExternalLink + } + title + } +} diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/List.graphql.ts b/packages/trpc/lib/graphql/Fragments/Blocks/List.graphql.ts deleted file mode 100644 index 3c5243d51..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/List.graphql.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { gql } from "graphql-tag" - -export const ListItem = gql` - fragment ListItem on CurrentBlocksPageBlocksListBlockListItemsListItem { - list_item { - list_item_style - subtitle - title - } - } -` - -export const ListItemExternalLink = gql` - fragment ListItemExternalLink on CurrentBlocksPageBlocksListBlockListItemsListItemExternalLink { - list_item_external_link { - link { - href - title - } - list_item_style - subtitle - } - } -` - -export const ListBlock = gql` - fragment ListBlock on CurrentBlocksPageBlocksList { - list { - list_items { - __typename - ...ListItem - ...ListItemExternalLink - } - title - } - } - ${ListItem} - ${ListItemExternalLink} -` diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/LoyaltyCard.graphql b/packages/trpc/lib/graphql/Fragments/Blocks/LoyaltyCard.graphql new file mode 100644 index 000000000..2c08caed6 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/LoyaltyCard.graphql @@ -0,0 +1,52 @@ +#import "../System.graphql" + +#import "../PageLink/AccountPageLink.graphql" +#import "../PageLink/CampaignOverviewPageLink.graphql" +#import "../PageLink/CampaignPageLink.graphql" +#import "../PageLink/CollectionPageLink.graphql" +#import "../PageLink/ContentPageLink.graphql" +#import "../PageLink/DestinationCityPageLink.graphql" +#import "../PageLink/DestinationCountryPageLink.graphql" +#import "../PageLink/DestinationOverviewPageLink.graphql" +#import "../PageLink/HotelPageLink.graphql" +#import "../PageLink/LoyaltyPageLink.graphql" +#import "../PageLink/StartPageLink.graphql" +#import "../PageLink/PromoCampaignPageLink.graphql" + +fragment LoyaltyCardBlock on LoyaltyCard { + body_text + heading + image + title + link { + cta_text + open_in_new_tab + is_contentstack_link + external_link { + title + href + } + linkConnection { + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + } + system { + ...System + } +} diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/LoyaltyCard.graphql.ts b/packages/trpc/lib/graphql/Fragments/Blocks/LoyaltyCard.graphql.ts deleted file mode 100644 index ae6efdeae..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/LoyaltyCard.graphql.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { gql } from "graphql-tag" - -import { AccountPageLink } from "../PageLink/AccountPageLink.graphql" -import { CampaignOverviewPageLink } from "../PageLink/CampaignOverviewPageLink.graphql" -import { CampaignPageLink } from "../PageLink/CampaignPageLink.graphql" -import { CollectionPageLink } from "../PageLink/CollectionPageLink.graphql" -import { ContentPageLink } from "../PageLink/ContentPageLink.graphql" -import { DestinationCityPageLink } from "../PageLink/DestinationCityPageLink.graphql" -import { DestinationCountryPageLink } from "../PageLink/DestinationCountryPageLink.graphql" -import { DestinationOverviewPageLink } from "../PageLink/DestinationOverviewPageLink.graphql" -import { HotelPageLink } from "../PageLink/HotelPageLink.graphql" -import { LoyaltyPageLink } from "../PageLink/LoyaltyPageLink.graphql" -import { PromoCampaignPageLink } from "../PageLink/PromoCampaignPageLink.graphql" -import { StartPageLink } from "../PageLink/StartPageLink.graphql" -import { System } from "../System.graphql" - -export const LoyaltyCardBlock = gql` - fragment LoyaltyCardBlock on LoyaltyCard { - body_text - heading - image - title - link { - cta_text - open_in_new_tab - is_contentstack_link - external_link { - title - href - } - linkConnection { - edges { - node { - __typename - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - } - system { - ...System - } - } - ${System} - ${AccountPageLink} - ${CampaignOverviewPageLink} - ${CampaignPageLink} - ${CollectionPageLink} - ${ContentPageLink} - ${DestinationCityPageLink} - ${DestinationCountryPageLink} - ${DestinationOverviewPageLink} - ${HotelPageLink} - ${LoyaltyPageLink} - ${StartPageLink} - ${PromoCampaignPageLink} -` diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/Puff.graphql.ts b/packages/trpc/lib/graphql/Fragments/Blocks/Puff.graphql similarity index 63% rename from packages/trpc/lib/graphql/Fragments/Blocks/Puff.graphql.ts rename to packages/trpc/lib/graphql/Fragments/Blocks/Puff.graphql index 9288d6db1..f42cf99e0 100644 --- a/packages/trpc/lib/graphql/Fragments/Blocks/Puff.graphql.ts +++ b/packages/trpc/lib/graphql/Fragments/Blocks/Puff.graphql @@ -1,8 +1,5 @@ -import { gql } from "graphql-tag" +#import "../Puff.graphql" -import { Puff } from "../Puff.graphql" - -export const PuffBlock = gql` fragment PuffBlock on CurrentBlocksPageBlocksPuffs { puffs { puffs { @@ -14,5 +11,3 @@ fragment PuffBlock on CurrentBlocksPageBlocksPuffs { } } } -${Puff} -` diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/Refs/Accordion.graphql b/packages/trpc/lib/graphql/Fragments/Blocks/Refs/Accordion.graphql new file mode 100644 index 000000000..5cde62479 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/Refs/Accordion.graphql @@ -0,0 +1,64 @@ +#import "../../AccountPage/Ref.graphql" +#import "../../CampaignOverviewPage/Ref.graphql" +#import "../../CampaignPage/Ref.graphql" +#import "../../CollectionPage/Ref.graphql" +#import "../../ContentPage/Ref.graphql" +#import "../../DestinationCityPage/Ref.graphql" +#import "../../DestinationCountryPage/Ref.graphql" +#import "../../DestinationOverviewPage/Ref.graphql" +#import "../../HotelPage/Ref.graphql" +#import "../../LoyaltyPage/Ref.graphql" +#import "../../StartPage/Ref.graphql" +#import "../../PromoCampaignPage/Ref.graphql" + +fragment AccordionBlockRefs on Accordion { + questions { + answer { + embedded_itemsConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + } +} + +fragment GlobalAccordionBlockRefs on GlobalAccordion { + questions { + answer { + embedded_itemsConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + } +} diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/Refs/Accordion.graphql.ts b/packages/trpc/lib/graphql/Fragments/Blocks/Refs/Accordion.graphql.ts deleted file mode 100644 index a0d00e923..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/Refs/Accordion.graphql.ts +++ /dev/null @@ -1,94 +0,0 @@ -import { gql } from "graphql-tag" - -import { AccountPageRef } from "../../AccountPage/Ref.graphql" -import { CampaignOverviewPageRef } from "../../CampaignOverviewPage/Ref.graphql" -import { CampaignPageRef } from "../../CampaignPage/Ref.graphql" -import { CollectionPageRef } from "../../CollectionPage/Ref.graphql" -import { ContentPageRef } from "../../ContentPage/Ref.graphql" -import { DestinationCityPageRef } from "../../DestinationCityPage/Ref.graphql" -import { DestinationCountryPageRef } from "../../DestinationCountryPage/Ref.graphql" -import { DestinationOverviewPageRef } from "../../DestinationOverviewPage/Ref.graphql" -import { HotelPageRef } from "../../HotelPage/Ref.graphql" -import { LoyaltyPageRef } from "../../LoyaltyPage/Ref.graphql" -import { PromoCampaignPageRef } from "../../PromoCampaignPage/Ref.graphql" -import { StartPageRef } from "../../StartPage/Ref.graphql" - -export const AccordionBlockRefs = gql` - fragment AccordionBlockRefs on Accordion { - questions { - answer { - embedded_itemsConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - } - } - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${CollectionPageRef} - ${ContentPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${StartPageRef} - ${PromoCampaignPageRef} -` - -export const GlobalAccordionBlockRefs = gql` - fragment GlobalAccordionBlockRefs on GlobalAccordion { - questions { - answer { - embedded_itemsConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - } - } - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${CollectionPageRef} - ${ContentPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${StartPageRef} - ${PromoCampaignPageRef} -` diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/Refs/Card.graphql b/packages/trpc/lib/graphql/Fragments/Blocks/Refs/Card.graphql new file mode 100644 index 000000000..084e37543 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/Refs/Card.graphql @@ -0,0 +1,60 @@ +#import "../../AccountPage/Ref.graphql" +#import "../../CampaignOverviewPage/Ref.graphql" +#import "../../CampaignPage/Ref.graphql" +#import "../../CollectionPage/Ref.graphql" +#import "../../ContentPage/Ref.graphql" +#import "../../DestinationCityPage/Ref.graphql" +#import "../../DestinationCountryPage/Ref.graphql" +#import "../../DestinationOverviewPage/Ref.graphql" +#import "../../HotelPage/Ref.graphql" +#import "../../LoyaltyPage/Ref.graphql" +#import "../../StartPage/Ref.graphql" +#import "../../PromoCampaignPage/Ref.graphql" + +fragment CardBlockRef on Card { + secondary_button { + linkConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + primary_button { + linkConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + system { + ...System + } +} diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/Refs/Card.graphql.ts b/packages/trpc/lib/graphql/Fragments/Blocks/Refs/Card.graphql.ts deleted file mode 100644 index 1326105e9..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/Refs/Card.graphql.ts +++ /dev/null @@ -1,78 +0,0 @@ -import { gql } from "graphql-tag" - -import { AccountPageRef } from "../../AccountPage/Ref.graphql" -import { CampaignOverviewPageRef } from "../../CampaignOverviewPage/Ref.graphql" -import { CampaignPageRef } from "../../CampaignPage/Ref.graphql" -import { CollectionPageRef } from "../../CollectionPage/Ref.graphql" -import { ContentPageRef } from "../../ContentPage/Ref.graphql" -import { DestinationCityPageRef } from "../../DestinationCityPage/Ref.graphql" -import { DestinationCountryPageRef } from "../../DestinationCountryPage/Ref.graphql" -import { DestinationOverviewPageRef } from "../../DestinationOverviewPage/Ref.graphql" -import { HotelPageRef } from "../../HotelPage/Ref.graphql" -import { LoyaltyPageRef } from "../../LoyaltyPage/Ref.graphql" -import { PromoCampaignPageRef } from "../../PromoCampaignPage/Ref.graphql" -import { StartPageRef } from "../../StartPage/Ref.graphql" -import { System } from "../../System.graphql" - -export const CardBlockRef = gql` - fragment CardBlockRef on Card { - secondary_button { - linkConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - primary_button { - linkConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - system { - ...System - } - } - ${System} - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${CollectionPageRef} - ${ContentPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${StartPageRef} - ${PromoCampaignPageRef} -` diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/Refs/InfoCard.graphql b/packages/trpc/lib/graphql/Fragments/Blocks/Refs/InfoCard.graphql new file mode 100644 index 000000000..9b266512c --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/Refs/InfoCard.graphql @@ -0,0 +1,60 @@ +#import "../../AccountPage/Ref.graphql" +#import "../../CampaignOverviewPage/Ref.graphql" +#import "../../CampaignPage/Ref.graphql" +#import "../../CollectionPage/Ref.graphql" +#import "../../ContentPage/Ref.graphql" +#import "../../DestinationCityPage/Ref.graphql" +#import "../../DestinationCountryPage/Ref.graphql" +#import "../../DestinationOverviewPage/Ref.graphql" +#import "../../HotelPage/Ref.graphql" +#import "../../LoyaltyPage/Ref.graphql" +#import "../../StartPage/Ref.graphql" +#import "../../PromoCampaignPage/Ref.graphql" + +fragment InfoCardBlockRef on InfoCard { + secondary_button { + linkConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + primary_button { + linkConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + system { + ...System + } +} diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/Refs/InfoCard.graphql.ts b/packages/trpc/lib/graphql/Fragments/Blocks/Refs/InfoCard.graphql.ts deleted file mode 100644 index f329a1285..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/Refs/InfoCard.graphql.ts +++ /dev/null @@ -1,76 +0,0 @@ -import { gql } from "graphql-tag" - -import { AccountPageRef } from "../../AccountPage/Ref.graphql" -import { CampaignOverviewPageRef } from "../../CampaignOverviewPage/Ref.graphql" -import { CampaignPageRef } from "../../CampaignPage/Ref.graphql" -import { CollectionPageRef } from "../../CollectionPage/Ref.graphql" -import { ContentPageRef } from "../../ContentPage/Ref.graphql" -import { DestinationCityPageRef } from "../../DestinationCityPage/Ref.graphql" -import { DestinationCountryPageRef } from "../../DestinationCountryPage/Ref.graphql" -import { DestinationOverviewPageRef } from "../../DestinationOverviewPage/Ref.graphql" -import { HotelPageRef } from "../../HotelPage/Ref.graphql" -import { LoyaltyPageRef } from "../../LoyaltyPage/Ref.graphql" -import { PromoCampaignPageRef } from "../../PromoCampaignPage/Ref.graphql" -import { StartPageRef } from "../../StartPage/Ref.graphql" - -export const InfoCardBlockRef = gql` - fragment InfoCardBlockRef on InfoCard { - secondary_button { - linkConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - primary_button { - 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} -` diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/Refs/LoyaltyCard.graphql b/packages/trpc/lib/graphql/Fragments/Blocks/Refs/LoyaltyCard.graphql new file mode 100644 index 000000000..10a40340d --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/Refs/LoyaltyCard.graphql @@ -0,0 +1,39 @@ +#import "../../AccountPage/Ref.graphql" +#import "../../CampaignOverviewPage/Ref.graphql" +#import "../../CampaignPage/Ref.graphql" +#import "../../CollectionPage/Ref.graphql" +#import "../../ContentPage/Ref.graphql" +#import "../../DestinationCityPage/Ref.graphql" +#import "../../DestinationCountryPage/Ref.graphql" +#import "../../DestinationOverviewPage/Ref.graphql" +#import "../../HotelPage/Ref.graphql" +#import "../../LoyaltyPage/Ref.graphql" +#import "../../StartPage/Ref.graphql" +#import "../../PromoCampaignPage/Ref.graphql" + +fragment LoyaltyCardBlockRef on LoyaltyCard { + link { + linkConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + system { + ...System + } +} diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/Refs/LoyaltyCard.graphql.ts b/packages/trpc/lib/graphql/Fragments/Blocks/Refs/LoyaltyCard.graphql.ts deleted file mode 100644 index b6313a366..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/Refs/LoyaltyCard.graphql.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { gql } from "graphql-tag" - -import { AccountPageRef } from "../../AccountPage/Ref.graphql" -import { CampaignOverviewPageRef } from "../../CampaignOverviewPage/Ref.graphql" -import { CampaignPageRef } from "../../CampaignPage/Ref.graphql" -import { CollectionPageRef } from "../../CollectionPage/Ref.graphql" -import { ContentPageRef } from "../../ContentPage/Ref.graphql" -import { DestinationCityPageRef } from "../../DestinationCityPage/Ref.graphql" -import { DestinationCountryPageRef } from "../../DestinationCountryPage/Ref.graphql" -import { DestinationOverviewPageRef } from "../../DestinationOverviewPage/Ref.graphql" -import { HotelPageRef } from "../../HotelPage/Ref.graphql" -import { LoyaltyPageRef } from "../../LoyaltyPage/Ref.graphql" -import { PromoCampaignPageRef } from "../../PromoCampaignPage/Ref.graphql" -import { StartPageRef } from "../../StartPage/Ref.graphql" -import { System } from "../../System.graphql" - -export const LoyaltyCardBlockRef = gql` - fragment LoyaltyCardBlockRef on LoyaltyCard { - link { - linkConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - system { - ...System - } - } - ${System} - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${CollectionPageRef} - ${ContentPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${StartPageRef} - ${PromoCampaignPageRef} -` diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/Refs/TeaserCard.graphql b/packages/trpc/lib/graphql/Fragments/Blocks/Refs/TeaserCard.graphql new file mode 100644 index 000000000..13b56b4a6 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/Refs/TeaserCard.graphql @@ -0,0 +1,125 @@ +#import "../../AccountPage/Ref.graphql" +#import "../../CampaignOverviewPage/Ref.graphql" +#import "../../CampaignPage/Ref.graphql" +#import "../../CollectionPage/Ref.graphql" +#import "../../ContentPage/Ref.graphql" +#import "../../DestinationCityPage/Ref.graphql" +#import "../../DestinationCountryPage/Ref.graphql" +#import "../../DestinationOverviewPage/Ref.graphql" +#import "../../HotelPage/Ref.graphql" +#import "../../LoyaltyPage/Ref.graphql" +#import "../../StartPage/Ref.graphql" +#import "../../PromoCampaignPage/Ref.graphql" + +fragment TeaserCardBlockRef on TeaserCard { + secondary_button { + linkConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + primary_button { + linkConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + sidepeek_content { + content { + embedded_itemsConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + primary_button { + linkConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + secondary_button { + linkConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + } + system { + ...System + } +} diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/Refs/TeaserCard.graphql.ts b/packages/trpc/lib/graphql/Fragments/Blocks/Refs/TeaserCard.graphql.ts deleted file mode 100644 index c1e15fc49..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/Refs/TeaserCard.graphql.ts +++ /dev/null @@ -1,141 +0,0 @@ -import { gql } from "graphql-tag" - -import { AccountPageRef } from "../../AccountPage/Ref.graphql" -import { CampaignOverviewPageRef } from "../../CampaignOverviewPage/Ref.graphql" -import { CampaignPageRef } from "../../CampaignPage/Ref.graphql" -import { CollectionPageRef } from "../../CollectionPage/Ref.graphql" -import { ContentPageRef } from "../../ContentPage/Ref.graphql" -import { DestinationCityPageRef } from "../../DestinationCityPage/Ref.graphql" -import { DestinationCountryPageRef } from "../../DestinationCountryPage/Ref.graphql" -import { DestinationOverviewPageRef } from "../../DestinationOverviewPage/Ref.graphql" -import { HotelPageRef } from "../../HotelPage/Ref.graphql" -import { LoyaltyPageRef } from "../../LoyaltyPage/Ref.graphql" -import { PromoCampaignPageRef } from "../../PromoCampaignPage/Ref.graphql" -import { StartPageRef } from "../../StartPage/Ref.graphql" - -export const TeaserCardBlockRef = gql` - fragment TeaserCardBlockRef on TeaserCard { - secondary_button { - linkConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - primary_button { - linkConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - sidepeek_content { - content { - embedded_itemsConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - primary_button { - linkConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - secondary_button { - 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} -` diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/Shortcuts.graphql b/packages/trpc/lib/graphql/Fragments/Blocks/Shortcuts.graphql new file mode 100644 index 000000000..4fe5e62d3 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/Shortcuts.graphql @@ -0,0 +1,131 @@ +#import "../PageLink/AccountPageLink.graphql" +#import "../PageLink/CampaignOverviewPageLink.graphql" +#import "../PageLink/CampaignPageLink.graphql" +#import "../PageLink/CollectionPageLink.graphql" +#import "../PageLink/ContentPageLink.graphql" +#import "../PageLink/DestinationCityPageLink.graphql" +#import "../PageLink/DestinationCountryPageLink.graphql" +#import "../PageLink/DestinationOverviewPageLink.graphql" +#import "../PageLink/HotelPageLink.graphql" +#import "../PageLink/LoyaltyPageLink.graphql" +#import "../PageLink/StartPageLink.graphql" +#import "../PageLink/PromoCampaignPageLink.graphql" + +#import "../AccountPage/Ref.graphql" +#import "../CampaignOverviewPage/Ref.graphql" +#import "../CampaignPage/Ref.graphql" +#import "../CollectionPage/Ref.graphql" +#import "../ContentPage/Ref.graphql" +#import "../DestinationCityPage/Ref.graphql" +#import "../DestinationCountryPage/Ref.graphql" +#import "../DestinationOverviewPage/Ref.graphql" +#import "../HotelPage/Ref.graphql" +#import "../LoyaltyPage/Ref.graphql" +#import "../StartPage/Ref.graphql" +#import "../PromoCampaignPage/Ref.graphql" + +fragment Shortcuts on Shortcuts { + subtitle: preamble + title + two_column_list + shortcuts { + is_contentstack_link + external_link { + href + title + } + open_in_new_tab + text + linkConnection { + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + } +} + +fragment Shortcuts_AccountPage on AccountPageContentShortcuts { + shortcuts { + ...Shortcuts + } +} + +fragment Shortcuts_CollectionPage on CollectionPageBlocksShortcuts { + shortcuts { + ...Shortcuts + } +} + +fragment Shortcuts_ContentPage on ContentPageBlocksShortcuts { + shortcuts { + ...Shortcuts + } +} + +fragment Shortcuts_LoyaltyPage on LoyaltyPageBlocksShortcuts { + shortcuts { + ...Shortcuts + } +} + +fragment ShortcutsRefs on Shortcuts { + shortcuts { + linkConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } +} + +fragment Shortcuts_AccountPageRefs on AccountPageContentShortcuts { + shortcuts { + ...ShortcutsRefs + } +} + +fragment Shortcuts_CollectionPageRefs on CollectionPageBlocksShortcuts { + shortcuts { + ...ShortcutsRefs + } +} + +fragment Shortcuts_ContentPageRefs on ContentPageBlocksShortcuts { + shortcuts { + ...ShortcutsRefs + } +} + +fragment Shortcuts_LoyaltyPageRefs on LoyaltyPageBlocksShortcuts { + shortcuts { + ...ShortcutsRefs + } +} diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/Shortcuts.graphql.ts b/packages/trpc/lib/graphql/Fragments/Blocks/Shortcuts.graphql.ts deleted file mode 100644 index 6cf58aa8a..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/Shortcuts.graphql.ts +++ /dev/null @@ -1,184 +0,0 @@ -import { gql } from "graphql-tag" - -import { AccountPageRef } from "../AccountPage/Ref.graphql" -import { CampaignOverviewPageRef } from "../CampaignOverviewPage/Ref.graphql" -import { CampaignPageRef } from "../CampaignPage/Ref.graphql" -import { CollectionPageRef } from "../CollectionPage/Ref.graphql" -import { ContentPageRef } from "../ContentPage/Ref.graphql" -import { DestinationCityPageRef } from "../DestinationCityPage/Ref.graphql" -import { DestinationCountryPageRef } from "../DestinationCountryPage/Ref.graphql" -import { DestinationOverviewPageRef } from "../DestinationOverviewPage/Ref.graphql" -import { HotelPageRef } from "../HotelPage/Ref.graphql" -import { LoyaltyPageRef } from "../LoyaltyPage/Ref.graphql" -import { AccountPageLink } from "../PageLink/AccountPageLink.graphql" -import { CampaignOverviewPageLink } from "../PageLink/CampaignOverviewPageLink.graphql" -import { CampaignPageLink } from "../PageLink/CampaignPageLink.graphql" -import { CollectionPageLink } from "../PageLink/CollectionPageLink.graphql" -import { ContentPageLink } from "../PageLink/ContentPageLink.graphql" -import { DestinationCityPageLink } from "../PageLink/DestinationCityPageLink.graphql" -import { DestinationCountryPageLink } from "../PageLink/DestinationCountryPageLink.graphql" -import { DestinationOverviewPageLink } from "../PageLink/DestinationOverviewPageLink.graphql" -import { HotelPageLink } from "../PageLink/HotelPageLink.graphql" -import { LoyaltyPageLink } from "../PageLink/LoyaltyPageLink.graphql" -import { PromoCampaignPageLink } from "../PageLink/PromoCampaignPageLink.graphql" -import { StartPageLink } from "../PageLink/StartPageLink.graphql" -import { PromoCampaignPageRef } from "../PromoCampaignPage/Ref.graphql" -import { StartPageRef } from "../StartPage/Ref.graphql" - -export const Shortcuts = gql` - fragment Shortcuts on Shortcuts { - subtitle: preamble - title - two_column_list - shortcuts { - is_contentstack_link - external_link { - href - title - } - open_in_new_tab - text - 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 Shortcuts_AccountPage = gql` - fragment Shortcuts_AccountPage on AccountPageContentShortcuts { - shortcuts { - ...Shortcuts - } - } - ${Shortcuts} -` - -export const Shortcuts_CollectionPage = gql` - fragment Shortcuts_CollectionPage on CollectionPageBlocksShortcuts { - shortcuts { - ...Shortcuts - } - } - ${Shortcuts} -` - -export const Shortcuts_ContentPage = gql` - fragment Shortcuts_ContentPage on ContentPageBlocksShortcuts { - shortcuts { - ...Shortcuts - } - } - ${Shortcuts} -` - -export const Shortcuts_LoyaltyPage = gql` - fragment Shortcuts_LoyaltyPage on LoyaltyPageBlocksShortcuts { - shortcuts { - ...Shortcuts - } - } - ${Shortcuts} -` - -export const ShortcutsRefs = gql` - fragment ShortcutsRefs on Shortcuts { - shortcuts { - linkConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - } - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${CollectionPageRef} - ${ContentPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${StartPageRef} - ${PromoCampaignPageRef} -` - -export const Shortcuts_AccountPageRefs = gql` - fragment Shortcuts_AccountPageRefs on AccountPageContentShortcuts { - shortcuts { - ...ShortcutsRefs - } - } - ${ShortcutsRefs} -` - -export const Shortcuts_CollectionPageRefs = gql` - fragment Shortcuts_CollectionPageRefs on CollectionPageBlocksShortcuts { - shortcuts { - ...ShortcutsRefs - } - } - ${ShortcutsRefs} -` - -export const Shortcuts_ContentPageRefs = gql` - fragment Shortcuts_ContentPageRefs on ContentPageBlocksShortcuts { - shortcuts { - ...ShortcutsRefs - } - } - ${ShortcutsRefs} -` - -export const Shortcuts_LoyaltyPageRefs = gql` - fragment Shortcuts_LoyaltyPageRefs on LoyaltyPageBlocksShortcuts { - shortcuts { - ...ShortcutsRefs - } - } - ${ShortcutsRefs} -` diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/Table.graphql.ts b/packages/trpc/lib/graphql/Fragments/Blocks/Table.graphql similarity index 64% rename from packages/trpc/lib/graphql/Fragments/Blocks/Table.graphql.ts rename to packages/trpc/lib/graphql/Fragments/Blocks/Table.graphql index c442ef2ab..66736296b 100644 --- a/packages/trpc/lib/graphql/Fragments/Blocks/Table.graphql.ts +++ b/packages/trpc/lib/graphql/Fragments/Blocks/Table.graphql @@ -1,6 +1,3 @@ -import { gql } from "graphql-tag" - -export const Table_ContentPage = gql` fragment Table_ContentPage on ContentPageBlocksTable { __typename table { @@ -10,4 +7,3 @@ fragment Table_ContentPage on ContentPageBlocksTable { table } } -` diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/TeaserCard.graphql b/packages/trpc/lib/graphql/Fragments/Blocks/TeaserCard.graphql new file mode 100644 index 000000000..585663838 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/TeaserCard.graphql @@ -0,0 +1,169 @@ +#import "../System.graphql" + +#import "../PageLink/AccountPageLink.graphql" +#import "../PageLink/CampaignOverviewPageLink.graphql" +#import "../PageLink/CampaignPageLink.graphql" +#import "../PageLink/CollectionPageLink.graphql" +#import "../PageLink/ContentPageLink.graphql" +#import "../PageLink/DestinationCityPageLink.graphql" +#import "../PageLink/DestinationCountryPageLink.graphql" +#import "../PageLink/DestinationOverviewPageLink.graphql" +#import "../PageLink/HotelPageLink.graphql" +#import "../PageLink/LoyaltyPageLink.graphql" +#import "../PageLink/StartPageLink.graphql" +#import "../PageLink/PromoCampaignPageLink.graphql" + +fragment TeaserCardBlock on TeaserCard { + heading + body_text + image + title + has_primary_button + has_secondary_button + has_sidepeek_button + primary_button { + is_contentstack_link + cta_text + open_in_new_tab + external_link { + title + href + } + linkConnection { + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + } + secondary_button { + is_contentstack_link + cta_text + open_in_new_tab + external_link { + title + href + } + linkConnection { + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + } + sidepeek_button { + call_to_action_text + } + sidepeek_content { + heading + content { + embedded_itemsConnection { + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + json + } + has_primary_button + primary_button { + is_contentstack_link + cta_text + open_in_new_tab + external_link { + title + href + } + linkConnection { + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + } + has_secondary_button + secondary_button { + is_contentstack_link + cta_text + open_in_new_tab + external_link { + title + href + } + linkConnection { + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + } + } + system { + ...System + } +} diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/TeaserCard.graphql.ts b/packages/trpc/lib/graphql/Fragments/Blocks/TeaserCard.graphql.ts deleted file mode 100644 index bc7c15815..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/TeaserCard.graphql.ts +++ /dev/null @@ -1,185 +0,0 @@ -import { gql } from "graphql-tag" - -import { AccountPageLink } from "../PageLink/AccountPageLink.graphql" -import { CampaignOverviewPageLink } from "../PageLink/CampaignOverviewPageLink.graphql" -import { CampaignPageLink } from "../PageLink/CampaignPageLink.graphql" -import { CollectionPageLink } from "../PageLink/CollectionPageLink.graphql" -import { ContentPageLink } from "../PageLink/ContentPageLink.graphql" -import { DestinationCityPageLink } from "../PageLink/DestinationCityPageLink.graphql" -import { DestinationCountryPageLink } from "../PageLink/DestinationCountryPageLink.graphql" -import { DestinationOverviewPageLink } from "../PageLink/DestinationOverviewPageLink.graphql" -import { HotelPageLink } from "../PageLink/HotelPageLink.graphql" -import { LoyaltyPageLink } from "../PageLink/LoyaltyPageLink.graphql" -import { PromoCampaignPageLink } from "../PageLink/PromoCampaignPageLink.graphql" -import { StartPageLink } from "../PageLink/StartPageLink.graphql" -import { System } from "../System.graphql" - -export const TeaserCardBlock = gql` - fragment TeaserCardBlock on TeaserCard { - heading - body_text - image - title - has_primary_button - has_secondary_button - has_sidepeek_button - primary_button { - is_contentstack_link - cta_text - open_in_new_tab - external_link { - title - href - } - linkConnection { - edges { - node { - __typename - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - } - secondary_button { - is_contentstack_link - cta_text - open_in_new_tab - external_link { - title - href - } - linkConnection { - edges { - node { - __typename - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - } - sidepeek_button { - call_to_action_text - } - sidepeek_content { - heading - content { - embedded_itemsConnection { - edges { - node { - __typename - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - json - } - has_primary_button - primary_button { - is_contentstack_link - cta_text - open_in_new_tab - external_link { - title - href - } - linkConnection { - edges { - node { - __typename - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - } - has_secondary_button - secondary_button { - is_contentstack_link - cta_text - open_in_new_tab - external_link { - title - href - } - linkConnection { - edges { - node { - __typename - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - } - } - system { - ...System - } - } - ${System} - ${AccountPageLink} - ${CampaignOverviewPageLink} - ${CampaignPageLink} - ${CollectionPageLink} - ${ContentPageLink} - ${DestinationCityPageLink} - ${DestinationCountryPageLink} - ${DestinationOverviewPageLink} - ${HotelPageLink} - ${LoyaltyPageLink} - ${StartPageLink} - ${PromoCampaignPageLink} -` diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/Text.graphql.ts b/packages/trpc/lib/graphql/Fragments/Blocks/Text.graphql similarity index 67% rename from packages/trpc/lib/graphql/Fragments/Blocks/Text.graphql.ts rename to packages/trpc/lib/graphql/Fragments/Blocks/Text.graphql index 22169690c..5172145b8 100644 --- a/packages/trpc/lib/graphql/Fragments/Blocks/Text.graphql.ts +++ b/packages/trpc/lib/graphql/Fragments/Blocks/Text.graphql @@ -1,8 +1,5 @@ -import { gql } from "graphql-tag" +#import "../SysAsset.graphql" -import { SysAsset } from "../SysAsset.graphql" - -export const TextBlock = gql` fragment TextBlock on CurrentBlocksPageBlocksText { text { content { @@ -19,5 +16,3 @@ fragment TextBlock on CurrentBlocksPageBlocksText { } } } -${SysAsset} -` diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/TextCols.graphql b/packages/trpc/lib/graphql/Fragments/Blocks/TextCols.graphql new file mode 100644 index 000000000..c4ddb3491 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/TextCols.graphql @@ -0,0 +1,85 @@ +#import "../PageLink/AccountPageLink.graphql" +#import "../PageLink/CampaignOverviewPageLink.graphql" +#import "../PageLink/CampaignPageLink.graphql" +#import "../PageLink/CollectionPageLink.graphql" +#import "../PageLink/ContentPageLink.graphql" +#import "../PageLink/DestinationCityPageLink.graphql" +#import "../PageLink/DestinationCountryPageLink.graphql" +#import "../PageLink/DestinationOverviewPageLink.graphql" +#import "../PageLink/HotelPageLink.graphql" +#import "../PageLink/LoyaltyPageLink.graphql" +#import "../PageLink/StartPageLink.graphql" +#import "../PageLink/PromoCampaignPageLink.graphql" + +#import "../AccountPage/Ref.graphql" +#import "../CampaignOverviewPage/Ref.graphql" +#import "../CampaignPage/Ref.graphql" +#import "../CollectionPage/Ref.graphql" +#import "../ContentPage/Ref.graphql" +#import "../DestinationCityPage/Ref.graphql" +#import "../DestinationCountryPage/Ref.graphql" +#import "../DestinationOverviewPage/Ref.graphql" +#import "../HotelPage/Ref.graphql" +#import "../LoyaltyPage/Ref.graphql" +#import "../StartPage/Ref.graphql" +#import "../PromoCampaignPage/Ref.graphql" + +fragment TextCols_ContentPage on ContentPageBlocksTextCols { + text_cols { + columns { + title + text { + json + embedded_itemsConnection { + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + } + } + } +} + +fragment TextCols_ContentPageRef on ContentPageBlocksTextCols { + text_cols { + columns { + title + text { + json + embedded_itemsConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + } + } +} diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/TextCols.graphql.ts b/packages/trpc/lib/graphql/Fragments/Blocks/TextCols.graphql.ts deleted file mode 100644 index e3ec81c54..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/TextCols.graphql.ts +++ /dev/null @@ -1,114 +0,0 @@ -import { gql } from "graphql-tag" - -import { AccountPageRef } from "../AccountPage/Ref.graphql" -import { CampaignOverviewPageRef } from "../CampaignOverviewPage/Ref.graphql" -import { CampaignPageRef } from "../CampaignPage/Ref.graphql" -import { CollectionPageRef } from "../CollectionPage/Ref.graphql" -import { ContentPageRef } from "../ContentPage/Ref.graphql" -import { DestinationCityPageRef } from "../DestinationCityPage/Ref.graphql" -import { DestinationCountryPageRef } from "../DestinationCountryPage/Ref.graphql" -import { DestinationOverviewPageRef } from "../DestinationOverviewPage/Ref.graphql" -import { HotelPageRef } from "../HotelPage/Ref.graphql" -import { LoyaltyPageRef } from "../LoyaltyPage/Ref.graphql" -import { AccountPageLink } from "../PageLink/AccountPageLink.graphql" -import { CampaignOverviewPageLink } from "../PageLink/CampaignOverviewPageLink.graphql" -import { CampaignPageLink } from "../PageLink/CampaignPageLink.graphql" -import { CollectionPageLink } from "../PageLink/CollectionPageLink.graphql" -import { ContentPageLink } from "../PageLink/ContentPageLink.graphql" -import { DestinationCityPageLink } from "../PageLink/DestinationCityPageLink.graphql" -import { DestinationCountryPageLink } from "../PageLink/DestinationCountryPageLink.graphql" -import { DestinationOverviewPageLink } from "../PageLink/DestinationOverviewPageLink.graphql" -import { HotelPageLink } from "../PageLink/HotelPageLink.graphql" -import { LoyaltyPageLink } from "../PageLink/LoyaltyPageLink.graphql" -import { PromoCampaignPageLink } from "../PageLink/PromoCampaignPageLink.graphql" -import { StartPageLink } from "../PageLink/StartPageLink.graphql" -import { PromoCampaignPageRef } from "../PromoCampaignPage/Ref.graphql" -import { StartPageRef } from "../StartPage/Ref.graphql" - -export const TextCols_ContentPage = gql` - fragment TextCols_ContentPage on ContentPageBlocksTextCols { - text_cols { - columns { - title - text { - json - embedded_itemsConnection { - 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 TextCols_ContentPageRef = gql` - fragment TextCols_ContentPageRef on ContentPageBlocksTextCols { - text_cols { - columns { - title - text { - json - embedded_itemsConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - } - } - } - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${CollectionPageRef} - ${ContentPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${StartPageRef} - ${PromoCampaignPageRef} -` diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/TextContent.graphql.ts b/packages/trpc/lib/graphql/Fragments/Blocks/TextContent.graphql similarity index 67% rename from packages/trpc/lib/graphql/Fragments/Blocks/TextContent.graphql.ts rename to packages/trpc/lib/graphql/Fragments/Blocks/TextContent.graphql index 8e7930322..5da55815b 100644 --- a/packages/trpc/lib/graphql/Fragments/Blocks/TextContent.graphql.ts +++ b/packages/trpc/lib/graphql/Fragments/Blocks/TextContent.graphql @@ -1,8 +1,5 @@ -import { gql } from "graphql-tag" +#import "../SysAsset.graphql" -import { SysAsset } from "../SysAsset.graphql" - -export const TextContent_AccountPage = gql` fragment TextContent_AccountPage on AccountPageContentTextContent { text_content { content { @@ -19,5 +16,3 @@ fragment TextContent_AccountPage on AccountPageContentTextContent { } } } -${SysAsset} -` diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/UspGrid.graphql b/packages/trpc/lib/graphql/Fragments/Blocks/UspGrid.graphql new file mode 100644 index 000000000..e0dc5b6ce --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/UspGrid.graphql @@ -0,0 +1,177 @@ +#import "../PageLink/AccountPageLink.graphql" +#import "../PageLink/CampaignOverviewPageLink.graphql" +#import "../PageLink/CampaignPageLink.graphql" +#import "../PageLink/CollectionPageLink.graphql" +#import "../PageLink/ContentPageLink.graphql" +#import "../PageLink/DestinationCityPageLink.graphql" +#import "../PageLink/DestinationCountryPageLink.graphql" +#import "../PageLink/DestinationOverviewPageLink.graphql" +#import "../PageLink/HotelPageLink.graphql" +#import "../PageLink/LoyaltyPageLink.graphql" +#import "../PageLink/StartPageLink.graphql" +#import "../PageLink/PromoCampaignPageLink.graphql" + +#import "../AccountPage/Ref.graphql" +#import "../CampaignOverviewPage/Ref.graphql" +#import "../CampaignPage/Ref.graphql" +#import "../CollectionPage/Ref.graphql" +#import "../ContentPage/Ref.graphql" +#import "../DestinationCityPage/Ref.graphql" +#import "../DestinationCountryPage/Ref.graphql" +#import "../DestinationOverviewPage/Ref.graphql" +#import "../HotelPage/Ref.graphql" +#import "../LoyaltyPage/Ref.graphql" +#import "../StartPage/Ref.graphql" +#import "../PromoCampaignPage/Ref.graphql" + +fragment UspGrid_ContentPage on ContentPageBlocksUspGrid { + __typename + usp_grid { + cardsConnection { + edges { + node { + ... on UspGrid { + usp_card { + __typename + icon + text { + embedded_itemsConnection { + totalCount + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + json + } + } + } + } + } + } + } +} + +fragment UspGrid_ContentPageRefs on ContentPageBlocksUspGrid { + usp_grid { + cardsConnection { + edges { + node { + ... on UspGrid { + usp_card { + text { + embedded_itemsConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + } + } + } + } + } + } +} + +fragment UspGrid_CollectionPage on CollectionPageBlocksUspGrid { + __typename + usp_grid { + cardsConnection { + edges { + node { + ... on UspGrid { + usp_card { + __typename + icon + text { + embedded_itemsConnection { + totalCount + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + json + } + } + } + } + } + } + } +} + +fragment UspGrid_CollectionPageRefs on CollectionPageBlocksUspGrid { + usp_grid { + cardsConnection { + edges { + node { + ... on UspGrid { + usp_card { + text { + embedded_itemsConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + } + } + } + } + } + } +} diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/UspGrid.graphql.ts b/packages/trpc/lib/graphql/Fragments/Blocks/UspGrid.graphql.ts deleted file mode 100644 index 79d82f72d..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/UspGrid.graphql.ts +++ /dev/null @@ -1,234 +0,0 @@ -import { gql } from "graphql-tag" - -import { AccountPageRef } from "../AccountPage/Ref.graphql" -import { CampaignOverviewPageRef } from "../CampaignOverviewPage/Ref.graphql" -import { CampaignPageRef } from "../CampaignPage/Ref.graphql" -import { CollectionPageRef } from "../CollectionPage/Ref.graphql" -import { ContentPageRef } from "../ContentPage/Ref.graphql" -import { DestinationCityPageRef } from "../DestinationCityPage/Ref.graphql" -import { DestinationCountryPageRef } from "../DestinationCountryPage/Ref.graphql" -import { DestinationOverviewPageRef } from "../DestinationOverviewPage/Ref.graphql" -import { HotelPageRef } from "../HotelPage/Ref.graphql" -import { LoyaltyPageRef } from "../LoyaltyPage/Ref.graphql" -import { AccountPageLink } from "../PageLink/AccountPageLink.graphql" -import { CampaignOverviewPageLink } from "../PageLink/CampaignOverviewPageLink.graphql" -import { CampaignPageLink } from "../PageLink/CampaignPageLink.graphql" -import { CollectionPageLink } from "../PageLink/CollectionPageLink.graphql" -import { ContentPageLink } from "../PageLink/ContentPageLink.graphql" -import { DestinationCityPageLink } from "../PageLink/DestinationCityPageLink.graphql" -import { DestinationCountryPageLink } from "../PageLink/DestinationCountryPageLink.graphql" -import { DestinationOverviewPageLink } from "../PageLink/DestinationOverviewPageLink.graphql" -import { HotelPageLink } from "../PageLink/HotelPageLink.graphql" -import { LoyaltyPageLink } from "../PageLink/LoyaltyPageLink.graphql" -import { PromoCampaignPageLink } from "../PageLink/PromoCampaignPageLink.graphql" -import { StartPageLink } from "../PageLink/StartPageLink.graphql" -import { PromoCampaignPageRef } from "../PromoCampaignPage/Ref.graphql" -import { StartPageRef } from "../StartPage/Ref.graphql" - -export const UspGrid_ContentPage = gql` - fragment UspGrid_ContentPage on ContentPageBlocksUspGrid { - __typename - usp_grid { - cardsConnection { - edges { - node { - ... on UspGrid { - usp_card { - __typename - icon - text { - embedded_itemsConnection { - totalCount - edges { - node { - __typename - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - json - } - } - } - } - } - } - } - } - ${AccountPageLink} - ${CampaignOverviewPageLink} - ${CampaignPageLink} - ${CollectionPageLink} - ${ContentPageLink} - ${DestinationCityPageLink} - ${DestinationCountryPageLink} - ${DestinationOverviewPageLink} - ${HotelPageLink} - ${LoyaltyPageLink} - ${StartPageLink} - ${PromoCampaignPageLink} -` - -export const UspGrid_ContentPageRefs = gql` - fragment UspGrid_ContentPageRefs on ContentPageBlocksUspGrid { - usp_grid { - cardsConnection { - edges { - node { - ... on UspGrid { - usp_card { - text { - embedded_itemsConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - } - } - } - } - } - } - } - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${CollectionPageRef} - ${ContentPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${StartPageRef} - ${PromoCampaignPageRef} -` - -export const UspGrid_CollectionPage = gql` - fragment UspGrid_CollectionPage on CollectionPageBlocksUspGrid { - __typename - usp_grid { - cardsConnection { - edges { - node { - ... on UspGrid { - usp_card { - __typename - icon - text { - embedded_itemsConnection { - totalCount - edges { - node { - __typename - ...AccountPageLink - ...CampaignOverviewPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - json - } - } - } - } - } - } - } - } - ${AccountPageLink} - ${CampaignOverviewPageLink} - ${CampaignPageLink} - ${CollectionPageLink} - ${ContentPageLink} - ${DestinationCityPageLink} - ${DestinationCountryPageLink} - ${DestinationOverviewPageLink} - ${HotelPageLink} - ${LoyaltyPageLink} - ${StartPageLink} - ${PromoCampaignPageLink} -` - -export const UspGrid_CollectionPageRefs = gql` - fragment UspGrid_CollectionPageRefs on CollectionPageBlocksUspGrid { - usp_grid { - cardsConnection { - edges { - node { - ... on UspGrid { - usp_card { - text { - embedded_itemsConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - } - } - } - } - } - } - } - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${CollectionPageRef} - ${ContentPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${StartPageRef} - ${PromoCampaignPageRef} -` diff --git a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/AccountPage.graphql.ts b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/AccountPage.graphql similarity index 58% rename from packages/trpc/lib/graphql/Fragments/Breadcrumbs/AccountPage.graphql.ts rename to packages/trpc/lib/graphql/Fragments/Breadcrumbs/AccountPage.graphql index 6908799f4..74bfd6096 100644 --- a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/AccountPage.graphql.ts +++ b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/AccountPage.graphql @@ -1,8 +1,5 @@ -import { gql } from "graphql-tag" +#import "../System.graphql" -import { System } from "../System.graphql" - -export const AccountPageBreadcrumb = gql` fragment AccountPageBreadcrumb on AccountPage { web { breadcrumbs { @@ -14,10 +11,7 @@ fragment AccountPageBreadcrumb on AccountPage { } url } -${System} -` -export const AccountPageBreadcrumbRef = gql` fragment AccountPageBreadcrumbRef on AccountPage { web { breadcrumbs { @@ -28,5 +22,3 @@ fragment AccountPageBreadcrumbRef on AccountPage { ...System } } -${System} -` diff --git a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/Breadcrumbs.graphql b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/Breadcrumbs.graphql new file mode 100644 index 000000000..49ad15196 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/Breadcrumbs.graphql @@ -0,0 +1,52 @@ +#import "./AccountPage.graphql" +#import "./CampaignOverviewPage.graphql" +#import "./CampaignPage.graphql" +#import "./CollectionPage.graphql" +#import "./ContentPage.graphql" +#import "./DestinationCityPage.graphql" +#import "./DestinationCountryPage.graphql" +#import "./DestinationOverviewPage.graphql" +#import "./HotelPage.graphql" +#import "./LoyaltyPage.graphql" + +fragment Breadcrumbs on Breadcrumbs { + title + parentsConnection { + edges { + node { + __typename + ...AccountPageBreadcrumb + ...CampaignOverviewPageBreadcrumb + ...CampaignPageBreadcrumb + ...CollectionPageBreadcrumb + ...ContentPageBreadcrumb + ...DestinationCityPageBreadcrumb + ...DestinationCountryPageBreadcrumb + ...DestinationOverviewPageBreadcrumb + ...HotelPageBreadcrumb + ...LoyaltyPageBreadcrumb + } + } + } +} + +fragment BreadcrumbsRefs on Breadcrumbs { + title + parentsConnection { + edges { + node { + __typename + ...AccountPageBreadcrumbRef + ...CampaignOverviewPageBreadcrumbRef + ...CampaignPageBreadcrumbRef + ...CollectionPageBreadcrumbRef + ...ContentPageBreadcrumbRef + ...DestinationCityPageBreadcrumbRef + ...DestinationCountryPageBreadcrumbRef + ...DestinationOverviewPageBreadcrumbRef + ...HotelPageBreadcrumbRef + ...LoyaltyPageBreadcrumbRef + } + } + } +} diff --git a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/Breadcrumbs.graphql.ts b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/Breadcrumbs.graphql.ts deleted file mode 100644 index b11fb87d9..000000000 --- a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/Breadcrumbs.graphql.ts +++ /dev/null @@ -1,108 +0,0 @@ -import { gql } from "graphql-tag" - -import { - AccountPageBreadcrumb, - AccountPageBreadcrumbRef, -} from "./AccountPage.graphql" -import { - CampaignOverviewPageBreadcrumb, - CampaignOverviewPageBreadcrumbRef, -} from "./CampaignOverviewPage.graphql" -import { - CampaignPageBreadcrumb, - CampaignPageBreadcrumbRef, -} from "./CampaignPage.graphql" -import { - CollectionPageBreadcrumb, - CollectionPageBreadcrumbRef, -} from "./CollectionPage.graphql" -import { - ContentPageBreadcrumb, - ContentPageBreadcrumbRef, -} from "./ContentPage.graphql" -import { - DestinationCityPageBreadcrumb, - DestinationCityPageBreadcrumbRef, -} from "./DestinationCityPage.graphql" -import { - DestinationCountryPageBreadcrumb, - DestinationCountryPageBreadcrumbRef, -} from "./DestinationCountryPage.graphql" -import { - DestinationOverviewPageBreadcrumb, - DestinationOverviewPageBreadcrumbRef, -} from "./DestinationOverviewPage.graphql" -import { - HotelPageBreadcrumb, - HotelPageBreadcrumbRef, -} from "./HotelPage.graphql" -import { - LoyaltyPageBreadcrumb, - LoyaltyPageBreadcrumbRef, -} from "./LoyaltyPage.graphql" - -export const Breadcrumbs = gql` - fragment Breadcrumbs on Breadcrumbs { - title - parentsConnection { - edges { - node { - __typename - ...AccountPageBreadcrumb - ...CampaignOverviewPageBreadcrumb - ...CampaignPageBreadcrumb - ...CollectionPageBreadcrumb - ...ContentPageBreadcrumb - ...DestinationCityPageBreadcrumb - ...DestinationCountryPageBreadcrumb - ...DestinationOverviewPageBreadcrumb - ...HotelPageBreadcrumb - ...LoyaltyPageBreadcrumb - } - } - } - } - ${AccountPageBreadcrumb} - ${CampaignOverviewPageBreadcrumb} - ${CampaignPageBreadcrumb} - ${CollectionPageBreadcrumb} - ${ContentPageBreadcrumb} - ${DestinationCityPageBreadcrumb} - ${DestinationCountryPageBreadcrumb} - ${DestinationOverviewPageBreadcrumb} - ${HotelPageBreadcrumb} - ${LoyaltyPageBreadcrumb} -` - -export const BreadcrumbsRefs = gql` - fragment BreadcrumbsRefs on Breadcrumbs { - title - parentsConnection { - edges { - node { - __typename - ...AccountPageBreadcrumbRef - ...CampaignOverviewPageBreadcrumbRef - ...CampaignPageBreadcrumbRef - ...CollectionPageBreadcrumbRef - ...ContentPageBreadcrumbRef - ...DestinationCityPageBreadcrumbRef - ...DestinationCountryPageBreadcrumbRef - ...DestinationOverviewPageBreadcrumbRef - ...HotelPageBreadcrumbRef - ...LoyaltyPageBreadcrumbRef - } - } - } - } - ${AccountPageBreadcrumbRef} - ${CampaignOverviewPageBreadcrumbRef} - ${CampaignPageBreadcrumbRef} - ${CollectionPageBreadcrumbRef} - ${ContentPageBreadcrumbRef} - ${DestinationCityPageBreadcrumbRef} - ${DestinationCountryPageBreadcrumbRef} - ${DestinationOverviewPageBreadcrumbRef} - ${HotelPageBreadcrumbRef} - ${LoyaltyPageBreadcrumbRef} -` diff --git a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/CampaignOverviewPage.graphql.ts b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/CampaignOverviewPage.graphql similarity index 59% rename from packages/trpc/lib/graphql/Fragments/Breadcrumbs/CampaignOverviewPage.graphql.ts rename to packages/trpc/lib/graphql/Fragments/Breadcrumbs/CampaignOverviewPage.graphql index 474cbe491..1f5e652b6 100644 --- a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/CampaignOverviewPage.graphql.ts +++ b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/CampaignOverviewPage.graphql @@ -1,8 +1,5 @@ -import { gql } from "graphql-tag" +#import "../System.graphql" -import { System } from "../System.graphql" - -export const CampaignOverviewPageBreadcrumb = gql` fragment CampaignOverviewPageBreadcrumb on CampaignOverviewPage { web { breadcrumbs { @@ -14,10 +11,7 @@ fragment CampaignOverviewPageBreadcrumb on CampaignOverviewPage { } url } -${System} -` -export const CampaignOverviewPageBreadcrumbRef = gql` fragment CampaignOverviewPageBreadcrumbRef on CampaignOverviewPage { web { breadcrumbs { @@ -28,5 +22,3 @@ fragment CampaignOverviewPageBreadcrumbRef on CampaignOverviewPage { ...System } } -${System} -` diff --git a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/CampaignPage.graphql.ts b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/CampaignPage.graphql similarity index 58% rename from packages/trpc/lib/graphql/Fragments/Breadcrumbs/CampaignPage.graphql.ts rename to packages/trpc/lib/graphql/Fragments/Breadcrumbs/CampaignPage.graphql index f114e18d3..2d4d3c312 100644 --- a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/CampaignPage.graphql.ts +++ b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/CampaignPage.graphql @@ -1,8 +1,5 @@ -import { gql } from "graphql-tag" +#import "../System.graphql" -import { System } from "../System.graphql" - -export const CampaignPageBreadcrumb = gql` fragment CampaignPageBreadcrumb on CampaignPage { web { breadcrumbs { @@ -14,10 +11,7 @@ fragment CampaignPageBreadcrumb on CampaignPage { } url } -${System} -` -export const CampaignPageBreadcrumbRef = gql` fragment CampaignPageBreadcrumbRef on CampaignPage { web { breadcrumbs { @@ -28,5 +22,3 @@ fragment CampaignPageBreadcrumbRef on CampaignPage { ...System } } -${System} -` diff --git a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/CollectionPage.graphql.ts b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/CollectionPage.graphql similarity index 58% rename from packages/trpc/lib/graphql/Fragments/Breadcrumbs/CollectionPage.graphql.ts rename to packages/trpc/lib/graphql/Fragments/Breadcrumbs/CollectionPage.graphql index c6c34592c..debb6b1e8 100644 --- a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/CollectionPage.graphql.ts +++ b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/CollectionPage.graphql @@ -1,8 +1,5 @@ -import { gql } from "graphql-tag" +#import "../System.graphql" -import { System } from "../System.graphql" - -export const CollectionPageBreadcrumb = gql` fragment CollectionPageBreadcrumb on CollectionPage { web { breadcrumbs { @@ -14,10 +11,7 @@ fragment CollectionPageBreadcrumb on CollectionPage { } url } -${System} -` -export const CollectionPageBreadcrumbRef = gql` fragment CollectionPageBreadcrumbRef on CollectionPage { web { breadcrumbs { @@ -28,5 +22,3 @@ fragment CollectionPageBreadcrumbRef on CollectionPage { ...System } } -${System} -` diff --git a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/ContentPage.graphql.ts b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/ContentPage.graphql similarity index 58% rename from packages/trpc/lib/graphql/Fragments/Breadcrumbs/ContentPage.graphql.ts rename to packages/trpc/lib/graphql/Fragments/Breadcrumbs/ContentPage.graphql index f1ebe47d0..4e2e88da7 100644 --- a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/ContentPage.graphql.ts +++ b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/ContentPage.graphql @@ -1,8 +1,5 @@ -import { gql } from "graphql-tag" +#import "../System.graphql" -import { System } from "../System.graphql" - -export const ContentPageBreadcrumb = gql` fragment ContentPageBreadcrumb on ContentPage { web { breadcrumbs { @@ -14,10 +11,7 @@ fragment ContentPageBreadcrumb on ContentPage { } url } -${System} -` -export const ContentPageBreadcrumbRef = gql` fragment ContentPageBreadcrumbRef on ContentPage { web { breadcrumbs { @@ -28,5 +22,3 @@ fragment ContentPageBreadcrumbRef on ContentPage { ...System } } -${System} -` diff --git a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/CurrentBlocksPage.graphql.ts b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/CurrentBlocksPage.graphql similarity index 61% rename from packages/trpc/lib/graphql/Fragments/Breadcrumbs/CurrentBlocksPage.graphql.ts rename to packages/trpc/lib/graphql/Fragments/Breadcrumbs/CurrentBlocksPage.graphql index 5b0e4e397..765eddb3f 100644 --- a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/CurrentBlocksPage.graphql.ts +++ b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/CurrentBlocksPage.graphql @@ -1,6 +1,3 @@ -import { gql } from "graphql-tag" - -export const CurrentBlocksPageBreadcrumbs = gql` fragment CurrentBlocksPageBreadcrumbs on CurrentBlocksPage { breadcrumbs { parents { @@ -10,4 +7,3 @@ fragment CurrentBlocksPageBreadcrumbs on CurrentBlocksPage { title } } -` diff --git a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/DestinationCityPage.graphql.ts b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/DestinationCityPage.graphql similarity index 59% rename from packages/trpc/lib/graphql/Fragments/Breadcrumbs/DestinationCityPage.graphql.ts rename to packages/trpc/lib/graphql/Fragments/Breadcrumbs/DestinationCityPage.graphql index 2ab166221..67cd5d764 100644 --- a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/DestinationCityPage.graphql.ts +++ b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/DestinationCityPage.graphql @@ -1,8 +1,5 @@ -import { gql } from "graphql-tag" +#import "../System.graphql" -import { System } from "../System.graphql" - -export const DestinationCityPageBreadcrumb = gql` fragment DestinationCityPageBreadcrumb on DestinationCityPage { web { breadcrumbs { @@ -14,10 +11,7 @@ fragment DestinationCityPageBreadcrumb on DestinationCityPage { } url } -${System} -` -export const DestinationCityPageBreadcrumbRef = gql` fragment DestinationCityPageBreadcrumbRef on DestinationCityPage { web { breadcrumbs { @@ -28,5 +22,3 @@ fragment DestinationCityPageBreadcrumbRef on DestinationCityPage { ...System } } -${System} -` diff --git a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/DestinationCountryPage.graphql.ts b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/DestinationCountryPage.graphql similarity index 59% rename from packages/trpc/lib/graphql/Fragments/Breadcrumbs/DestinationCountryPage.graphql.ts rename to packages/trpc/lib/graphql/Fragments/Breadcrumbs/DestinationCountryPage.graphql index 2010c7408..1a856cf09 100644 --- a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/DestinationCountryPage.graphql.ts +++ b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/DestinationCountryPage.graphql @@ -1,8 +1,5 @@ -import { gql } from "graphql-tag" +#import "../System.graphql" -import { System } from "../System.graphql" - -export const DestinationCountryPageBreadcrumb = gql` fragment DestinationCountryPageBreadcrumb on DestinationCountryPage { web { breadcrumbs { @@ -14,10 +11,7 @@ fragment DestinationCountryPageBreadcrumb on DestinationCountryPage { } url } -${System} -` -export const DestinationCountryPageBreadcrumbRef = gql` fragment DestinationCountryPageBreadcrumbRef on DestinationCountryPage { web { breadcrumbs { @@ -28,5 +22,3 @@ fragment DestinationCountryPageBreadcrumbRef on DestinationCountryPage { ...System } } -${System} -` diff --git a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/DestinationOverviewPage.graphql.ts b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/DestinationOverviewPage.graphql similarity index 59% rename from packages/trpc/lib/graphql/Fragments/Breadcrumbs/DestinationOverviewPage.graphql.ts rename to packages/trpc/lib/graphql/Fragments/Breadcrumbs/DestinationOverviewPage.graphql index 05dd8202c..21dd61dbb 100644 --- a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/DestinationOverviewPage.graphql.ts +++ b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/DestinationOverviewPage.graphql @@ -1,8 +1,5 @@ -import { gql } from "graphql-tag" +#import "../System.graphql" -import { System } from "../System.graphql" - -export const DestinationOverviewPageBreadcrumb = gql` fragment DestinationOverviewPageBreadcrumb on DestinationOverviewPage { web { breadcrumbs { @@ -14,10 +11,7 @@ fragment DestinationOverviewPageBreadcrumb on DestinationOverviewPage { } url } -${System} -` -export const DestinationOverviewPageBreadcrumbRef = gql` fragment DestinationOverviewPageBreadcrumbRef on DestinationOverviewPage { web { breadcrumbs { @@ -28,5 +22,3 @@ fragment DestinationOverviewPageBreadcrumbRef on DestinationOverviewPage { ...System } } -${System} -` diff --git a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/HotelPage.graphql.ts b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/HotelPage.graphql similarity index 58% rename from packages/trpc/lib/graphql/Fragments/Breadcrumbs/HotelPage.graphql.ts rename to packages/trpc/lib/graphql/Fragments/Breadcrumbs/HotelPage.graphql index d7f355569..1e20f3513 100644 --- a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/HotelPage.graphql.ts +++ b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/HotelPage.graphql @@ -1,8 +1,5 @@ -import { gql } from "graphql-tag" +#import "../System.graphql" -import { System } from "../System.graphql" - -export const HotelPageBreadcrumb = gql` fragment HotelPageBreadcrumb on HotelPage { web { breadcrumbs { @@ -14,10 +11,7 @@ fragment HotelPageBreadcrumb on HotelPage { } url } -${System} -` -export const HotelPageBreadcrumbRef = gql` fragment HotelPageBreadcrumbRef on HotelPage { web { breadcrumbs { @@ -28,5 +22,3 @@ fragment HotelPageBreadcrumbRef on HotelPage { ...System } } -${System} -` diff --git a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/LoyaltyPage.graphql.ts b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/LoyaltyPage.graphql similarity index 58% rename from packages/trpc/lib/graphql/Fragments/Breadcrumbs/LoyaltyPage.graphql.ts rename to packages/trpc/lib/graphql/Fragments/Breadcrumbs/LoyaltyPage.graphql index a1616c815..5386bc7ef 100644 --- a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/LoyaltyPage.graphql.ts +++ b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/LoyaltyPage.graphql @@ -1,8 +1,5 @@ -import { gql } from "graphql-tag" +#import "../System.graphql" -import { System } from "../System.graphql" - -export const LoyaltyPageBreadcrumb = gql` fragment LoyaltyPageBreadcrumb on LoyaltyPage { web { breadcrumbs { @@ -14,10 +11,7 @@ fragment LoyaltyPageBreadcrumb on LoyaltyPage { } url } -${System} -` -export const LoyaltyPageBreadcrumbRef = gql` fragment LoyaltyPageBreadcrumbRef on LoyaltyPage { web { breadcrumbs { @@ -28,5 +22,3 @@ fragment LoyaltyPageBreadcrumbRef on LoyaltyPage { ...System } } -${System} -` diff --git a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/PromoCampaignPage.graphql.ts b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/PromoCampaignPage.graphql similarity index 58% rename from packages/trpc/lib/graphql/Fragments/Breadcrumbs/PromoCampaignPage.graphql.ts rename to packages/trpc/lib/graphql/Fragments/Breadcrumbs/PromoCampaignPage.graphql index d2050bb7a..e8b4af0b2 100644 --- a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/PromoCampaignPage.graphql.ts +++ b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/PromoCampaignPage.graphql @@ -1,8 +1,5 @@ -import { gql } from "graphql-tag" +#import "../System.graphql" -import { System } from "../System.graphql" - -export const PromoCampaignPageBreadcrumb = gql` fragment PromoCampaignPageBreadcrumb on PromoCampaignPage { web { breadcrumbs { @@ -14,10 +11,7 @@ fragment PromoCampaignPageBreadcrumb on PromoCampaignPage { } url } -${System} -` -export const PromoCampaignPageBreadcrumbRef = gql` fragment PromoCampaignPageBreadcrumbRef on PromoCampaignPage { web { breadcrumbs { @@ -28,5 +22,3 @@ fragment PromoCampaignPageBreadcrumbRef on PromoCampaignPage { ...System } } -${System} -` diff --git a/packages/trpc/lib/graphql/Fragments/CampaignOverviewPage/NavigationLinks.graphql b/packages/trpc/lib/graphql/Fragments/CampaignOverviewPage/NavigationLinks.graphql new file mode 100644 index 000000000..f204a781a --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/CampaignOverviewPage/NavigationLinks.graphql @@ -0,0 +1,74 @@ +#import "../PageLink/AccountPageLink.graphql" +#import "../PageLink/CampaignOverviewPageLink.graphql" +#import "../PageLink/CampaignPageLink.graphql" +#import "../PageLink/CollectionPageLink.graphql" +#import "../PageLink/ContentPageLink.graphql" +#import "../PageLink/DestinationCityPageLink.graphql" +#import "../PageLink/DestinationCountryPageLink.graphql" +#import "../PageLink/DestinationOverviewPageLink.graphql" +#import "../PageLink/HotelPageLink.graphql" +#import "../PageLink/LoyaltyPageLink.graphql" +#import "../PageLink/StartPageLink.graphql" +#import "../PageLink/PromoCampaignPageLink.graphql" + +#import "../AccountPage/Ref.graphql" +#import "../CampaignOverviewPage/Ref.graphql" +#import "../CampaignPage/Ref.graphql" +#import "../CollectionPage/Ref.graphql" +#import "../ContentPage/Ref.graphql" +#import "../DestinationCityPage/Ref.graphql" +#import "../DestinationCountryPage/Ref.graphql" +#import "../DestinationOverviewPage/Ref.graphql" +#import "../HotelPage/Ref.graphql" +#import "../LoyaltyPage/Ref.graphql" +#import "../StartPage/Ref.graphql" +#import "../PromoCampaignPage/Ref.graphql" + +fragment NavigationLinks_CampaignOverviewPage on CampaignOverviewPageHeader { + navigation_links { + title + linkConnection { + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + } +} + +fragment NavigationLinksRef_CampaignOverviewPage on CampaignOverviewPageHeader { + navigation_links { + linkConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } +} diff --git a/packages/trpc/lib/graphql/Fragments/CampaignOverviewPage/NavigationLinks.graphql.ts b/packages/trpc/lib/graphql/Fragments/CampaignOverviewPage/NavigationLinks.graphql.ts deleted file mode 100644 index 890925293..000000000 --- a/packages/trpc/lib/graphql/Fragments/CampaignOverviewPage/NavigationLinks.graphql.ts +++ /dev/null @@ -1,103 +0,0 @@ -import { gql } from "graphql-tag" - -import { AccountPageRef } from "../AccountPage/Ref.graphql" -import { CampaignOverviewPageRef } from "../CampaignOverviewPage/Ref.graphql" -import { CampaignPageRef } from "../CampaignPage/Ref.graphql" -import { CollectionPageRef } from "../CollectionPage/Ref.graphql" -import { ContentPageRef } from "../ContentPage/Ref.graphql" -import { DestinationCityPageRef } from "../DestinationCityPage/Ref.graphql" -import { DestinationCountryPageRef } from "../DestinationCountryPage/Ref.graphql" -import { DestinationOverviewPageRef } from "../DestinationOverviewPage/Ref.graphql" -import { HotelPageRef } from "../HotelPage/Ref.graphql" -import { LoyaltyPageRef } from "../LoyaltyPage/Ref.graphql" -import { AccountPageLink } from "../PageLink/AccountPageLink.graphql" -import { CampaignOverviewPageLink } from "../PageLink/CampaignOverviewPageLink.graphql" -import { CampaignPageLink } from "../PageLink/CampaignPageLink.graphql" -import { CollectionPageLink } from "../PageLink/CollectionPageLink.graphql" -import { ContentPageLink } from "../PageLink/ContentPageLink.graphql" -import { DestinationCityPageLink } from "../PageLink/DestinationCityPageLink.graphql" -import { DestinationCountryPageLink } from "../PageLink/DestinationCountryPageLink.graphql" -import { DestinationOverviewPageLink } from "../PageLink/DestinationOverviewPageLink.graphql" -import { HotelPageLink } from "../PageLink/HotelPageLink.graphql" -import { LoyaltyPageLink } from "../PageLink/LoyaltyPageLink.graphql" -import { PromoCampaignPageLink } from "../PageLink/PromoCampaignPageLink.graphql" -import { StartPageLink } from "../PageLink/StartPageLink.graphql" -import { PromoCampaignPageRef } from "../PromoCampaignPage/Ref.graphql" -import { StartPageRef } from "../StartPage/Ref.graphql" - -export const NavigationLinks_CampaignOverviewPage = gql` - fragment NavigationLinks_CampaignOverviewPage on CampaignOverviewPageHeader { - navigation_links { - title - 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 NavigationLinksRef_CampaignOverviewPage = gql` - fragment NavigationLinksRef_CampaignOverviewPage on CampaignOverviewPageHeader { - navigation_links { - linkConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - } - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${CollectionPageRef} - ${ContentPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${StartPageRef} - ${PromoCampaignPageRef} -` diff --git a/packages/trpc/lib/graphql/Fragments/CampaignOverviewPage/Ref.graphql b/packages/trpc/lib/graphql/Fragments/CampaignOverviewPage/Ref.graphql new file mode 100644 index 000000000..d35af3917 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/CampaignOverviewPage/Ref.graphql @@ -0,0 +1,7 @@ +#import "../System.graphql" + +fragment CampaignOverviewPageRef on CampaignOverviewPage { + system { + ...System + } +} diff --git a/packages/trpc/lib/graphql/Fragments/CampaignOverviewPage/Ref.graphql.ts b/packages/trpc/lib/graphql/Fragments/CampaignOverviewPage/Ref.graphql.ts deleted file mode 100644 index 94f32b366..000000000 --- a/packages/trpc/lib/graphql/Fragments/CampaignOverviewPage/Ref.graphql.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { gql } from "graphql-tag" - -import { System } from "../System.graphql" - -export const CampaignOverviewPageRef = gql` -fragment CampaignOverviewPageRef on CampaignOverviewPage { - system { - ...System - } -} -${System} -` diff --git a/packages/trpc/lib/graphql/Fragments/CampaignOverviewPage/TopCampaign.graphql b/packages/trpc/lib/graphql/Fragments/CampaignOverviewPage/TopCampaign.graphql new file mode 100644 index 000000000..ea60f5142 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/CampaignOverviewPage/TopCampaign.graphql @@ -0,0 +1,23 @@ +#import "../System.graphql" + +#import "../Blocks/HotelListing.graphql" +#import "../CampaignPage/IncludedHotels.graphql" +#import "../CampaignPage/Hero.graphql" + +fragment TopCampaign on CampaignPage { + included_hotels { + ...CampaignPageIncludedHotels + } + blocks { + __typename + ...HotelListing_CampaignPage + } + url + ...Hero_CampaignPage +} + +fragment TopCampaignRef on CampaignPage { + system { + ...System + } +} diff --git a/packages/trpc/lib/graphql/Fragments/CampaignOverviewPage/TopCampaign.graphql.ts b/packages/trpc/lib/graphql/Fragments/CampaignOverviewPage/TopCampaign.graphql.ts deleted file mode 100644 index 66a6164eb..000000000 --- a/packages/trpc/lib/graphql/Fragments/CampaignOverviewPage/TopCampaign.graphql.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { gql } from "graphql-tag" - -import { HotelListing_CampaignPage } from "../Blocks/HotelListing.graphql" -import { Hero_CampaignPage } from "../CampaignPage/Hero.graphql" -import { CampaignPageIncludedHotels } from "../CampaignPage/IncludedHotels.graphql" -import { System } from "../System.graphql" - -export const TopCampaign = gql` - fragment TopCampaign on CampaignPage { - included_hotels { - ...CampaignPageIncludedHotels - } - blocks { - __typename - ...HotelListing_CampaignPage - } - url - ...Hero_CampaignPage - } - ${HotelListing_CampaignPage} - ${CampaignPageIncludedHotels} - ${Hero_CampaignPage} -` - -export const TopCampaignRef = gql` - fragment TopCampaignRef on CampaignPage { - system { - ...System - } - } - ${System} -` diff --git a/packages/trpc/lib/graphql/Fragments/CampaignPage/Hero.graphql b/packages/trpc/lib/graphql/Fragments/CampaignPage/Hero.graphql new file mode 100644 index 000000000..f63ea3f55 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/CampaignPage/Hero.graphql @@ -0,0 +1,90 @@ +#import "../PageLink/AccountPageLink.graphql" +#import "../PageLink/CampaignOverviewPageLink.graphql" +#import "../PageLink/CampaignPageLink.graphql" +#import "../PageLink/CollectionPageLink.graphql" +#import "../PageLink/ContentPageLink.graphql" +#import "../PageLink/DestinationCityPageLink.graphql" +#import "../PageLink/DestinationCountryPageLink.graphql" +#import "../PageLink/DestinationOverviewPageLink.graphql" +#import "../PageLink/HotelPageLink.graphql" +#import "../PageLink/LoyaltyPageLink.graphql" +#import "../PageLink/StartPageLink.graphql" +#import "../PageLink/PromoCampaignPageLink.graphql" + +#import "../AccountPage/Ref.graphql" +#import "../CampaignOverviewPage/Ref.graphql" +#import "../CampaignPage/Ref.graphql" +#import "../CollectionPage/Ref.graphql" +#import "../ContentPage/Ref.graphql" +#import "../DestinationCityPage/Ref.graphql" +#import "../DestinationCountryPage/Ref.graphql" +#import "../DestinationOverviewPage/Ref.graphql" +#import "../HotelPage/Ref.graphql" +#import "../LoyaltyPage/Ref.graphql" +#import "../StartPage/Ref.graphql" +#import "../PromoCampaignPage/Ref.graphql" + +fragment Hero_CampaignPage on CampaignPage { + hero { + image + heading + theme + benefits + rate_text { + bold_text + text + } + campaign_text { + text + bold_text + } + button { + cta + linkConnection { + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + } + } +} + +fragment HeroRef_CampaignPage on CampaignPage { + hero { + button { + linkConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + } +} diff --git a/packages/trpc/lib/graphql/Fragments/CampaignPage/Hero.graphql.ts b/packages/trpc/lib/graphql/Fragments/CampaignPage/Hero.graphql.ts deleted file mode 100644 index 7063c987f..000000000 --- a/packages/trpc/lib/graphql/Fragments/CampaignPage/Hero.graphql.ts +++ /dev/null @@ -1,119 +0,0 @@ -import { gql } from "graphql-tag" - -import { AccountPageRef } from "../AccountPage/Ref.graphql" -import { CampaignOverviewPageRef } from "../CampaignOverviewPage/Ref.graphql" -import { CampaignPageRef } from "../CampaignPage/Ref.graphql" -import { CollectionPageRef } from "../CollectionPage/Ref.graphql" -import { ContentPageRef } from "../ContentPage/Ref.graphql" -import { DestinationCityPageRef } from "../DestinationCityPage/Ref.graphql" -import { DestinationCountryPageRef } from "../DestinationCountryPage/Ref.graphql" -import { DestinationOverviewPageRef } from "../DestinationOverviewPage/Ref.graphql" -import { HotelPageRef } from "../HotelPage/Ref.graphql" -import { LoyaltyPageRef } from "../LoyaltyPage/Ref.graphql" -import { AccountPageLink } from "../PageLink/AccountPageLink.graphql" -import { CampaignOverviewPageLink } from "../PageLink/CampaignOverviewPageLink.graphql" -import { CampaignPageLink } from "../PageLink/CampaignPageLink.graphql" -import { CollectionPageLink } from "../PageLink/CollectionPageLink.graphql" -import { ContentPageLink } from "../PageLink/ContentPageLink.graphql" -import { DestinationCityPageLink } from "../PageLink/DestinationCityPageLink.graphql" -import { DestinationCountryPageLink } from "../PageLink/DestinationCountryPageLink.graphql" -import { DestinationOverviewPageLink } from "../PageLink/DestinationOverviewPageLink.graphql" -import { HotelPageLink } from "../PageLink/HotelPageLink.graphql" -import { LoyaltyPageLink } from "../PageLink/LoyaltyPageLink.graphql" -import { PromoCampaignPageLink } from "../PageLink/PromoCampaignPageLink.graphql" -import { StartPageLink } from "../PageLink/StartPageLink.graphql" -import { PromoCampaignPageRef } from "../PromoCampaignPage/Ref.graphql" -import { StartPageRef } from "../StartPage/Ref.graphql" - -export const Hero_CampaignPage = gql` - fragment Hero_CampaignPage on CampaignPage { - hero { - image - heading - theme - benefits - rate_text { - bold_text - text - } - campaign_text { - text - bold_text - } - button { - cta - 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 HeroRef_CampaignPage = gql` - fragment HeroRef_CampaignPage on CampaignPage { - hero { - button { - linkConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - } - } - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${CollectionPageRef} - ${ContentPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${StartPageRef} - ${PromoCampaignPageRef} -` diff --git a/packages/trpc/lib/graphql/Fragments/CampaignPage/IncludedHotels.graphql b/packages/trpc/lib/graphql/Fragments/CampaignPage/IncludedHotels.graphql new file mode 100644 index 000000000..9360bd956 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/CampaignPage/IncludedHotels.graphql @@ -0,0 +1,45 @@ +fragment CampaignPageIncludedHotels on CampaignPageIncludedHotels { + list_1Connection { + edges { + node { + ... on HotelPage { + hotel_page_id + } + } + } + } + list_2Connection { + edges { + node { + ... on HotelPage { + hotel_page_id + } + } + } + } +} + +fragment CampaignPageIncludedHotelsRef on CampaignPageIncludedHotels { + list_1Connection { + edges { + node { + ... on HotelPage { + system { + ...System + } + } + } + } + } + list_2Connection { + edges { + node { + ... on HotelPage { + system { + ...System + } + } + } + } + } +} diff --git a/packages/trpc/lib/graphql/Fragments/CampaignPage/IncludedHotels.graphql.ts b/packages/trpc/lib/graphql/Fragments/CampaignPage/IncludedHotels.graphql.ts deleted file mode 100644 index a7c13d162..000000000 --- a/packages/trpc/lib/graphql/Fragments/CampaignPage/IncludedHotels.graphql.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { gql } from "graphql-tag" - -import { System } from "../System.graphql" - -export const CampaignPageIncludedHotels = gql` - fragment CampaignPageIncludedHotels on CampaignPageIncludedHotels { - list_1Connection { - edges { - node { - ... on HotelPage { - hotel_page_id - } - } - } - } - list_2Connection { - edges { - node { - ... on HotelPage { - hotel_page_id - } - } - } - } - } -` - -export const CampaignPageIncludedHotelsRef = gql` - fragment CampaignPageIncludedHotelsRef on CampaignPageIncludedHotels { - list_1Connection { - edges { - node { - ... on HotelPage { - system { - ...System - } - } - } - } - } - list_2Connection { - edges { - node { - ... on HotelPage { - system { - ...System - } - } - } - } - } - } - ${System} -` diff --git a/packages/trpc/lib/graphql/Fragments/CampaignPage/Ref.graphql b/packages/trpc/lib/graphql/Fragments/CampaignPage/Ref.graphql new file mode 100644 index 000000000..9e3294634 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/CampaignPage/Ref.graphql @@ -0,0 +1,7 @@ +#import "../System.graphql" + +fragment CampaignPageRef on CampaignPage { + system { + ...System + } +} diff --git a/packages/trpc/lib/graphql/Fragments/CampaignPage/Ref.graphql.ts b/packages/trpc/lib/graphql/Fragments/CampaignPage/Ref.graphql.ts deleted file mode 100644 index e51082673..000000000 --- a/packages/trpc/lib/graphql/Fragments/CampaignPage/Ref.graphql.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { gql } from "graphql-tag" - -import { System } from "../System.graphql" - -export const CampaignPageRef = gql` -fragment CampaignPageRef on CampaignPage { - system { - ...System - } -} -${System} -` diff --git a/packages/trpc/lib/graphql/Fragments/CollectionPage/NavigationLinks.graphql b/packages/trpc/lib/graphql/Fragments/CollectionPage/NavigationLinks.graphql new file mode 100644 index 000000000..fba25dad8 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/CollectionPage/NavigationLinks.graphql @@ -0,0 +1,74 @@ +#import "../PageLink/AccountPageLink.graphql" +#import "../PageLink/CampaignOverviewPageLink.graphql" +#import "../PageLink/CampaignPageLink.graphql" +#import "../PageLink/CollectionPageLink.graphql" +#import "../PageLink/ContentPageLink.graphql" +#import "../PageLink/DestinationCityPageLink.graphql" +#import "../PageLink/DestinationCountryPageLink.graphql" +#import "../PageLink/DestinationOverviewPageLink.graphql" +#import "../PageLink/HotelPageLink.graphql" +#import "../PageLink/LoyaltyPageLink.graphql" +#import "../PageLink/StartPageLink.graphql" +#import "../PageLink/PromoCampaignPageLink.graphql" + +#import "../AccountPage/Ref.graphql" +#import "../CampaignOverviewPage/Ref.graphql" +#import "../CampaignPage/Ref.graphql" +#import "../CollectionPage/Ref.graphql" +#import "../ContentPage/Ref.graphql" +#import "../DestinationCityPage/Ref.graphql" +#import "../DestinationCountryPage/Ref.graphql" +#import "../DestinationOverviewPage/Ref.graphql" +#import "../HotelPage/Ref.graphql" +#import "../LoyaltyPage/Ref.graphql" +#import "../StartPage/Ref.graphql" +#import "../PromoCampaignPage/Ref.graphql" + +fragment NavigationLinks_CollectionPage on CollectionPageHeader { + navigation_links { + title + linkConnection { + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + } +} + +fragment NavigationLinksRef_CollectionPage on CollectionPageHeader { + navigation_links { + linkConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } +} diff --git a/packages/trpc/lib/graphql/Fragments/CollectionPage/NavigationLinks.graphql.ts b/packages/trpc/lib/graphql/Fragments/CollectionPage/NavigationLinks.graphql.ts deleted file mode 100644 index 18ba56d20..000000000 --- a/packages/trpc/lib/graphql/Fragments/CollectionPage/NavigationLinks.graphql.ts +++ /dev/null @@ -1,103 +0,0 @@ -import { gql } from "graphql-tag" - -import { AccountPageRef } from "../AccountPage/Ref.graphql" -import { CampaignOverviewPageRef } from "../CampaignOverviewPage/Ref.graphql" -import { CampaignPageRef } from "../CampaignPage/Ref.graphql" -import { CollectionPageRef } from "../CollectionPage/Ref.graphql" -import { ContentPageRef } from "../ContentPage/Ref.graphql" -import { DestinationCityPageRef } from "../DestinationCityPage/Ref.graphql" -import { DestinationCountryPageRef } from "../DestinationCountryPage/Ref.graphql" -import { DestinationOverviewPageRef } from "../DestinationOverviewPage/Ref.graphql" -import { HotelPageRef } from "../HotelPage/Ref.graphql" -import { LoyaltyPageRef } from "../LoyaltyPage/Ref.graphql" -import { AccountPageLink } from "../PageLink/AccountPageLink.graphql" -import { CampaignOverviewPageLink } from "../PageLink/CampaignOverviewPageLink.graphql" -import { CampaignPageLink } from "../PageLink/CampaignPageLink.graphql" -import { CollectionPageLink } from "../PageLink/CollectionPageLink.graphql" -import { ContentPageLink } from "../PageLink/ContentPageLink.graphql" -import { DestinationCityPageLink } from "../PageLink/DestinationCityPageLink.graphql" -import { DestinationCountryPageLink } from "../PageLink/DestinationCountryPageLink.graphql" -import { DestinationOverviewPageLink } from "../PageLink/DestinationOverviewPageLink.graphql" -import { HotelPageLink } from "../PageLink/HotelPageLink.graphql" -import { LoyaltyPageLink } from "../PageLink/LoyaltyPageLink.graphql" -import { PromoCampaignPageLink } from "../PageLink/PromoCampaignPageLink.graphql" -import { StartPageLink } from "../PageLink/StartPageLink.graphql" -import { PromoCampaignPageRef } from "../PromoCampaignPage/Ref.graphql" -import { StartPageRef } from "../StartPage/Ref.graphql" - -export const NavigationLinks_CollectionPage = gql` - fragment NavigationLinks_CollectionPage on CollectionPageHeader { - navigation_links { - title - 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 NavigationLinksRef_CollectionPage = gql` - fragment NavigationLinksRef_CollectionPage on CollectionPageHeader { - navigation_links { - linkConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - } - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${CollectionPageRef} - ${ContentPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${StartPageRef} - ${PromoCampaignPageRef} -` diff --git a/packages/trpc/lib/graphql/Fragments/CollectionPage/Ref.graphql b/packages/trpc/lib/graphql/Fragments/CollectionPage/Ref.graphql new file mode 100644 index 000000000..dd746f5f4 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/CollectionPage/Ref.graphql @@ -0,0 +1,7 @@ +#import "../System.graphql" + +fragment CollectionPageRef on CollectionPage { + system { + ...System + } +} diff --git a/packages/trpc/lib/graphql/Fragments/CollectionPage/Ref.graphql.ts b/packages/trpc/lib/graphql/Fragments/CollectionPage/Ref.graphql.ts deleted file mode 100644 index 8013370c6..000000000 --- a/packages/trpc/lib/graphql/Fragments/CollectionPage/Ref.graphql.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { gql } from "graphql-tag" - -import { System } from "../System.graphql" - -export const CollectionPageRef = gql` -fragment CollectionPageRef on CollectionPage { - system { - ...System - } -} -${System} -` diff --git a/packages/trpc/lib/graphql/Fragments/CollectionPage/TopPrimaryButton.graphql b/packages/trpc/lib/graphql/Fragments/CollectionPage/TopPrimaryButton.graphql new file mode 100644 index 000000000..47dad81cc --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/CollectionPage/TopPrimaryButton.graphql @@ -0,0 +1,79 @@ +#import "../PageLink/AccountPageLink.graphql" +#import "../PageLink/CampaignOverviewPageLink.graphql" +#import "../PageLink/CampaignPageLink.graphql" +#import "../PageLink/CollectionPageLink.graphql" +#import "../PageLink/ContentPageLink.graphql" +#import "../PageLink/DestinationCityPageLink.graphql" +#import "../PageLink/DestinationCountryPageLink.graphql" +#import "../PageLink/DestinationOverviewPageLink.graphql" +#import "../PageLink/HotelPageLink.graphql" +#import "../PageLink/LoyaltyPageLink.graphql" +#import "../PageLink/StartPageLink.graphql" +#import "../PageLink/PromoCampaignPageLink.graphql" + +#import "../AccountPage/Ref.graphql" +#import "../CampaignOverviewPage/Ref.graphql" +#import "../CampaignPage/Ref.graphql" +#import "../CollectionPage/Ref.graphql" +#import "../ContentPage/Ref.graphql" +#import "../DestinationCityPage/Ref.graphql" +#import "../DestinationCountryPage/Ref.graphql" +#import "../DestinationOverviewPage/Ref.graphql" +#import "../HotelPage/Ref.graphql" +#import "../LoyaltyPage/Ref.graphql" +#import "../StartPage/Ref.graphql" +#import "../PromoCampaignPage/Ref.graphql" + +fragment TopPrimaryButton_CollectionPage on CollectionPageHeader { + top_primary_button { + title + is_contentstack_link + linkConnection { + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + external_link { + href + title + } + } +} + +fragment TopPrimaryButtonRef_CollectionPage on CollectionPageHeader { + top_primary_button { + linkConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } +} diff --git a/packages/trpc/lib/graphql/Fragments/CollectionPage/TopPrimaryButton.graphql.ts b/packages/trpc/lib/graphql/Fragments/CollectionPage/TopPrimaryButton.graphql.ts deleted file mode 100644 index 9a0d18d78..000000000 --- a/packages/trpc/lib/graphql/Fragments/CollectionPage/TopPrimaryButton.graphql.ts +++ /dev/null @@ -1,108 +0,0 @@ -import { gql } from "graphql-tag" - -import { AccountPageRef } from "../AccountPage/Ref.graphql" -import { CampaignOverviewPageRef } from "../CampaignOverviewPage/Ref.graphql" -import { CampaignPageRef } from "../CampaignPage/Ref.graphql" -import { CollectionPageRef } from "../CollectionPage/Ref.graphql" -import { ContentPageRef } from "../ContentPage/Ref.graphql" -import { DestinationCityPageRef } from "../DestinationCityPage/Ref.graphql" -import { DestinationCountryPageRef } from "../DestinationCountryPage/Ref.graphql" -import { DestinationOverviewPageRef } from "../DestinationOverviewPage/Ref.graphql" -import { HotelPageRef } from "../HotelPage/Ref.graphql" -import { LoyaltyPageRef } from "../LoyaltyPage/Ref.graphql" -import { AccountPageLink } from "../PageLink/AccountPageLink.graphql" -import { CampaignOverviewPageLink } from "../PageLink/CampaignOverviewPageLink.graphql" -import { CampaignPageLink } from "../PageLink/CampaignPageLink.graphql" -import { CollectionPageLink } from "../PageLink/CollectionPageLink.graphql" -import { ContentPageLink } from "../PageLink/ContentPageLink.graphql" -import { DestinationCityPageLink } from "../PageLink/DestinationCityPageLink.graphql" -import { DestinationCountryPageLink } from "../PageLink/DestinationCountryPageLink.graphql" -import { DestinationOverviewPageLink } from "../PageLink/DestinationOverviewPageLink.graphql" -import { HotelPageLink } from "../PageLink/HotelPageLink.graphql" -import { LoyaltyPageLink } from "../PageLink/LoyaltyPageLink.graphql" -import { PromoCampaignPageLink } from "../PageLink/PromoCampaignPageLink.graphql" -import { StartPageLink } from "../PageLink/StartPageLink.graphql" -import { PromoCampaignPageRef } from "../PromoCampaignPage/Ref.graphql" -import { StartPageRef } from "../StartPage/Ref.graphql" - -export const TopPrimaryButton_CollectionPage = gql` - fragment TopPrimaryButton_CollectionPage on CollectionPageHeader { - top_primary_button { - title - is_contentstack_link - linkConnection { - edges { - node { - __typename - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - external_link { - href - title - } - } - } - ${AccountPageLink} - ${CampaignOverviewPageLink} - ${CampaignPageLink} - ${CollectionPageLink} - ${ContentPageLink} - ${DestinationCityPageLink} - ${DestinationCountryPageLink} - ${DestinationOverviewPageLink} - ${HotelPageLink} - ${LoyaltyPageLink} - ${StartPageLink} - ${PromoCampaignPageLink} -` - -export const TopPrimaryButtonRef_CollectionPage = gql` - fragment TopPrimaryButtonRef_CollectionPage on CollectionPageHeader { - top_primary_button { - linkConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - } - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${CollectionPageRef} - ${ContentPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${StartPageRef} - ${PromoCampaignPageRef} -` diff --git a/packages/trpc/lib/graphql/Fragments/Contact.graphql b/packages/trpc/lib/graphql/Fragments/Contact.graphql new file mode 100644 index 000000000..bd2068829 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Contact.graphql @@ -0,0 +1,52 @@ +fragment ContactExtraInfo on ContactBlockSectionsExtraInfo { + extra_info { + text + } +} + +fragment ContactMailingAddress on ContactBlockSectionsMailingAddress { + mailing_address { + city + country + name + street + zip + } +} + +fragment ContactPhone on ContactBlockSectionsPhone { + phone { + number + title + } +} + +fragment ContactTitle on ContactBlockSectionsTitle { + title { + text + } +} + +fragment ContactVisitingAddress on ContactBlockSectionsVisitingAddress { + visiting_address { + city + country + street + zip + } +} + +fragment Contact on ContactBlock { + sections { + __typename + ...ContactExtraInfo + ...ContactMailingAddress + ...ContactPhone + ...ContactTitle + ...ContactVisitingAddress + } + system { + locale + uid + } +} diff --git a/packages/trpc/lib/graphql/Fragments/Contact.graphql.ts b/packages/trpc/lib/graphql/Fragments/Contact.graphql.ts deleted file mode 100644 index 92f393a37..000000000 --- a/packages/trpc/lib/graphql/Fragments/Contact.graphql.ts +++ /dev/null @@ -1,71 +0,0 @@ -import { gql } from "graphql-tag" - -export const ContactExtraInfo = gql` - fragment ContactExtraInfo on ContactBlockSectionsExtraInfo { - extra_info { - text - } - } -` - -export const ContactMailingAddress = gql` - fragment ContactMailingAddress on ContactBlockSectionsMailingAddress { - mailing_address { - city - country - name - street - zip - } - } -` - -export const ContactPhone = gql` - fragment ContactPhone on ContactBlockSectionsPhone { - phone { - number - title - } - } -` - -export const ContactTitle = gql` - fragment ContactTitle on ContactBlockSectionsTitle { - title { - text - } - } -` - -export const ContactVisitingAddress = gql` - fragment ContactVisitingAddress on ContactBlockSectionsVisitingAddress { - visiting_address { - city - country - street - zip - } - } -` - -export const Contact = gql` - fragment Contact on ContactBlock { - sections { - __typename - ...ContactExtraInfo - ...ContactMailingAddress - ...ContactPhone - ...ContactTitle - ...ContactVisitingAddress - } - system { - locale - uid - } - } - ${ContactExtraInfo} - ${ContactMailingAddress} - ${ContactPhone} - ${ContactTitle} - ${ContactVisitingAddress} -` diff --git a/packages/trpc/lib/graphql/Fragments/ContentPage/NavigationLinks.graphql b/packages/trpc/lib/graphql/Fragments/ContentPage/NavigationLinks.graphql new file mode 100644 index 000000000..0a69bd7bb --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/ContentPage/NavigationLinks.graphql @@ -0,0 +1,74 @@ +#import "../PageLink/AccountPageLink.graphql" +#import "../PageLink/CampaignOverviewPageLink.graphql" +#import "../PageLink/CampaignPageLink.graphql" +#import "../PageLink/CollectionPageLink.graphql" +#import "../PageLink/ContentPageLink.graphql" +#import "../PageLink/DestinationCityPageLink.graphql" +#import "../PageLink/DestinationCountryPageLink.graphql" +#import "../PageLink/DestinationOverviewPageLink.graphql" +#import "../PageLink/HotelPageLink.graphql" +#import "../PageLink/LoyaltyPageLink.graphql" +#import "../PageLink/StartPageLink.graphql" +#import "../PageLink/PromoCampaignPageLink.graphql" + +#import "../AccountPage/Ref.graphql" +#import "../CampaignOverviewPage/Ref.graphql" +#import "../CampaignPage/Ref.graphql" +#import "../CollectionPage/Ref.graphql" +#import "../ContentPage/Ref.graphql" +#import "../DestinationCityPage/Ref.graphql" +#import "../DestinationCountryPage/Ref.graphql" +#import "../DestinationOverviewPage/Ref.graphql" +#import "../HotelPage/Ref.graphql" +#import "../LoyaltyPage/Ref.graphql" +#import "../StartPage/Ref.graphql" +#import "../PromoCampaignPage/Ref.graphql" + +fragment NavigationLinks_ContentPage on ContentPageHeader { + navigation_links { + title + linkConnection { + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + } +} + +fragment NavigationLinksRef_ContentPage on ContentPageHeader { + navigation_links { + linkConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } +} diff --git a/packages/trpc/lib/graphql/Fragments/ContentPage/NavigationLinks.graphql.ts b/packages/trpc/lib/graphql/Fragments/ContentPage/NavigationLinks.graphql.ts deleted file mode 100644 index 098b84a3a..000000000 --- a/packages/trpc/lib/graphql/Fragments/ContentPage/NavigationLinks.graphql.ts +++ /dev/null @@ -1,103 +0,0 @@ -import { gql } from "graphql-tag" - -import { AccountPageRef } from "../AccountPage/Ref.graphql" -import { CampaignOverviewPageRef } from "../CampaignOverviewPage/Ref.graphql" -import { CampaignPageRef } from "../CampaignPage/Ref.graphql" -import { CollectionPageRef } from "../CollectionPage/Ref.graphql" -import { ContentPageRef } from "../ContentPage/Ref.graphql" -import { DestinationCityPageRef } from "../DestinationCityPage/Ref.graphql" -import { DestinationCountryPageRef } from "../DestinationCountryPage/Ref.graphql" -import { DestinationOverviewPageRef } from "../DestinationOverviewPage/Ref.graphql" -import { HotelPageRef } from "../HotelPage/Ref.graphql" -import { LoyaltyPageRef } from "../LoyaltyPage/Ref.graphql" -import { AccountPageLink } from "../PageLink/AccountPageLink.graphql" -import { CampaignOverviewPageLink } from "../PageLink/CampaignOverviewPageLink.graphql" -import { CampaignPageLink } from "../PageLink/CampaignPageLink.graphql" -import { CollectionPageLink } from "../PageLink/CollectionPageLink.graphql" -import { ContentPageLink } from "../PageLink/ContentPageLink.graphql" -import { DestinationCityPageLink } from "../PageLink/DestinationCityPageLink.graphql" -import { DestinationCountryPageLink } from "../PageLink/DestinationCountryPageLink.graphql" -import { DestinationOverviewPageLink } from "../PageLink/DestinationOverviewPageLink.graphql" -import { HotelPageLink } from "../PageLink/HotelPageLink.graphql" -import { LoyaltyPageLink } from "../PageLink/LoyaltyPageLink.graphql" -import { PromoCampaignPageLink } from "../PageLink/PromoCampaignPageLink.graphql" -import { StartPageLink } from "../PageLink/StartPageLink.graphql" -import { PromoCampaignPageRef } from "../PromoCampaignPage/Ref.graphql" -import { StartPageRef } from "../StartPage/Ref.graphql" - -export const NavigationLinks_ContentPage = gql` - fragment NavigationLinks_ContentPage on ContentPageHeader { - navigation_links { - title - 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 NavigationLinksRef_ContentPage = gql` - fragment NavigationLinksRef_ContentPage on ContentPageHeader { - navigation_links { - linkConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - } - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${CollectionPageRef} - ${ContentPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${StartPageRef} - ${PromoCampaignPageRef} -` diff --git a/packages/trpc/lib/graphql/Fragments/ContentPage/Ref.graphql b/packages/trpc/lib/graphql/Fragments/ContentPage/Ref.graphql new file mode 100644 index 000000000..80edfcbca --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/ContentPage/Ref.graphql @@ -0,0 +1,7 @@ +#import "../System.graphql" + +fragment ContentPageRef on ContentPage { + system { + ...System + } +} diff --git a/packages/trpc/lib/graphql/Fragments/ContentPage/Ref.graphql.ts b/packages/trpc/lib/graphql/Fragments/ContentPage/Ref.graphql.ts deleted file mode 100644 index 7aa4838ac..000000000 --- a/packages/trpc/lib/graphql/Fragments/ContentPage/Ref.graphql.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { gql } from "graphql-tag" - -import { System } from "../System.graphql" - -export const ContentPageRef = gql` -fragment ContentPageRef on ContentPage { - system { - ...System - } -} -${System} -` diff --git a/packages/trpc/lib/graphql/Fragments/ContentPage/TopPrimaryButton.graphql b/packages/trpc/lib/graphql/Fragments/ContentPage/TopPrimaryButton.graphql new file mode 100644 index 000000000..76206d02f --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/ContentPage/TopPrimaryButton.graphql @@ -0,0 +1,79 @@ +#import "../PageLink/AccountPageLink.graphql" +#import "../PageLink/CampaignOverviewPageLink.graphql" +#import "../PageLink/CampaignPageLink.graphql" +#import "../PageLink/CollectionPageLink.graphql" +#import "../PageLink/ContentPageLink.graphql" +#import "../PageLink/DestinationCityPageLink.graphql" +#import "../PageLink/DestinationCountryPageLink.graphql" +#import "../PageLink/DestinationOverviewPageLink.graphql" +#import "../PageLink/HotelPageLink.graphql" +#import "../PageLink/LoyaltyPageLink.graphql" +#import "../PageLink/StartPageLink.graphql" +#import "../PageLink/PromoCampaignPageLink.graphql" + +#import "../AccountPage/Ref.graphql" +#import "../CampaignOverviewPage/Ref.graphql" +#import "../CampaignPage/Ref.graphql" +#import "../CollectionPage/Ref.graphql" +#import "../ContentPage/Ref.graphql" +#import "../DestinationCityPage/Ref.graphql" +#import "../DestinationCountryPage/Ref.graphql" +#import "../DestinationOverviewPage/Ref.graphql" +#import "../HotelPage/Ref.graphql" +#import "../LoyaltyPage/Ref.graphql" +#import "../StartPage/Ref.graphql" +#import "../PromoCampaignPage/Ref.graphql" + +fragment TopPrimaryButton_ContentPage on ContentPageHeader { + top_primary_button { + title + is_contentstack_link + linkConnection { + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + external_link { + href + title + } + } +} + +fragment TopPrimaryButtonRef_ContentPage on ContentPageHeader { + top_primary_button { + linkConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } +} diff --git a/packages/trpc/lib/graphql/Fragments/ContentPage/TopPrimaryButton.graphql.ts b/packages/trpc/lib/graphql/Fragments/ContentPage/TopPrimaryButton.graphql.ts deleted file mode 100644 index 0a0be9a08..000000000 --- a/packages/trpc/lib/graphql/Fragments/ContentPage/TopPrimaryButton.graphql.ts +++ /dev/null @@ -1,108 +0,0 @@ -import { gql } from "graphql-tag" - -import { AccountPageRef } from "../AccountPage/Ref.graphql" -import { CampaignOverviewPageRef } from "../CampaignOverviewPage/Ref.graphql" -import { CampaignPageRef } from "../CampaignPage/Ref.graphql" -import { CollectionPageRef } from "../CollectionPage/Ref.graphql" -import { ContentPageRef } from "../ContentPage/Ref.graphql" -import { DestinationCityPageRef } from "../DestinationCityPage/Ref.graphql" -import { DestinationCountryPageRef } from "../DestinationCountryPage/Ref.graphql" -import { DestinationOverviewPageRef } from "../DestinationOverviewPage/Ref.graphql" -import { HotelPageRef } from "../HotelPage/Ref.graphql" -import { LoyaltyPageRef } from "../LoyaltyPage/Ref.graphql" -import { AccountPageLink } from "../PageLink/AccountPageLink.graphql" -import { CampaignOverviewPageLink } from "../PageLink/CampaignOverviewPageLink.graphql" -import { CampaignPageLink } from "../PageLink/CampaignPageLink.graphql" -import { CollectionPageLink } from "../PageLink/CollectionPageLink.graphql" -import { ContentPageLink } from "../PageLink/ContentPageLink.graphql" -import { DestinationCityPageLink } from "../PageLink/DestinationCityPageLink.graphql" -import { DestinationCountryPageLink } from "../PageLink/DestinationCountryPageLink.graphql" -import { DestinationOverviewPageLink } from "../PageLink/DestinationOverviewPageLink.graphql" -import { HotelPageLink } from "../PageLink/HotelPageLink.graphql" -import { LoyaltyPageLink } from "../PageLink/LoyaltyPageLink.graphql" -import { PromoCampaignPageLink } from "../PageLink/PromoCampaignPageLink.graphql" -import { StartPageLink } from "../PageLink/StartPageLink.graphql" -import { PromoCampaignPageRef } from "../PromoCampaignPage/Ref.graphql" -import { StartPageRef } from "../StartPage/Ref.graphql" - -export const TopPrimaryButton_ContentPage = gql` - fragment TopPrimaryButton_ContentPage on ContentPageHeader { - top_primary_button { - title - is_contentstack_link - linkConnection { - edges { - node { - __typename - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - external_link { - href - title - } - } - } - ${AccountPageLink} - ${CampaignOverviewPageLink} - ${CampaignPageLink} - ${CollectionPageLink} - ${ContentPageLink} - ${DestinationCityPageLink} - ${DestinationCountryPageLink} - ${DestinationOverviewPageLink} - ${HotelPageLink} - ${LoyaltyPageLink} - ${StartPageLink} - ${PromoCampaignPageLink} -` - -export const TopPrimaryButtonRef_ContentPage = gql` - fragment TopPrimaryButtonRef_ContentPage on ContentPageHeader { - top_primary_button { - linkConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - } - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${CollectionPageRef} - ${ContentPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${StartPageRef} - ${PromoCampaignPageRef} -` diff --git a/packages/trpc/lib/graphql/Fragments/CurrentFooter/AppDownloads.graphql.ts b/packages/trpc/lib/graphql/Fragments/CurrentFooter/AppDownloads.graphql similarity index 72% rename from packages/trpc/lib/graphql/Fragments/CurrentFooter/AppDownloads.graphql.ts rename to packages/trpc/lib/graphql/Fragments/CurrentFooter/AppDownloads.graphql index f51a712da..745f68728 100644 --- a/packages/trpc/lib/graphql/Fragments/CurrentFooter/AppDownloads.graphql.ts +++ b/packages/trpc/lib/graphql/Fragments/CurrentFooter/AppDownloads.graphql @@ -1,8 +1,5 @@ -import { gql } from "graphql-tag" +#import "../SysAsset.graphql" -import { SysAsset } from "../SysAsset.graphql" - -export const CurrentFooterAppDownloads = gql` fragment CurrentFooterAppDownloads on CurrentFooter { app_downloads { title @@ -28,5 +25,3 @@ fragment CurrentFooterAppDownloads on CurrentFooter { } } } -${SysAsset} -` diff --git a/packages/trpc/lib/graphql/Fragments/CurrentFooter/Logo.graphql b/packages/trpc/lib/graphql/Fragments/CurrentFooter/Logo.graphql new file mode 100644 index 000000000..e4781cd60 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/CurrentFooter/Logo.graphql @@ -0,0 +1,11 @@ +#import "../SysAsset.graphql" + +fragment Logo on CurrentFooter { + logoConnection { + edges { + node { + ...SysAsset + } + } + } +} diff --git a/packages/trpc/lib/graphql/Fragments/CurrentFooter/Logo.graphql.ts b/packages/trpc/lib/graphql/Fragments/CurrentFooter/Logo.graphql.ts deleted file mode 100644 index 277918963..000000000 --- a/packages/trpc/lib/graphql/Fragments/CurrentFooter/Logo.graphql.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { gql } from "graphql-tag" - -import { SysAsset } from "../SysAsset.graphql" - -export const Logo = gql` -fragment Logo on CurrentFooter { - logoConnection { - edges { - node { - ...SysAsset - } - } - } -} -${SysAsset} -` diff --git a/packages/trpc/lib/graphql/Fragments/CurrentFooter/MainLinks.graphql.ts b/packages/trpc/lib/graphql/Fragments/CurrentFooter/MainLinks.graphql similarity index 86% rename from packages/trpc/lib/graphql/Fragments/CurrentFooter/MainLinks.graphql.ts rename to packages/trpc/lib/graphql/Fragments/CurrentFooter/MainLinks.graphql index 050408e2e..62abc0eb1 100644 --- a/packages/trpc/lib/graphql/Fragments/CurrentFooter/MainLinks.graphql.ts +++ b/packages/trpc/lib/graphql/Fragments/CurrentFooter/MainLinks.graphql @@ -1,6 +1,3 @@ -import { gql } from "graphql-tag" - -export const MainLinks = gql` fragment MainLinks on Footer { main_links { title @@ -30,4 +27,3 @@ fragment MainLinks on Footer { } } } -` diff --git a/packages/trpc/lib/graphql/Fragments/CurrentFooter/Navigation.graphql.ts b/packages/trpc/lib/graphql/Fragments/CurrentFooter/Navigation.graphql similarity index 62% rename from packages/trpc/lib/graphql/Fragments/CurrentFooter/Navigation.graphql.ts rename to packages/trpc/lib/graphql/Fragments/CurrentFooter/Navigation.graphql index bfdfbc0f1..1439cf885 100644 --- a/packages/trpc/lib/graphql/Fragments/CurrentFooter/Navigation.graphql.ts +++ b/packages/trpc/lib/graphql/Fragments/CurrentFooter/Navigation.graphql @@ -1,6 +1,3 @@ -import { gql } from "graphql-tag" - -export const Navigation = gql` fragment Navigation on CurrentFooter { navigation { links { @@ -10,4 +7,3 @@ fragment Navigation on CurrentFooter { title } } -` diff --git a/packages/trpc/lib/graphql/Fragments/CurrentFooter/Refs/MainLinks.graphql b/packages/trpc/lib/graphql/Fragments/CurrentFooter/Refs/MainLinks.graphql new file mode 100644 index 000000000..cea5340f4 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/CurrentFooter/Refs/MainLinks.graphql @@ -0,0 +1,18 @@ +fragment MainLinksRef on Footer { + __typename + main_links { + pageConnection { + edges { + node { + __typename + ...LoyaltyPageRef + ...ContentPageRef + ...AccountPageRef + } + } + } + } + system { + ...System + } +} diff --git a/packages/trpc/lib/graphql/Fragments/CurrentFooter/Refs/MainLinks.graphql.ts b/packages/trpc/lib/graphql/Fragments/CurrentFooter/Refs/MainLinks.graphql.ts deleted file mode 100644 index 695c79edc..000000000 --- a/packages/trpc/lib/graphql/Fragments/CurrentFooter/Refs/MainLinks.graphql.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { gql } from "graphql-tag" - -import { AccountPageRef } from "../../AccountPage/Ref.graphql" -import { ContentPageRef } from "../../ContentPage/Ref.graphql" -import { LoyaltyPageRef } from "../../LoyaltyPage/Ref.graphql" -import { System } from "../../System.graphql" - -export const MainLinksRef = gql` - fragment MainLinksRef on Footer { - __typename - main_links { - pageConnection { - edges { - node { - __typename - ...LoyaltyPageRef - ...ContentPageRef - ...AccountPageRef - } - } - } - } - system { - ...System - } - } - ${System} - ${LoyaltyPageRef} - ${AccountPageRef} - ${ContentPageRef} -` diff --git a/packages/trpc/lib/graphql/Fragments/CurrentFooter/Refs/SecondaryLinks.graphql b/packages/trpc/lib/graphql/Fragments/CurrentFooter/Refs/SecondaryLinks.graphql new file mode 100644 index 000000000..d324e40b1 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/CurrentFooter/Refs/SecondaryLinks.graphql @@ -0,0 +1,20 @@ +fragment SecondaryLinksRef on Footer { + __typename + secondary_links { + links { + pageConnection { + edges { + node { + __typename + ...LoyaltyPageRef + ...ContentPageRef + ...AccountPageRef + } + } + } + } + } + system { + ...System + } +} diff --git a/packages/trpc/lib/graphql/Fragments/CurrentFooter/Refs/SecondaryLinks.graphql.ts b/packages/trpc/lib/graphql/Fragments/CurrentFooter/Refs/SecondaryLinks.graphql.ts deleted file mode 100644 index 12c2402c1..000000000 --- a/packages/trpc/lib/graphql/Fragments/CurrentFooter/Refs/SecondaryLinks.graphql.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { gql } from "graphql-tag" - -import { AccountPageRef } from "../../AccountPage/Ref.graphql" -import { ContentPageRef } from "../../ContentPage/Ref.graphql" -import { LoyaltyPageRef } from "../../LoyaltyPage/Ref.graphql" -import { System } from "../../System.graphql" - -export const SecondaryLinksRef = gql` - fragment SecondaryLinksRef on Footer { - __typename - secondary_links { - links { - pageConnection { - edges { - node { - __typename - ...LoyaltyPageRef - ...ContentPageRef - ...AccountPageRef - } - } - } - } - } - system { - ...System - } - } - ${System} - ${LoyaltyPageRef} - ${AccountPageRef} - ${ContentPageRef} -` diff --git a/packages/trpc/lib/graphql/Fragments/CurrentFooter/SecondaryLinks.graphql b/packages/trpc/lib/graphql/Fragments/CurrentFooter/SecondaryLinks.graphql new file mode 100644 index 000000000..e6724cd7f --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/CurrentFooter/SecondaryLinks.graphql @@ -0,0 +1,24 @@ +#import "../Refs/MyPages/AccountPage.graphql" +#import "../Refs/ContentPage/ContentPage.graphql" +#import "../Refs/LoyaltyPage/LoyaltyPage.graphql" + +fragment SecondaryLinks on Footer { + secondary_links { + title + links { + title + open_in_new_tab + pageConnection { + edges { + node { + __typename + } + } + } + link { + href + title + } + } + } +} diff --git a/packages/trpc/lib/graphql/Fragments/CurrentFooter/SecondaryLinks.graphql.ts b/packages/trpc/lib/graphql/Fragments/CurrentFooter/SecondaryLinks.graphql.ts deleted file mode 100644 index 694cd33a8..000000000 --- a/packages/trpc/lib/graphql/Fragments/CurrentFooter/SecondaryLinks.graphql.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { gql } from "graphql-tag" - -export const SecondaryLinks = gql` - fragment SecondaryLinks on Footer { - secondary_links { - title - links { - title - open_in_new_tab - pageConnection { - edges { - node { - __typename - } - } - } - link { - href - title - } - } - } - } -` diff --git a/packages/trpc/lib/graphql/Fragments/CurrentFooter/SocialMedia.graphql.ts b/packages/trpc/lib/graphql/Fragments/CurrentFooter/SocialMedia.graphql similarity index 72% rename from packages/trpc/lib/graphql/Fragments/CurrentFooter/SocialMedia.graphql.ts rename to packages/trpc/lib/graphql/Fragments/CurrentFooter/SocialMedia.graphql index 1d569c6c1..aef07bd76 100644 --- a/packages/trpc/lib/graphql/Fragments/CurrentFooter/SocialMedia.graphql.ts +++ b/packages/trpc/lib/graphql/Fragments/CurrentFooter/SocialMedia.graphql @@ -1,6 +1,3 @@ -import { gql } from "graphql-tag" - -export const CurrentFooterSocialMedia = gql` fragment CurrentFooterSocialMedia on CurrentFooter { social_media { title @@ -18,4 +15,3 @@ fragment CurrentFooterSocialMedia on CurrentFooter { } } } -` diff --git a/packages/trpc/lib/graphql/Fragments/CurrentFooter/TripAdvisor.graphql.ts b/packages/trpc/lib/graphql/Fragments/CurrentFooter/TripAdvisor.graphql similarity index 57% rename from packages/trpc/lib/graphql/Fragments/CurrentFooter/TripAdvisor.graphql.ts rename to packages/trpc/lib/graphql/Fragments/CurrentFooter/TripAdvisor.graphql index 43674348f..bee84de7e 100644 --- a/packages/trpc/lib/graphql/Fragments/CurrentFooter/TripAdvisor.graphql.ts +++ b/packages/trpc/lib/graphql/Fragments/CurrentFooter/TripAdvisor.graphql @@ -1,8 +1,5 @@ -import { gql } from "graphql-tag" +#import "../SysAsset.graphql" -import { SysAsset } from "../SysAsset.graphql" - -export const TripAdvisor = gql` fragment TripAdvisor on CurrentFooter { trip_advisor { logoConnection { @@ -15,5 +12,3 @@ fragment TripAdvisor on CurrentFooter { title } } -${SysAsset} -` diff --git a/packages/trpc/lib/graphql/Fragments/DestinationCityPage/Ref.graphql b/packages/trpc/lib/graphql/Fragments/DestinationCityPage/Ref.graphql new file mode 100644 index 000000000..44330d446 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/DestinationCityPage/Ref.graphql @@ -0,0 +1,7 @@ +#import "../System.graphql" + +fragment DestinationCityPageRef on DestinationCityPage { + system { + ...System + } +} diff --git a/packages/trpc/lib/graphql/Fragments/DestinationCityPage/Ref.graphql.ts b/packages/trpc/lib/graphql/Fragments/DestinationCityPage/Ref.graphql.ts deleted file mode 100644 index 8d861e570..000000000 --- a/packages/trpc/lib/graphql/Fragments/DestinationCityPage/Ref.graphql.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { gql } from "graphql-tag" - -import { System } from "../System.graphql" - -export const DestinationCityPageRef = gql` -fragment DestinationCityPageRef on DestinationCityPage { - system { - ...System - } -} -${System} -` diff --git a/packages/trpc/lib/graphql/Fragments/DestinationCountryPage/Ref.graphql b/packages/trpc/lib/graphql/Fragments/DestinationCountryPage/Ref.graphql new file mode 100644 index 000000000..05804f48c --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/DestinationCountryPage/Ref.graphql @@ -0,0 +1,7 @@ +#import "../System.graphql" + +fragment DestinationCountryPageRef on DestinationCountryPage { + system { + ...System + } +} diff --git a/packages/trpc/lib/graphql/Fragments/DestinationCountryPage/Ref.graphql.ts b/packages/trpc/lib/graphql/Fragments/DestinationCountryPage/Ref.graphql.ts deleted file mode 100644 index bb3a5d7b7..000000000 --- a/packages/trpc/lib/graphql/Fragments/DestinationCountryPage/Ref.graphql.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { gql } from "graphql-tag" - -import { System } from "../System.graphql" - -export const DestinationCountryPageRef = gql` -fragment DestinationCountryPageRef on DestinationCountryPage { - system { - ...System - } -} -${System} -` diff --git a/packages/trpc/lib/graphql/Fragments/DestinationFilter.graphql b/packages/trpc/lib/graphql/Fragments/DestinationFilter.graphql new file mode 100644 index 000000000..603f211cc --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/DestinationFilter.graphql @@ -0,0 +1,38 @@ +#import "./System.graphql" + +#import "./HotelFilter.graphql" + +#import "./Blocks/Accordion.graphql" +#import "./Blocks/Content.graphql" + +fragment DestinationFilter on DestinationFilter { + heading + preamble + blocks { + __typename + ...Accordion_DestinationFilterBlocks + ...Content_DestinationFilterBlocks + } + filterConnection { + edges { + node { + ...HotelFilter + } + } + } +} + +fragment DestinationFilterRef on DestinationFilter { + blocks { + __typename + ...Accordion_DestinationFilterBlocksRefs + ...Content_DestinationFilterBlocksRefs + } + filterConnection { + edges { + node { + ...HotelFilterRef + } + } + } +} diff --git a/packages/trpc/lib/graphql/Fragments/DestinationFilter.graphql.ts b/packages/trpc/lib/graphql/Fragments/DestinationFilter.graphql.ts deleted file mode 100644 index ca1293111..000000000 --- a/packages/trpc/lib/graphql/Fragments/DestinationFilter.graphql.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { gql } from "graphql-tag" - -import { - Accordion_DestinationFilterBlocks, - Accordion_DestinationFilterBlocksRefs, -} from "./Blocks/Accordion.graphql" -import { - Content_DestinationFilterBlocks, - Content_DestinationFilterBlocksRefs, -} from "./Blocks/Content.graphql" -import { HotelFilter, HotelFilterRef } from "./HotelFilter.graphql" - -export const DestinationFilter = gql` - fragment DestinationFilter on DestinationFilter { - heading - preamble - blocks { - __typename - ...Accordion_DestinationFilterBlocks - ...Content_DestinationFilterBlocks - } - filterConnection { - edges { - node { - ...HotelFilter - } - } - } - } - ${HotelFilter} - ${Accordion_DestinationFilterBlocks} - ${Content_DestinationFilterBlocks} -` - -export const DestinationFilterRef = gql` - fragment DestinationFilterRef on DestinationFilter { - blocks { - __typename - ...Accordion_DestinationFilterBlocksRefs - ...Content_DestinationFilterBlocksRefs - } - filterConnection { - edges { - node { - ...HotelFilterRef - } - } - } - } - ${Accordion_DestinationFilterBlocksRefs} - ${Content_DestinationFilterBlocksRefs} - ${HotelFilterRef} -` diff --git a/packages/trpc/lib/graphql/Fragments/DestinationOverviewPage/Ref.graphql b/packages/trpc/lib/graphql/Fragments/DestinationOverviewPage/Ref.graphql new file mode 100644 index 000000000..0b93b06fb --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/DestinationOverviewPage/Ref.graphql @@ -0,0 +1,7 @@ +#import "../System.graphql" + +fragment DestinationOverviewPageRef on DestinationOverviewPage { + system { + ...System + } +} diff --git a/packages/trpc/lib/graphql/Fragments/DestinationOverviewPage/Ref.graphql.ts b/packages/trpc/lib/graphql/Fragments/DestinationOverviewPage/Ref.graphql.ts deleted file mode 100644 index 8b5d4cc43..000000000 --- a/packages/trpc/lib/graphql/Fragments/DestinationOverviewPage/Ref.graphql.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { gql } from "graphql-tag" - -import { System } from "../System.graphql" - -export const DestinationOverviewPageRef = gql` -fragment DestinationOverviewPageRef on DestinationOverviewPage { - system { - ...System - } -} -${System} -` diff --git a/packages/trpc/lib/graphql/Fragments/Footer/AppDownloads.graphql.ts b/packages/trpc/lib/graphql/Fragments/Footer/AppDownloads.graphql similarity index 67% rename from packages/trpc/lib/graphql/Fragments/Footer/AppDownloads.graphql.ts rename to packages/trpc/lib/graphql/Fragments/Footer/AppDownloads.graphql index 26ea321c8..f9e2f7d40 100644 --- a/packages/trpc/lib/graphql/Fragments/Footer/AppDownloads.graphql.ts +++ b/packages/trpc/lib/graphql/Fragments/Footer/AppDownloads.graphql @@ -1,6 +1,3 @@ -import { gql } from "graphql-tag" - -export const AppDownloads = gql` fragment AppDownloads on Footer { app_downloads { title @@ -13,4 +10,3 @@ fragment AppDownloads on Footer { } } } -` diff --git a/packages/trpc/lib/graphql/Fragments/Footer/Refs/TertiaryLinks.graphql b/packages/trpc/lib/graphql/Fragments/Footer/Refs/TertiaryLinks.graphql new file mode 100644 index 000000000..d1fd47864 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Footer/Refs/TertiaryLinks.graphql @@ -0,0 +1,22 @@ +#import "../../Refs/LoyaltyPage/LoyaltyPage.graphql" +#import "../../Refs/MyPages/AccountPage.graphql" +#import "../../Refs/ContentPage/ContentPage.graphql" + +fragment TertiaryLinksRef on Footer { + __typename + tertiary_links { + pageConnection { + edges { + node { + __typename + ...LoyaltyPageRef + ...ContentPageRef + ...AccountPageRef + } + } + } + } + system { + ...System + } +} diff --git a/packages/trpc/lib/graphql/Fragments/Footer/Refs/TertiaryLinks.graphql.ts b/packages/trpc/lib/graphql/Fragments/Footer/Refs/TertiaryLinks.graphql.ts deleted file mode 100644 index 3e118fdaf..000000000 --- a/packages/trpc/lib/graphql/Fragments/Footer/Refs/TertiaryLinks.graphql.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { gql } from "graphql-tag" - -import { AccountPageRef } from "../../AccountPage/Ref.graphql" -import { ContentPageRef } from "../../ContentPage/Ref.graphql" -import { LoyaltyPageRef } from "../../LoyaltyPage/Ref.graphql" - -export const TertiaryLinksRef = gql` - fragment TertiaryLinksRef on Footer { - __typename - tertiary_links { - pageConnection { - edges { - node { - __typename - ...LoyaltyPageRef - ...ContentPageRef - ...AccountPageRef - } - } - } - } - system { - ...System - } - } - ${LoyaltyPageRef} - ${AccountPageRef} - ${ContentPageRef} -` diff --git a/packages/trpc/lib/graphql/Fragments/Footer/SocialMedia.graphql.ts b/packages/trpc/lib/graphql/Fragments/Footer/SocialMedia.graphql similarity index 65% rename from packages/trpc/lib/graphql/Fragments/Footer/SocialMedia.graphql.ts rename to packages/trpc/lib/graphql/Fragments/Footer/SocialMedia.graphql index 8e14ca014..02947ae5d 100644 --- a/packages/trpc/lib/graphql/Fragments/Footer/SocialMedia.graphql.ts +++ b/packages/trpc/lib/graphql/Fragments/Footer/SocialMedia.graphql @@ -1,6 +1,3 @@ -import { gql } from "graphql-tag" - -export const SocialMedia = gql` fragment SocialMedia on Footer { social_media { links { @@ -12,4 +9,3 @@ fragment SocialMedia on Footer { } } } -` diff --git a/packages/trpc/lib/graphql/Fragments/Grid.graphql.ts b/packages/trpc/lib/graphql/Fragments/Grid.graphql similarity index 79% rename from packages/trpc/lib/graphql/Fragments/Grid.graphql.ts rename to packages/trpc/lib/graphql/Fragments/Grid.graphql index 0b6111039..7cde03700 100644 --- a/packages/trpc/lib/graphql/Fragments/Grid.graphql.ts +++ b/packages/trpc/lib/graphql/Fragments/Grid.graphql @@ -1,6 +1,3 @@ -import { gql } from "graphql-tag" - -export const Grid = gql` fragment Grid on Grid { columns { span @@ -18,4 +15,3 @@ fragment Grid on Grid { } } } -` diff --git a/packages/trpc/lib/graphql/Fragments/Hero.graphql.ts b/packages/trpc/lib/graphql/Fragments/Hero.graphql similarity index 51% rename from packages/trpc/lib/graphql/Fragments/Hero.graphql.ts rename to packages/trpc/lib/graphql/Fragments/Hero.graphql index 4384a278b..5424b6ce2 100644 --- a/packages/trpc/lib/graphql/Fragments/Hero.graphql.ts +++ b/packages/trpc/lib/graphql/Fragments/Hero.graphql @@ -1,8 +1,5 @@ -import { gql } from "graphql-tag" +#import "./SysAsset.graphql" -import { SysAsset } from "./SysAsset.graphql" - -export const Hero = gql` fragment Hero on Hero { imagesConnection { totalCount @@ -13,5 +10,3 @@ fragment Hero on Hero { } } } -${SysAsset} -` diff --git a/packages/trpc/lib/graphql/Fragments/HotelFilter.graphql b/packages/trpc/lib/graphql/Fragments/HotelFilter.graphql new file mode 100644 index 000000000..5054159a1 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/HotelFilter.graphql @@ -0,0 +1,14 @@ +#import "./System.graphql" + +fragment HotelFilter on HotelFilter { + title + facility_id + category + slug +} + +fragment HotelFilterRef on HotelFilter { + system { + ...System + } +} diff --git a/packages/trpc/lib/graphql/Fragments/HotelFilter.graphql.ts b/packages/trpc/lib/graphql/Fragments/HotelFilter.graphql.ts deleted file mode 100644 index 8e331642d..000000000 --- a/packages/trpc/lib/graphql/Fragments/HotelFilter.graphql.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { gql } from "graphql-tag" - -import { System } from "./System.graphql" - -export const HotelFilter = gql` -fragment HotelFilter on HotelFilter { - title - facility_id - category - slug -} -${System} -` - -export const HotelFilterRef = gql` -fragment HotelFilterRef on HotelFilter { - system { - ...System - } -} -${System} -` diff --git a/packages/trpc/lib/graphql/Fragments/HotelPage/Ref.graphql b/packages/trpc/lib/graphql/Fragments/HotelPage/Ref.graphql new file mode 100644 index 000000000..d0dbdf6b3 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/HotelPage/Ref.graphql @@ -0,0 +1,7 @@ +#import "../System.graphql" + +fragment HotelPageRef on HotelPage { + system { + ...System + } +} diff --git a/packages/trpc/lib/graphql/Fragments/HotelPage/Ref.graphql.ts b/packages/trpc/lib/graphql/Fragments/HotelPage/Ref.graphql.ts deleted file mode 100644 index db5bd3138..000000000 --- a/packages/trpc/lib/graphql/Fragments/HotelPage/Ref.graphql.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { gql } from "graphql-tag" - -import { System } from "../System.graphql" - -export const HotelPageRef = gql` -fragment HotelPageRef on HotelPage { - system { - ...System - } -} -${System} -` diff --git a/packages/trpc/lib/graphql/Fragments/ImageContainer.graphql.ts b/packages/trpc/lib/graphql/Fragments/ImageContainer.graphql similarity index 52% rename from packages/trpc/lib/graphql/Fragments/ImageContainer.graphql.ts rename to packages/trpc/lib/graphql/Fragments/ImageContainer.graphql index 80a09b215..1b04a993f 100644 --- a/packages/trpc/lib/graphql/Fragments/ImageContainer.graphql.ts +++ b/packages/trpc/lib/graphql/Fragments/ImageContainer.graphql @@ -1,8 +1,5 @@ -import { gql } from "graphql-tag" +#import "./System.graphql" -import { System } from "./System.graphql" - -export const ImageContainer = gql` fragment ImageContainer on ImageContainer { image_left image_right @@ -11,14 +8,9 @@ fragment ImageContainer on ImageContainer { ...System } } -${System} -` -export const ImageContainerRef = gql` fragment ImageContainerRef on ImageContainer { system { ...System } } -${System} -` diff --git a/packages/trpc/lib/graphql/Fragments/LoyaltyPage/Ref.graphql b/packages/trpc/lib/graphql/Fragments/LoyaltyPage/Ref.graphql new file mode 100644 index 000000000..70cba0639 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/LoyaltyPage/Ref.graphql @@ -0,0 +1,7 @@ +#import "../System.graphql" + +fragment LoyaltyPageRef on LoyaltyPage { + system { + ...System + } +} diff --git a/packages/trpc/lib/graphql/Fragments/LoyaltyPage/Ref.graphql.ts b/packages/trpc/lib/graphql/Fragments/LoyaltyPage/Ref.graphql.ts deleted file mode 100644 index 3eabee831..000000000 --- a/packages/trpc/lib/graphql/Fragments/LoyaltyPage/Ref.graphql.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { gql } from "graphql-tag" - -import { System } from "../System.graphql" - -export const LoyaltyPageRef = gql` -fragment LoyaltyPageRef on LoyaltyPage { - system { - ...System - } -} -${System} -` diff --git a/packages/trpc/lib/graphql/Fragments/Metadata.graphql.ts b/packages/trpc/lib/graphql/Fragments/Metadata.graphql similarity index 55% rename from packages/trpc/lib/graphql/Fragments/Metadata.graphql.ts rename to packages/trpc/lib/graphql/Fragments/Metadata.graphql index ca9fd9bbc..b649e213a 100644 --- a/packages/trpc/lib/graphql/Fragments/Metadata.graphql.ts +++ b/packages/trpc/lib/graphql/Fragments/Metadata.graphql @@ -1,10 +1,6 @@ -import { gql } from "graphql-tag" - -export const Metadata = gql` fragment Metadata on SeoMetadata { noindex description title seo_image } -` diff --git a/packages/trpc/lib/graphql/Fragments/PageLink/AccountPageLink.graphql b/packages/trpc/lib/graphql/Fragments/PageLink/AccountPageLink.graphql new file mode 100644 index 000000000..ba7f64e49 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/PageLink/AccountPageLink.graphql @@ -0,0 +1,9 @@ +#import "../System.graphql" + +fragment AccountPageLink on AccountPage { + system { + ...System + } + title + url +} diff --git a/packages/trpc/lib/graphql/Fragments/PageLink/AccountPageLink.graphql.ts b/packages/trpc/lib/graphql/Fragments/PageLink/AccountPageLink.graphql.ts deleted file mode 100644 index 7efde99dc..000000000 --- a/packages/trpc/lib/graphql/Fragments/PageLink/AccountPageLink.graphql.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { gql } from "graphql-tag" - -import { System } from "../System.graphql" - -export const AccountPageLink = gql` -fragment AccountPageLink on AccountPage { - system { - ...System - } - title - url -} -${System} -` diff --git a/packages/trpc/lib/graphql/Fragments/PageLink/CampaignOverviewPageLink.graphql b/packages/trpc/lib/graphql/Fragments/PageLink/CampaignOverviewPageLink.graphql new file mode 100644 index 000000000..8ec9faa4a --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/PageLink/CampaignOverviewPageLink.graphql @@ -0,0 +1,9 @@ +#import "../System.graphql" + +fragment CampaignOverviewPageLink on CampaignOverviewPage { + title + url + system { + ...System + } +} diff --git a/packages/trpc/lib/graphql/Fragments/PageLink/CampaignOverviewPageLink.graphql.ts b/packages/trpc/lib/graphql/Fragments/PageLink/CampaignOverviewPageLink.graphql.ts deleted file mode 100644 index d95302d88..000000000 --- a/packages/trpc/lib/graphql/Fragments/PageLink/CampaignOverviewPageLink.graphql.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { gql } from "graphql-tag" - -import { System } from "../System.graphql" - -export const CampaignOverviewPageLink = gql` -fragment CampaignOverviewPageLink on CampaignOverviewPage { - title - url - system { - ...System - } -} -${System} -` diff --git a/packages/trpc/lib/graphql/Fragments/PageLink/CampaignPageLink.graphql b/packages/trpc/lib/graphql/Fragments/PageLink/CampaignPageLink.graphql new file mode 100644 index 000000000..0555d08b9 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/PageLink/CampaignPageLink.graphql @@ -0,0 +1,9 @@ +#import "../System.graphql" + +fragment CampaignPageLink on CampaignPage { + title + url + system { + ...System + } +} diff --git a/packages/trpc/lib/graphql/Fragments/PageLink/CampaignPageLink.graphql.ts b/packages/trpc/lib/graphql/Fragments/PageLink/CampaignPageLink.graphql.ts deleted file mode 100644 index d1fdae207..000000000 --- a/packages/trpc/lib/graphql/Fragments/PageLink/CampaignPageLink.graphql.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { gql } from "graphql-tag" - -import { System } from "../System.graphql" - -export const CampaignPageLink = gql` -fragment CampaignPageLink on CampaignPage { - title - url - system { - ...System - } -} -${System} -` diff --git a/packages/trpc/lib/graphql/Fragments/PageLink/CollectionPageLink.graphql b/packages/trpc/lib/graphql/Fragments/PageLink/CollectionPageLink.graphql new file mode 100644 index 000000000..9ebbb4f11 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/PageLink/CollectionPageLink.graphql @@ -0,0 +1,12 @@ +#import "../System.graphql" + +fragment CollectionPageLink on CollectionPage { + title + url + system { + ...System + } + web { + original_url + } +} diff --git a/packages/trpc/lib/graphql/Fragments/PageLink/CollectionPageLink.graphql.ts b/packages/trpc/lib/graphql/Fragments/PageLink/CollectionPageLink.graphql.ts deleted file mode 100644 index 413625690..000000000 --- a/packages/trpc/lib/graphql/Fragments/PageLink/CollectionPageLink.graphql.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { gql } from "graphql-tag" - -import { System } from "../System.graphql" - -export const CollectionPageLink = gql` -fragment CollectionPageLink on CollectionPage { - title - url - system { - ...System - } - web { - original_url - } -} -${System} -` diff --git a/packages/trpc/lib/graphql/Fragments/PageLink/ContentPageLink.graphql b/packages/trpc/lib/graphql/Fragments/PageLink/ContentPageLink.graphql new file mode 100644 index 000000000..2965d3b22 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/PageLink/ContentPageLink.graphql @@ -0,0 +1,12 @@ +#import "../System.graphql" + +fragment ContentPageLink on ContentPage { + title + url + system { + ...System + } + web { + original_url + } +} diff --git a/packages/trpc/lib/graphql/Fragments/PageLink/ContentPageLink.graphql.ts b/packages/trpc/lib/graphql/Fragments/PageLink/ContentPageLink.graphql.ts deleted file mode 100644 index 6375d55a3..000000000 --- a/packages/trpc/lib/graphql/Fragments/PageLink/ContentPageLink.graphql.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { gql } from "graphql-tag" - -import { System } from "../System.graphql" - -export const ContentPageLink = gql` -fragment ContentPageLink on ContentPage { - title - url - system { - ...System - } - web { - original_url - } -} -${System} -` diff --git a/packages/trpc/lib/graphql/Fragments/PageLink/CurrentBlocksPageLink.graphql b/packages/trpc/lib/graphql/Fragments/PageLink/CurrentBlocksPageLink.graphql new file mode 100644 index 000000000..4b8a7eab2 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/PageLink/CurrentBlocksPageLink.graphql @@ -0,0 +1,9 @@ +#import "../System.graphql" + +fragment CurrentBlocksPageLink on CurrentBlocksPage { + title + url + system { + ...System + } +} diff --git a/packages/trpc/lib/graphql/Fragments/PageLink/CurrentBlocksPageLink.graphql.ts b/packages/trpc/lib/graphql/Fragments/PageLink/CurrentBlocksPageLink.graphql.ts deleted file mode 100644 index c3e6f2644..000000000 --- a/packages/trpc/lib/graphql/Fragments/PageLink/CurrentBlocksPageLink.graphql.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { gql } from "graphql-tag" - -import { System } from "../System.graphql" - -export const CurrentBlocksPageLink = gql` -fragment CurrentBlocksPageLink on CurrentBlocksPage { - title - url - system { - ...System - } -} -${System} -` diff --git a/packages/trpc/lib/graphql/Fragments/PageLink/CurrentContentPageLink.graphql b/packages/trpc/lib/graphql/Fragments/PageLink/CurrentContentPageLink.graphql new file mode 100644 index 000000000..4b8a7eab2 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/PageLink/CurrentContentPageLink.graphql @@ -0,0 +1,9 @@ +#import "../System.graphql" + +fragment CurrentBlocksPageLink on CurrentBlocksPage { + title + url + system { + ...System + } +} diff --git a/packages/trpc/lib/graphql/Fragments/PageLink/CurrentContentPageLink.graphql.ts b/packages/trpc/lib/graphql/Fragments/PageLink/CurrentContentPageLink.graphql.ts deleted file mode 100644 index c3e6f2644..000000000 --- a/packages/trpc/lib/graphql/Fragments/PageLink/CurrentContentPageLink.graphql.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { gql } from "graphql-tag" - -import { System } from "../System.graphql" - -export const CurrentBlocksPageLink = gql` -fragment CurrentBlocksPageLink on CurrentBlocksPage { - title - url - system { - ...System - } -} -${System} -` diff --git a/packages/trpc/lib/graphql/Fragments/PageLink/DestinationCityPageLink.graphql b/packages/trpc/lib/graphql/Fragments/PageLink/DestinationCityPageLink.graphql new file mode 100644 index 000000000..092328afa --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/PageLink/DestinationCityPageLink.graphql @@ -0,0 +1,9 @@ +#import "../System.graphql" + +fragment DestinationCityPageLink on DestinationCityPage { + title + url + system { + ...System + } +} diff --git a/packages/trpc/lib/graphql/Fragments/PageLink/DestinationCityPageLink.graphql.ts b/packages/trpc/lib/graphql/Fragments/PageLink/DestinationCityPageLink.graphql.ts deleted file mode 100644 index 72167734d..000000000 --- a/packages/trpc/lib/graphql/Fragments/PageLink/DestinationCityPageLink.graphql.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { gql } from "graphql-tag" - -import { System } from "../System.graphql" - -export const DestinationCityPageLink = gql` -fragment DestinationCityPageLink on DestinationCityPage { - title - url - system { - ...System - } -} -${System} -` diff --git a/packages/trpc/lib/graphql/Fragments/PageLink/DestinationCountryPageLink.graphql b/packages/trpc/lib/graphql/Fragments/PageLink/DestinationCountryPageLink.graphql new file mode 100644 index 000000000..ef36d64bb --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/PageLink/DestinationCountryPageLink.graphql @@ -0,0 +1,9 @@ +#import "../System.graphql" + +fragment DestinationCountryPageLink on DestinationCountryPage { + title + url + system { + ...System + } +} diff --git a/packages/trpc/lib/graphql/Fragments/PageLink/DestinationCountryPageLink.graphql.ts b/packages/trpc/lib/graphql/Fragments/PageLink/DestinationCountryPageLink.graphql.ts deleted file mode 100644 index d4fb94da1..000000000 --- a/packages/trpc/lib/graphql/Fragments/PageLink/DestinationCountryPageLink.graphql.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { gql } from "graphql-tag" - -import { System } from "../System.graphql" - -export const DestinationCountryPageLink = gql` -fragment DestinationCountryPageLink on DestinationCountryPage { - title - url - system { - ...System - } -} -${System} -` diff --git a/packages/trpc/lib/graphql/Fragments/PageLink/DestinationOverviewPageLink.graphql b/packages/trpc/lib/graphql/Fragments/PageLink/DestinationOverviewPageLink.graphql new file mode 100644 index 000000000..d0a3bba20 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/PageLink/DestinationOverviewPageLink.graphql @@ -0,0 +1,9 @@ +#import "../System.graphql" + +fragment DestinationOverviewPageLink on DestinationOverviewPage { + title + url + system { + ...System + } +} diff --git a/packages/trpc/lib/graphql/Fragments/PageLink/DestinationOverviewPageLink.graphql.ts b/packages/trpc/lib/graphql/Fragments/PageLink/DestinationOverviewPageLink.graphql.ts deleted file mode 100644 index 012b5e109..000000000 --- a/packages/trpc/lib/graphql/Fragments/PageLink/DestinationOverviewPageLink.graphql.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { gql } from "graphql-tag" - -import { System } from "../System.graphql" - -export const DestinationOverviewPageLink = gql` -fragment DestinationOverviewPageLink on DestinationOverviewPage { - title - url - system { - ...System - } -} -${System} -` diff --git a/packages/trpc/lib/graphql/Fragments/PageLink/HotelPageLink.graphql b/packages/trpc/lib/graphql/Fragments/PageLink/HotelPageLink.graphql new file mode 100644 index 000000000..23b7d2fd9 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/PageLink/HotelPageLink.graphql @@ -0,0 +1,9 @@ +#import "../System.graphql" + +fragment HotelPageLink on HotelPage { + system { + ...System + } + title + url +} diff --git a/packages/trpc/lib/graphql/Fragments/PageLink/HotelPageLink.graphql.ts b/packages/trpc/lib/graphql/Fragments/PageLink/HotelPageLink.graphql.ts deleted file mode 100644 index 99c3f7435..000000000 --- a/packages/trpc/lib/graphql/Fragments/PageLink/HotelPageLink.graphql.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { gql } from "graphql-tag" - -import { System } from "../System.graphql" - -export const HotelPageLink = gql` -fragment HotelPageLink on HotelPage { - system { - ...System - } - title - url -} -${System} -` diff --git a/packages/trpc/lib/graphql/Fragments/PageLink/LoyaltyPageLink.graphql b/packages/trpc/lib/graphql/Fragments/PageLink/LoyaltyPageLink.graphql new file mode 100644 index 000000000..fa4d7ee90 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/PageLink/LoyaltyPageLink.graphql @@ -0,0 +1,12 @@ +#import "../System.graphql" + +fragment LoyaltyPageLink on LoyaltyPage { + title + url + system { + ...System + } + web { + original_url + } +} diff --git a/packages/trpc/lib/graphql/Fragments/PageLink/LoyaltyPageLink.graphql.ts b/packages/trpc/lib/graphql/Fragments/PageLink/LoyaltyPageLink.graphql.ts deleted file mode 100644 index 1f2e02717..000000000 --- a/packages/trpc/lib/graphql/Fragments/PageLink/LoyaltyPageLink.graphql.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { gql } from "graphql-tag" - -import { System } from "../System.graphql" - -export const LoyaltyPageLink = gql` -fragment LoyaltyPageLink on LoyaltyPage { - title - url - system { - ...System - } - web { - original_url - } -} -${System} -` diff --git a/packages/trpc/lib/graphql/Fragments/PageLink/PromoCampaignPageLink.graphql b/packages/trpc/lib/graphql/Fragments/PageLink/PromoCampaignPageLink.graphql new file mode 100644 index 000000000..155471960 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/PageLink/PromoCampaignPageLink.graphql @@ -0,0 +1,9 @@ +#import "../System.graphql" + +fragment PromoCampaignPageLink on PromoCampaignPage { + title + url + system { + ...System + } +} diff --git a/packages/trpc/lib/graphql/Fragments/PageLink/PromoCampaignPageLink.graphql.ts b/packages/trpc/lib/graphql/Fragments/PageLink/PromoCampaignPageLink.graphql.ts deleted file mode 100644 index 955c519b5..000000000 --- a/packages/trpc/lib/graphql/Fragments/PageLink/PromoCampaignPageLink.graphql.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { gql } from "graphql-tag" - -import { System } from "../System.graphql" - -export const PromoCampaignPageLink = gql` -fragment PromoCampaignPageLink on PromoCampaignPage { - title - url - system { - ...System - } -} -${System} -` diff --git a/packages/trpc/lib/graphql/Fragments/PageLink/StartPageLink.graphql b/packages/trpc/lib/graphql/Fragments/PageLink/StartPageLink.graphql new file mode 100644 index 000000000..bf1c29f0d --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/PageLink/StartPageLink.graphql @@ -0,0 +1,9 @@ +#import "../System.graphql" + +fragment StartPageLink on StartPage { + title + url + system { + ...System + } +} diff --git a/packages/trpc/lib/graphql/Fragments/PageLink/StartPageLink.graphql.ts b/packages/trpc/lib/graphql/Fragments/PageLink/StartPageLink.graphql.ts deleted file mode 100644 index beccead44..000000000 --- a/packages/trpc/lib/graphql/Fragments/PageLink/StartPageLink.graphql.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { gql } from "graphql-tag" - -import { System } from "../System.graphql" - -export const StartPageLink = gql` -fragment StartPageLink on StartPage { - title - url - system { - ...System - } -} -${System} -` diff --git a/packages/trpc/lib/graphql/Fragments/PageSettings.graphql.ts b/packages/trpc/lib/graphql/Fragments/PageSettings.graphql similarity index 53% rename from packages/trpc/lib/graphql/Fragments/PageSettings.graphql.ts rename to packages/trpc/lib/graphql/Fragments/PageSettings.graphql index 20f04cf44..9f8c06df8 100644 --- a/packages/trpc/lib/graphql/Fragments/PageSettings.graphql.ts +++ b/packages/trpc/lib/graphql/Fragments/PageSettings.graphql @@ -1,8 +1,4 @@ -import { gql } from "graphql-tag" - -export const PageSettings = gql` fragment PageSettings on PageSettings { hide_booking_widget booking_code } -` diff --git a/packages/trpc/lib/graphql/Fragments/Preamble.graphql.ts b/packages/trpc/lib/graphql/Fragments/Preamble.graphql similarity index 66% rename from packages/trpc/lib/graphql/Fragments/Preamble.graphql.ts rename to packages/trpc/lib/graphql/Fragments/Preamble.graphql index f0f82defe..215919ff5 100644 --- a/packages/trpc/lib/graphql/Fragments/Preamble.graphql.ts +++ b/packages/trpc/lib/graphql/Fragments/Preamble.graphql @@ -1,8 +1,5 @@ -import { gql } from "graphql-tag" +#import "./SysAsset.graphql" -import { SysAsset } from "./SysAsset.graphql" - -export const Preamble = gql` fragment Preamble on CurrentBlocksPage { preamble { text { @@ -18,5 +15,3 @@ fragment Preamble on CurrentBlocksPage { } } } -${SysAsset} -` diff --git a/packages/trpc/lib/graphql/Fragments/PromoCampaignPage/Ref.graphql b/packages/trpc/lib/graphql/Fragments/PromoCampaignPage/Ref.graphql new file mode 100644 index 000000000..dfda0e620 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/PromoCampaignPage/Ref.graphql @@ -0,0 +1,7 @@ +#import "../System.graphql" + +fragment PromoCampaignPageRef on PromoCampaignPage { + system { + ...System + } +} diff --git a/packages/trpc/lib/graphql/Fragments/PromoCampaignPage/Ref.graphql.ts b/packages/trpc/lib/graphql/Fragments/PromoCampaignPage/Ref.graphql.ts deleted file mode 100644 index d1dcbf8a9..000000000 --- a/packages/trpc/lib/graphql/Fragments/PromoCampaignPage/Ref.graphql.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { gql } from "graphql-tag" - -import { System } from "../System.graphql" - -export const PromoCampaignPageRef = gql` -fragment PromoCampaignPageRef on PromoCampaignPage { - system { - ...System - } -} -${System} -` diff --git a/packages/trpc/lib/graphql/Fragments/Puff.graphql.ts b/packages/trpc/lib/graphql/Fragments/Puff.graphql similarity index 60% rename from packages/trpc/lib/graphql/Fragments/Puff.graphql.ts rename to packages/trpc/lib/graphql/Fragments/Puff.graphql index f18518a0d..05276c051 100644 --- a/packages/trpc/lib/graphql/Fragments/Puff.graphql.ts +++ b/packages/trpc/lib/graphql/Fragments/Puff.graphql @@ -1,8 +1,5 @@ -import { gql } from "graphql-tag" +#import "./SysAsset.graphql" -import { SysAsset } from "./SysAsset.graphql" - -export const Puff = gql` fragment Puff on Puff { imageConnection { edges { @@ -21,5 +18,3 @@ fragment Puff on Puff { } title } -${SysAsset} -` diff --git a/packages/trpc/lib/graphql/Fragments/Sidebar/Content.graphql b/packages/trpc/lib/graphql/Fragments/Sidebar/Content.graphql new file mode 100644 index 000000000..7615c183a --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Sidebar/Content.graphql @@ -0,0 +1,140 @@ +#import "../SysAsset.graphql" +#import "../ImageContainer.graphql" + +#import "../PageLink/AccountPageLink.graphql" +#import "../PageLink/CampaignOverviewPageLink.graphql" +#import "../PageLink/CampaignPageLink.graphql" +#import "../PageLink/CollectionPageLink.graphql" +#import "../PageLink/ContentPageLink.graphql" +#import "../PageLink/DestinationCityPageLink.graphql" +#import "../PageLink/DestinationCountryPageLink.graphql" +#import "../PageLink/DestinationOverviewPageLink.graphql" +#import "../PageLink/HotelPageLink.graphql" +#import "../PageLink/LoyaltyPageLink.graphql" +#import "../PageLink/StartPageLink.graphql" +#import "../PageLink/PromoCampaignPageLink.graphql" + +#import "../AccountPage/Ref.graphql" +#import "../CampaignOverviewPage/Ref.graphql" +#import "../CampaignPage/Ref.graphql" +#import "../CollectionPage/Ref.graphql" +#import "../ContentPage/Ref.graphql" +#import "../DestinationCityPage/Ref.graphql" +#import "../DestinationCountryPage/Ref.graphql" +#import "../DestinationOverviewPage/Ref.graphql" +#import "../HotelPage/Ref.graphql" +#import "../LoyaltyPage/Ref.graphql" +#import "../StartPage/Ref.graphql" +#import "../PromoCampaignPage/Ref.graphql" + +fragment ContentSidebar_ContentPage on ContentPageSidebarContent { + content { + content { + json + embedded_itemsConnection { + edges { + node { + __typename + ...SysAsset + ...ImageContainer + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + } + } +} + +fragment ContentSidebar_ContentPageRefs on ContentPageSidebarContent { + content { + content { + embedded_itemsConnection { + edges { + node { + __typename + ...ImageContainerRef + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + } +} + +fragment ContentSidebar_LoyaltyPage on LoyaltyPageSidebarContent { + content { + content { + json + embedded_itemsConnection { + edges { + node { + __typename + ...SysAsset + ...ImageContainer + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + } + } +} + +fragment ContentSidebar_LoyaltyPageRefs on LoyaltyPageSidebarContent { + content { + content { + embedded_itemsConnection { + edges { + node { + __typename + ...ImageContainerRef + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + } +} diff --git a/packages/trpc/lib/graphql/Fragments/Sidebar/Content.graphql.ts b/packages/trpc/lib/graphql/Fragments/Sidebar/Content.graphql.ts deleted file mode 100644 index e4fc52010..000000000 --- a/packages/trpc/lib/graphql/Fragments/Sidebar/Content.graphql.ts +++ /dev/null @@ -1,202 +0,0 @@ -import { gql } from "graphql-tag" - -import { AccountPageRef } from "../AccountPage/Ref.graphql" -import { CampaignOverviewPageRef } from "../CampaignOverviewPage/Ref.graphql" -import { CampaignPageRef } from "../CampaignPage/Ref.graphql" -import { CollectionPageRef } from "../CollectionPage/Ref.graphql" -import { ContentPageRef } from "../ContentPage/Ref.graphql" -import { DestinationCityPageRef } from "../DestinationCityPage/Ref.graphql" -import { DestinationCountryPageRef } from "../DestinationCountryPage/Ref.graphql" -import { DestinationOverviewPageRef } from "../DestinationOverviewPage/Ref.graphql" -import { HotelPageRef } from "../HotelPage/Ref.graphql" -import { ImageContainer, ImageContainerRef } from "../ImageContainer.graphql" -import { LoyaltyPageRef } from "../LoyaltyPage/Ref.graphql" -import { AccountPageLink } from "../PageLink/AccountPageLink.graphql" -import { CampaignOverviewPageLink } from "../PageLink/CampaignOverviewPageLink.graphql" -import { CampaignPageLink } from "../PageLink/CampaignPageLink.graphql" -import { CollectionPageLink } from "../PageLink/CollectionPageLink.graphql" -import { ContentPageLink } from "../PageLink/ContentPageLink.graphql" -import { DestinationCityPageLink } from "../PageLink/DestinationCityPageLink.graphql" -import { DestinationCountryPageLink } from "../PageLink/DestinationCountryPageLink.graphql" -import { DestinationOverviewPageLink } from "../PageLink/DestinationOverviewPageLink.graphql" -import { HotelPageLink } from "../PageLink/HotelPageLink.graphql" -import { LoyaltyPageLink } from "../PageLink/LoyaltyPageLink.graphql" -import { PromoCampaignPageLink } from "../PageLink/PromoCampaignPageLink.graphql" -import { StartPageLink } from "../PageLink/StartPageLink.graphql" -import { PromoCampaignPageRef } from "../PromoCampaignPage/Ref.graphql" -import { StartPageRef } from "../StartPage/Ref.graphql" -import { SysAsset } from "../SysAsset.graphql" - -export const ContentSidebar_ContentPage = gql` - fragment ContentSidebar_ContentPage on ContentPageSidebarContent { - content { - content { - json - embedded_itemsConnection { - edges { - node { - __typename - ...SysAsset - ...ImageContainer - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - } - } - } - ${SysAsset} - ${ImageContainer} - ${AccountPageLink} - ${CampaignOverviewPageLink} - ${CampaignPageLink} - ${CollectionPageLink} - ${ContentPageLink} - ${DestinationCityPageLink} - ${DestinationCountryPageLink} - ${DestinationOverviewPageLink} - ${HotelPageLink} - ${LoyaltyPageLink} - ${StartPageLink} - ${PromoCampaignPageLink} -` - -export const ContentSidebar_ContentPageRefs = gql` - fragment ContentSidebar_ContentPageRefs on ContentPageSidebarContent { - content { - content { - embedded_itemsConnection { - edges { - node { - __typename - ...ImageContainerRef - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - } - } - ${ImageContainerRef} - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${CollectionPageRef} - ${ContentPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${StartPageRef} - ${PromoCampaignPageRef} -` - -export const ContentSidebar_LoyaltyPage = gql` - fragment ContentSidebar_LoyaltyPage on LoyaltyPageSidebarContent { - content { - content { - json - embedded_itemsConnection { - edges { - node { - __typename - ...SysAsset - ...ImageContainer - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - } - } - } - ${SysAsset} - ${ImageContainer} - ${AccountPageLink} - ${CampaignOverviewPageLink} - ${CampaignPageLink} - ${CollectionPageLink} - ${ContentPageLink} - ${DestinationCityPageLink} - ${DestinationCountryPageLink} - ${DestinationOverviewPageLink} - ${HotelPageLink} - ${LoyaltyPageLink} - ${StartPageLink} - ${PromoCampaignPageLink} -` - -export const ContentSidebar_LoyaltyPageRefs = gql` - fragment ContentSidebar_LoyaltyPageRefs on LoyaltyPageSidebarContent { - content { - content { - embedded_itemsConnection { - edges { - node { - __typename - ...ImageContainerRef - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - } - } - ${ImageContainerRef} - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${CollectionPageRef} - ${ContentPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${StartPageRef} - ${PromoCampaignPageRef} -` diff --git a/packages/trpc/lib/graphql/Fragments/Sidebar/DynamicContent.graphql.ts b/packages/trpc/lib/graphql/Fragments/Sidebar/DynamicContent.graphql similarity index 62% rename from packages/trpc/lib/graphql/Fragments/Sidebar/DynamicContent.graphql.ts rename to packages/trpc/lib/graphql/Fragments/Sidebar/DynamicContent.graphql index 220a35f88..9d9da6e58 100644 --- a/packages/trpc/lib/graphql/Fragments/Sidebar/DynamicContent.graphql.ts +++ b/packages/trpc/lib/graphql/Fragments/Sidebar/DynamicContent.graphql @@ -1,17 +1,11 @@ -import { gql } from "graphql-tag" - -export const DynamicContentSidebar_ContentPage = gql` fragment DynamicContentSidebar_ContentPage on ContentPageSidebarDynamicContent { dynamic_content { component } } -` -export const DynamicContentSidebar_LoyaltyPage = gql` fragment DynamicContentSidebar_LoyaltyPage on LoyaltyPageSidebarDynamicContent { dynamic_content { component } } -` diff --git a/packages/trpc/lib/graphql/Fragments/Sidebar/JoinLoyaltyContact.graphql b/packages/trpc/lib/graphql/Fragments/Sidebar/JoinLoyaltyContact.graphql new file mode 100644 index 000000000..a765b6faf --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Sidebar/JoinLoyaltyContact.graphql @@ -0,0 +1,167 @@ +#import "../PageLink/AccountPageLink.graphql" +#import "../PageLink/CampaignOverviewPageLink.graphql" +#import "../PageLink/CampaignPageLink.graphql" +#import "../PageLink/CollectionPageLink.graphql" +#import "../PageLink/ContentPageLink.graphql" +#import "../PageLink/DestinationCityPageLink.graphql" +#import "../PageLink/DestinationCountryPageLink.graphql" +#import "../PageLink/DestinationOverviewPageLink.graphql" +#import "../PageLink/HotelPageLink.graphql" +#import "../PageLink/LoyaltyPageLink.graphql" +#import "../PageLink/StartPageLink.graphql" +#import "../PageLink/PromoCampaignPageLink.graphql" + +#import "../AccountPage/Ref.graphql" +#import "../CampaignOverviewPage/Ref.graphql" +#import "../CampaignPage/Ref.graphql" +#import "../CollectionPage/Ref.graphql" +#import "../ContentPage/Ref.graphql" +#import "../DestinationCityPage/Ref.graphql" +#import "../DestinationCountryPage/Ref.graphql" +#import "../DestinationOverviewPage/Ref.graphql" +#import "../HotelPage/Ref.graphql" +#import "../LoyaltyPage/Ref.graphql" +#import "../StartPage/Ref.graphql" +#import "../PromoCampaignPage/Ref.graphql" + +fragment ContactFields on ContactFields { + display_text + contact_field + contact_footnote +} + +fragment JoinLoyaltyContactSidebar_ContentPage on ContentPageSidebarJoinLoyaltyContact { + join_loyalty_contact { + preamble + title + button { + cta_text + open_in_new_tab + external_link { + href + title + } + linkConnection { + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + } + contact { + __typename + ... on ContentPageSidebarJoinLoyaltyContactBlockContactContact { + contact { + ...ContactFields + } + } + } + } +} + +fragment JoinLoyaltyContactSidebar_ContentPageRefs on ContentPageSidebarJoinLoyaltyContact { + join_loyalty_contact { + button { + linkConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + } +} + +fragment JoinLoyaltyContactSidebar_LoyaltyPage on LoyaltyPageSidebarJoinLoyaltyContact { + join_loyalty_contact { + preamble + title + button { + cta_text + open_in_new_tab + external_link { + href + title + } + linkConnection { + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + } + contact { + __typename + ... on LoyaltyPageSidebarJoinLoyaltyContactBlockContactContact { + contact { + ...ContactFields + } + } + } + } +} + +fragment JoinLoyaltyContactSidebar_LoyaltyPageRefs on LoyaltyPageSidebarJoinLoyaltyContact { + join_loyalty_contact { + button { + linkConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + } +} diff --git a/packages/trpc/lib/graphql/Fragments/Sidebar/JoinLoyaltyContact.graphql.ts b/packages/trpc/lib/graphql/Fragments/Sidebar/JoinLoyaltyContact.graphql.ts deleted file mode 100644 index ea33ef7d6..000000000 --- a/packages/trpc/lib/graphql/Fragments/Sidebar/JoinLoyaltyContact.graphql.ts +++ /dev/null @@ -1,228 +0,0 @@ -import { gql } from "graphql-tag" - -import { AccountPageRef } from "../AccountPage/Ref.graphql" -import { CampaignOverviewPageRef } from "../CampaignOverviewPage/Ref.graphql" -import { CampaignPageRef } from "../CampaignPage/Ref.graphql" -import { CollectionPageRef } from "../CollectionPage/Ref.graphql" -import { ContentPageRef } from "../ContentPage/Ref.graphql" -import { DestinationCityPageRef } from "../DestinationCityPage/Ref.graphql" -import { DestinationCountryPageRef } from "../DestinationCountryPage/Ref.graphql" -import { DestinationOverviewPageRef } from "../DestinationOverviewPage/Ref.graphql" -import { HotelPageRef } from "../HotelPage/Ref.graphql" -import { LoyaltyPageRef } from "../LoyaltyPage/Ref.graphql" -import { AccountPageLink } from "../PageLink/AccountPageLink.graphql" -import { CampaignOverviewPageLink } from "../PageLink/CampaignOverviewPageLink.graphql" -import { CampaignPageLink } from "../PageLink/CampaignPageLink.graphql" -import { CollectionPageLink } from "../PageLink/CollectionPageLink.graphql" -import { ContentPageLink } from "../PageLink/ContentPageLink.graphql" -import { DestinationCityPageLink } from "../PageLink/DestinationCityPageLink.graphql" -import { DestinationCountryPageLink } from "../PageLink/DestinationCountryPageLink.graphql" -import { DestinationOverviewPageLink } from "../PageLink/DestinationOverviewPageLink.graphql" -import { HotelPageLink } from "../PageLink/HotelPageLink.graphql" -import { LoyaltyPageLink } from "../PageLink/LoyaltyPageLink.graphql" -import { PromoCampaignPageLink } from "../PageLink/PromoCampaignPageLink.graphql" -import { StartPageLink } from "../PageLink/StartPageLink.graphql" -import { PromoCampaignPageRef } from "../PromoCampaignPage/Ref.graphql" -import { StartPageRef } from "../StartPage/Ref.graphql" - -export const ContactFields = gql` - fragment ContactFields on ContactFields { - display_text - contact_field - contact_footnote - } -` - -export const JoinLoyaltyContactSidebar_ContentPage = gql` - fragment JoinLoyaltyContactSidebar_ContentPage on ContentPageSidebarJoinLoyaltyContact { - join_loyalty_contact { - preamble - title - button { - cta_text - open_in_new_tab - external_link { - href - title - } - linkConnection { - edges { - node { - __typename - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - } - contact { - __typename - ... on ContentPageSidebarJoinLoyaltyContactBlockContactContact { - contact { - ...ContactFields - } - } - } - } - } - ${ContactFields} - ${AccountPageLink} - ${CampaignOverviewPageLink} - ${CampaignPageLink} - ${CollectionPageLink} - ${ContentPageLink} - ${DestinationCityPageLink} - ${DestinationCountryPageLink} - ${DestinationOverviewPageLink} - ${HotelPageLink} - ${LoyaltyPageLink} - ${StartPageLink} - ${PromoCampaignPageLink} -` - -export const JoinLoyaltyContactSidebar_ContentPageRefs = gql` - fragment JoinLoyaltyContactSidebar_ContentPageRefs on ContentPageSidebarJoinLoyaltyContact { - join_loyalty_contact { - button { - linkConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - } - } - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${CollectionPageRef} - ${ContentPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${StartPageRef} - ${PromoCampaignPageRef} -` - -export const JoinLoyaltyContactSidebar_LoyaltyPage = gql` - fragment JoinLoyaltyContactSidebar_LoyaltyPage on LoyaltyPageSidebarJoinLoyaltyContact { - join_loyalty_contact { - preamble - title - button { - cta_text - open_in_new_tab - external_link { - href - title - } - linkConnection { - edges { - node { - __typename - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - } - contact { - __typename - ... on LoyaltyPageSidebarJoinLoyaltyContactBlockContactContact { - contact { - ...ContactFields - } - } - } - } - } - ${ContactFields} - ${AccountPageLink} - ${CampaignOverviewPageLink} - ${CampaignPageLink} - ${CollectionPageLink} - ${ContentPageLink} - ${DestinationCityPageLink} - ${DestinationCountryPageLink} - ${DestinationOverviewPageLink} - ${HotelPageLink} - ${LoyaltyPageLink} - ${StartPageLink} - ${PromoCampaignPageLink} -` - -export const JoinLoyaltyContactSidebar_LoyaltyPageRefs = gql` - fragment JoinLoyaltyContactSidebar_LoyaltyPageRefs on LoyaltyPageSidebarJoinLoyaltyContact { - join_loyalty_contact { - button { - linkConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - } - } - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${CollectionPageRef} - ${ContentPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${StartPageRef} - ${PromoCampaignPageRef} -` diff --git a/packages/trpc/lib/graphql/Fragments/Sidebar/QuickLinks.graphql b/packages/trpc/lib/graphql/Fragments/Sidebar/QuickLinks.graphql new file mode 100644 index 000000000..c471b0151 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Sidebar/QuickLinks.graphql @@ -0,0 +1,23 @@ +#import "../AccountPage/Ref.graphql" +#import "../ContentPage/Ref.graphql" +#import "../LoyaltyPage/Ref.graphql" + +#import "../PageLink/AccountPageLink.graphql" +#import "../PageLink/ContentPageLink.graphql" +#import "../PageLink/LoyaltyPageLink.graphql" + +#import "../Blocks/Shortcuts.graphql" + +fragment QuickLinksSidebar_ContentPage on ContentPageSidebarShortcuts { + __typename + shortcuts { + ...Shortcuts + } +} + +fragment QuickLinksSidebar_ContentPageRefs on ContentPageSidebarShortcuts { + shortcuts { + __typename + ...ShortcutsRefs + } +} diff --git a/packages/trpc/lib/graphql/Fragments/Sidebar/QuickLinks.graphql.ts b/packages/trpc/lib/graphql/Fragments/Sidebar/QuickLinks.graphql.ts deleted file mode 100644 index 7e377718f..000000000 --- a/packages/trpc/lib/graphql/Fragments/Sidebar/QuickLinks.graphql.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { gql } from "graphql-tag" - -import { Shortcuts, ShortcutsRefs } from "../Blocks/Shortcuts.graphql" - -export const QuickLinksSidebar_ContentPage = gql` - fragment QuickLinksSidebar_ContentPage on ContentPageSidebarShortcuts { - __typename - shortcuts { - ...Shortcuts - } - } - ${Shortcuts} -` - -export const QuickLinksSidebar_ContentPageRefs = gql` - fragment QuickLinksSidebar_ContentPageRefs on ContentPageSidebarShortcuts { - shortcuts { - __typename - ...ShortcutsRefs - } - } - ${ShortcutsRefs} -` diff --git a/packages/trpc/lib/graphql/Fragments/Sidebar/ScriptedCard.graphql b/packages/trpc/lib/graphql/Fragments/Sidebar/ScriptedCard.graphql new file mode 100644 index 000000000..8da37a196 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Sidebar/ScriptedCard.graphql @@ -0,0 +1,38 @@ +#import "../AccountPage/Ref.graphql" +#import "../ContentPage/Ref.graphql" +#import "../LoyaltyPage/Ref.graphql" + +#import "../PageLink/AccountPageLink.graphql" +#import "../PageLink/ContentPageLink.graphql" +#import "../PageLink/LoyaltyPageLink.graphql" + +#import "../Blocks/Card.graphql" +#import "../Blocks/Refs/Card.graphql" + +fragment ScriptedCardSidebar_ContentPage on ContentPageSidebarScriptedCard { + __typename + scripted_card { + theme + scripted_cardConnection { + edges { + node { + __typename + ...CardBlock + } + } + } + } +} + +fragment ScriptedCardSidebar_ContentPageRefs on ContentPageSidebarScriptedCard { + scripted_card { + scripted_cardConnection { + edges { + node { + __typename + ...CardBlockRef + } + } + } + } +} diff --git a/packages/trpc/lib/graphql/Fragments/Sidebar/ScriptedCard.graphql.ts b/packages/trpc/lib/graphql/Fragments/Sidebar/ScriptedCard.graphql.ts deleted file mode 100644 index 318b86f8e..000000000 --- a/packages/trpc/lib/graphql/Fragments/Sidebar/ScriptedCard.graphql.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { gql } from "graphql-tag" - -import { CardBlock } from "../Blocks/Card.graphql" -import { CardBlockRef } from "../Blocks/Refs/Card.graphql" - -export const ScriptedCardSidebar_ContentPage = gql` - fragment ScriptedCardSidebar_ContentPage on ContentPageSidebarScriptedCard { - __typename - scripted_card { - theme - scripted_cardConnection { - edges { - node { - __typename - ...CardBlock - } - } - } - } - } - ${CardBlock} -` - -export const ScriptedCardSidebar_ContentPageRefs = gql` - fragment ScriptedCardSidebar_ContentPageRefs on ContentPageSidebarScriptedCard { - scripted_card { - scripted_cardConnection { - edges { - node { - __typename - ...CardBlockRef - } - } - } - } - } - ${CardBlockRef} -` diff --git a/packages/trpc/lib/graphql/Fragments/Sidebar/TeaserCard.graphql b/packages/trpc/lib/graphql/Fragments/Sidebar/TeaserCard.graphql new file mode 100644 index 000000000..446c7e6d7 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Sidebar/TeaserCard.graphql @@ -0,0 +1,38 @@ +#import "../AccountPage/Ref.graphql" +#import "../ContentPage/Ref.graphql" +#import "../LoyaltyPage/Ref.graphql" + +#import "../PageLink/AccountPageLink.graphql" +#import "../PageLink/ContentPageLink.graphql" +#import "../PageLink/LoyaltyPageLink.graphql" + +#import "../Blocks/TeaserCard.graphql" +#import "../Blocks/Refs/TeaserCard.graphql" + +fragment TeaserCardSidebar_ContentPage on ContentPageSidebarTeaserCard { + __typename + teaser_card { + theme + teaser_cardConnection { + edges { + node { + __typename + ...TeaserCardBlock + } + } + } + } +} + +fragment TeaserCardSidebar_ContentPageRefs on ContentPageSidebarTeaserCard { + teaser_card { + teaser_cardConnection { + edges { + node { + __typename + ...TeaserCardBlockRef + } + } + } + } +} diff --git a/packages/trpc/lib/graphql/Fragments/Sidebar/TeaserCard.graphql.ts b/packages/trpc/lib/graphql/Fragments/Sidebar/TeaserCard.graphql.ts deleted file mode 100644 index aa7840b80..000000000 --- a/packages/trpc/lib/graphql/Fragments/Sidebar/TeaserCard.graphql.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { gql } from "graphql-tag" - -import { TeaserCardBlockRef } from "../Blocks/Refs/TeaserCard.graphql" -import { TeaserCardBlock } from "../Blocks/TeaserCard.graphql" - -export const TeaserCardSidebar_ContentPage = gql` - fragment TeaserCardSidebar_ContentPage on ContentPageSidebarTeaserCard { - __typename - teaser_card { - theme - teaser_cardConnection { - edges { - node { - __typename - ...TeaserCardBlock - } - } - } - } - } - ${TeaserCardBlock} -` - -export const TeaserCardSidebar_ContentPageRefs = gql` - fragment TeaserCardSidebar_ContentPageRefs on ContentPageSidebarTeaserCard { - teaser_card { - teaser_cardConnection { - edges { - node { - __typename - ...TeaserCardBlockRef - } - } - } - } - } - ${TeaserCardBlockRef} -` diff --git a/packages/trpc/lib/graphql/Fragments/StartPage/Ref.graphql b/packages/trpc/lib/graphql/Fragments/StartPage/Ref.graphql new file mode 100644 index 000000000..29c980264 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/StartPage/Ref.graphql @@ -0,0 +1,7 @@ +#import "../System.graphql" + +fragment StartPageRef on StartPage { + system { + ...System + } +} diff --git a/packages/trpc/lib/graphql/Fragments/StartPage/Ref.graphql.ts b/packages/trpc/lib/graphql/Fragments/StartPage/Ref.graphql.ts deleted file mode 100644 index fdd1ca303..000000000 --- a/packages/trpc/lib/graphql/Fragments/StartPage/Ref.graphql.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { gql } from "graphql-tag" - -import { System } from "../System.graphql" - -export const StartPageRef = gql` -fragment StartPageRef on StartPage { - system { - ...System - } -} -${System} -` diff --git a/packages/trpc/lib/graphql/Fragments/SysAsset.graphql.ts b/packages/trpc/lib/graphql/Fragments/SysAsset.graphql similarity index 69% rename from packages/trpc/lib/graphql/Fragments/SysAsset.graphql.ts rename to packages/trpc/lib/graphql/Fragments/SysAsset.graphql index 1c4714fb8..499e05778 100644 --- a/packages/trpc/lib/graphql/Fragments/SysAsset.graphql.ts +++ b/packages/trpc/lib/graphql/Fragments/SysAsset.graphql @@ -1,6 +1,3 @@ -import { gql } from "graphql-tag" - -export const SysAsset = gql` fragment SysAsset on SysAsset { content_type description @@ -15,4 +12,3 @@ fragment SysAsset on SysAsset { title url } -` diff --git a/packages/trpc/lib/graphql/Fragments/System.graphql.ts b/packages/trpc/lib/graphql/Fragments/System.graphql similarity index 53% rename from packages/trpc/lib/graphql/Fragments/System.graphql.ts rename to packages/trpc/lib/graphql/Fragments/System.graphql index dd1255b66..2706540ce 100644 --- a/packages/trpc/lib/graphql/Fragments/System.graphql.ts +++ b/packages/trpc/lib/graphql/Fragments/System.graphql @@ -1,9 +1,5 @@ -import { gql } from "graphql-tag" - -export const System = gql` fragment System on EntrySystemField { content_type_uid locale uid } -` diff --git a/packages/trpc/lib/graphql/Fragments/SystemFragment.graphql.ts b/packages/trpc/lib/graphql/Fragments/SystemFragment.graphql.ts deleted file mode 100644 index f2f8061c9..000000000 --- a/packages/trpc/lib/graphql/Fragments/SystemFragment.graphql.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { gql } from "graphql-tag" - -export const SystemFragment = gql` - fragment SystemFragment on EntrySystemField { - content_type_uid - locale - uid - } -` diff --git a/packages/trpc/lib/graphql/Query/AccountPage/AccountPage.graphql b/packages/trpc/lib/graphql/Query/AccountPage/AccountPage.graphql new file mode 100644 index 000000000..489848c1a --- /dev/null +++ b/packages/trpc/lib/graphql/Query/AccountPage/AccountPage.graphql @@ -0,0 +1,70 @@ +#import "../../Fragments/System.graphql" + +#import "../../Fragments/Blocks/Accordion.graphql" +#import "../../Fragments/Blocks/DynamicContent.graphql" +#import "../../Fragments/Blocks/Shortcuts.graphql" +#import "../../Fragments/Blocks/TextContent.graphql" + +query GetAccountPage($locale: String!, $uid: String!) { + account_page(locale: $locale, uid: $uid) { + heading + preamble + hero_image + hero_image_active + title + url + content { + __typename + ...Accordion_AccountPage + ...DynamicContent_AccountPage + ...Shortcuts_AccountPage + ...TextContent_AccountPage + } + system { + ...System + created_at + updated_at + } + } + trackingProps: account_page(locale: "en", uid: $uid) { + url + } +} + +query GetAccountPageRefs($locale: String!, $uid: String!) { + account_page(locale: $locale, uid: $uid) { + content { + __typename + ...Accordion_AccountPageRefs + ...DynamicContent_AccountPageRefs + ...Shortcuts_AccountPageRefs + } + system { + ...System + } + } +} + +query GetDaDeEnUrlsAccountPage($uid: String!) { + de: account_page(locale: "de", uid: $uid) { + url + } + en: account_page(locale: "en", uid: $uid) { + url + } + da: account_page(locale: "da", uid: $uid) { + url + } +} + +query GetFiNoSvUrlsAccountPage($uid: String!) { + fi: account_page(locale: "fi", uid: $uid) { + url + } + no: account_page(locale: "no", uid: $uid) { + url + } + sv: account_page(locale: "sv", uid: $uid) { + url + } +} diff --git a/packages/trpc/lib/graphql/Query/AccountPage/AccountPage.graphql.ts b/packages/trpc/lib/graphql/Query/AccountPage/AccountPage.graphql.ts deleted file mode 100644 index e4a5ac122..000000000 --- a/packages/trpc/lib/graphql/Query/AccountPage/AccountPage.graphql.ts +++ /dev/null @@ -1,97 +0,0 @@ -import { gql } from "graphql-tag" - -import { - Accordion_AccountPage, - Accordion_AccountPageRefs, -} from "../../Fragments/Blocks/Accordion.graphql" -import { - DynamicContent_AccountPage, - DynamicContent_AccountPageRefs, -} from "../../Fragments/Blocks/DynamicContent.graphql" -import { - Shortcuts_AccountPage, - Shortcuts_AccountPageRefs, -} from "../../Fragments/Blocks/Shortcuts.graphql" -import { TextContent_AccountPage } from "../../Fragments/Blocks/TextContent.graphql" -import { System } from "../../Fragments/System.graphql" - -export const GetAccountPage = gql` - query GetAccountPage($locale: String!, $uid: String!) { - account_page(locale: $locale, uid: $uid) { - heading - preamble - hero_image - hero_image_active - title - url - content { - __typename - ...Accordion_AccountPage - ...DynamicContent_AccountPage - ...Shortcuts_AccountPage - ...TextContent_AccountPage - } - system { - ...System - created_at - updated_at - } - } - trackingProps: account_page(locale: "en", uid: $uid) { - url - } - } - ${System} - ${Accordion_AccountPage} - ${DynamicContent_AccountPage} - ${Shortcuts_AccountPage} - ${TextContent_AccountPage} -` - -export const GetAccountPageRefs = gql` - query GetAccountPageRefs($locale: String!, $uid: String!) { - account_page(locale: $locale, uid: $uid) { - content { - __typename - ...Accordion_AccountPageRefs - ...DynamicContent_AccountPageRefs - ...Shortcuts_AccountPageRefs - } - system { - ...System - } - } - } - ${System} - ${Accordion_AccountPageRefs} - ${DynamicContent_AccountPageRefs} - ${Shortcuts_AccountPageRefs} -` - -export const GetDaDeEnUrlsAccountPage = gql` - query GetDaDeEnUrlsAccountPage($uid: String!) { - de: account_page(locale: "de", uid: $uid) { - url - } - en: account_page(locale: "en", uid: $uid) { - url - } - da: account_page(locale: "da", uid: $uid) { - url - } - } -` - -export const GetFiNoSvUrlsAccountPage = gql` - query GetFiNoSvUrlsAccountPage($uid: String!) { - fi: account_page(locale: "fi", uid: $uid) { - url - } - no: account_page(locale: "no", uid: $uid) { - url - } - sv: account_page(locale: "sv", uid: $uid) { - url - } - } -` diff --git a/packages/trpc/lib/graphql/Query/AccountPage/Metadata.graphql.ts b/packages/trpc/lib/graphql/Query/AccountPage/Metadata.graphql similarity index 54% rename from packages/trpc/lib/graphql/Query/AccountPage/Metadata.graphql.ts rename to packages/trpc/lib/graphql/Query/AccountPage/Metadata.graphql index e41c0b958..94073ac91 100644 --- a/packages/trpc/lib/graphql/Query/AccountPage/Metadata.graphql.ts +++ b/packages/trpc/lib/graphql/Query/AccountPage/Metadata.graphql @@ -1,9 +1,6 @@ -import { gql } from "graphql-tag" +#import "../../Fragments/Metadata.graphql" +#import "../../Fragments/System.graphql" -import { Metadata } from "../../Fragments/Metadata.graphql" -import { System } from "../../Fragments/System.graphql" - -export const GetAccountPageMetadata = gql` query GetAccountPageMetadata($locale: String!, $uid: String!) { account_page(locale: $locale, uid: $uid) { web { @@ -19,6 +16,3 @@ query GetAccountPageMetadata($locale: String!, $uid: String!) { } } } -${Metadata} -${System} -` diff --git a/packages/trpc/lib/graphql/Query/AccountPage/Navigation.graphql b/packages/trpc/lib/graphql/Query/AccountPage/Navigation.graphql new file mode 100644 index 000000000..6a175117d --- /dev/null +++ b/packages/trpc/lib/graphql/Query/AccountPage/Navigation.graphql @@ -0,0 +1,93 @@ +#import "../../Fragments/System.graphql" + +#import "../../Fragments/PageLink/AccountPageLink.graphql" +#import "../../Fragments/PageLink/CampaignOverviewPageLink.graphql" +#import "../../Fragments/PageLink/CampaignPageLink.graphql" +#import "../../Fragments/PageLink/CollectionPageLink.graphql" +#import "../../Fragments/PageLink/ContentPageLink.graphql" +#import "../../Fragments/PageLink/DestinationCityPageLink.graphql" +#import "../../Fragments/PageLink/DestinationCountryPageLink.graphql" +#import "../../Fragments/PageLink/DestinationOverviewPageLink.graphql" +#import "../../Fragments/PageLink/HotelPageLink.graphql" +#import "../../Fragments/PageLink/LoyaltyPageLink.graphql" +#import "../../Fragments/PageLink/StartPageLink.graphql" +#import "../../Fragments/PageLink/PromoCampaignPageLink.graphql" + +#import "../../Fragments/AccountPage/Ref.graphql" +#import "../../Fragments/CampaignOverviewPage/Ref.graphql" +#import "../../Fragments/CampaignPage/Ref.graphql" +#import "../../Fragments/CollectionPage/Ref.graphql" +#import "../../Fragments/ContentPage/Ref.graphql" +#import "../../Fragments/DestinationCityPage/Ref.graphql" +#import "../../Fragments/DestinationCountryPage/Ref.graphql" +#import "../../Fragments/DestinationOverviewPage/Ref.graphql" +#import "../../Fragments/HotelPage/Ref.graphql" +#import "../../Fragments/LoyaltyPage/Ref.graphql" +#import "../../Fragments/StartPage/Ref.graphql" +#import "../../Fragments/PromoCampaignPage/Ref.graphql" + +query GetNavigationMyPages($locale: String!) { + all_navigation_my_pages(locale: $locale, limit: 1) { + items { + menu_items { + display_sign_out_link + links { + link_text + page: pageConnection { + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + } + } + title + } + } +} + +query GetNavigationMyPagesRefs($locale: String!) { + all_navigation_my_pages(locale: $locale, limit: 1) { + items { + menu_items { + links { + page: pageConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + } + system { + ...System + } + } + } +} diff --git a/packages/trpc/lib/graphql/Query/AccountPage/Navigation.graphql.ts b/packages/trpc/lib/graphql/Query/AccountPage/Navigation.graphql.ts deleted file mode 100644 index 4a1d5edd5..000000000 --- a/packages/trpc/lib/graphql/Query/AccountPage/Navigation.graphql.ts +++ /dev/null @@ -1,123 +0,0 @@ -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 GetNavigationMyPages = gql` - query GetNavigationMyPages($locale: String!) { - all_navigation_my_pages(locale: $locale, limit: 1) { - items { - menu_items { - display_sign_out_link - links { - link_text - page: pageConnection { - edges { - node { - __typename - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - } - } - title - } - } - } - ${System} - ${AccountPageLink} - ${CampaignOverviewPageLink} - ${CampaignPageLink} - ${CollectionPageLink} - ${ContentPageLink} - ${DestinationCityPageLink} - ${DestinationCountryPageLink} - ${DestinationOverviewPageLink} - ${HotelPageLink} - ${LoyaltyPageLink} - ${StartPageLink} - ${PromoCampaignPageLink} -` - -export const GetNavigationMyPagesRefs = gql` - query GetNavigationMyPagesRefs($locale: String!) { - all_navigation_my_pages(locale: $locale, limit: 1) { - items { - menu_items { - links { - page: pageConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - } - system { - ...System - } - } - } - } - ${System} - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${CollectionPageRef} - ${ContentPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${StartPageRef} - ${PromoCampaignPageRef} -` diff --git a/packages/trpc/lib/graphql/Query/Breadcrumbs/AccountPage.graphql b/packages/trpc/lib/graphql/Query/Breadcrumbs/AccountPage.graphql new file mode 100644 index 000000000..1c316e60b --- /dev/null +++ b/packages/trpc/lib/graphql/Query/Breadcrumbs/AccountPage.graphql @@ -0,0 +1,29 @@ +#import "../../Fragments/Breadcrumbs/Breadcrumbs.graphql" +#import "../../Fragments/System.graphql" + +query GetMyPagesBreadcrumbs($locale: String!, $uid: String!) { + account_page(locale: $locale, uid: $uid) { + url + web { + breadcrumbs { + ...Breadcrumbs + } + } + system { + ...System + } + } +} + +query GetMyPagesBreadcrumbsRefs($locale: String!, $uid: String!) { + account_page(locale: $locale, uid: $uid) { + web { + breadcrumbs { + ...BreadcrumbsRefs + } + } + system { + ...System + } + } +} diff --git a/packages/trpc/lib/graphql/Query/Breadcrumbs/AccountPage.graphql.ts b/packages/trpc/lib/graphql/Query/Breadcrumbs/AccountPage.graphql.ts deleted file mode 100644 index 680fbd1fc..000000000 --- a/packages/trpc/lib/graphql/Query/Breadcrumbs/AccountPage.graphql.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { gql } from "graphql-tag" - -import { - Breadcrumbs, - BreadcrumbsRefs, -} from "../../Fragments/Breadcrumbs/Breadcrumbs.graphql" -import { System } from "../../Fragments/System.graphql" - -export const GetMyPagesBreadcrumbs = gql` - query GetMyPagesBreadcrumbs($locale: String!, $uid: String!) { - account_page(locale: $locale, uid: $uid) { - url - web { - breadcrumbs { - ...Breadcrumbs - } - } - system { - ...System - } - } - } - ${Breadcrumbs} - ${System} -` - -export const GetMyPagesBreadcrumbsRefs = gql` - query GetMyPagesBreadcrumbsRefs($locale: String!, $uid: String!) { - account_page(locale: $locale, uid: $uid) { - web { - breadcrumbs { - ...BreadcrumbsRefs - } - } - system { - ...System - } - } - } - ${BreadcrumbsRefs} - ${System} -` diff --git a/packages/trpc/lib/graphql/Query/Breadcrumbs/CampaignOverviewPage.graphql b/packages/trpc/lib/graphql/Query/Breadcrumbs/CampaignOverviewPage.graphql new file mode 100644 index 000000000..144cb64b1 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/Breadcrumbs/CampaignOverviewPage.graphql @@ -0,0 +1,29 @@ +#import "../../Fragments/Breadcrumbs/Breadcrumbs.graphql" +#import "../../Fragments/System.graphql" + +query GetCampaignOverviewPageBreadcrumbs($locale: String!, $uid: String!) { + campaign_overview_page(locale: $locale, uid: $uid) { + url + web { + breadcrumbs { + ...Breadcrumbs + } + } + system { + ...System + } + } +} + +query GetCampaignOverviewPageBreadcrumbsRefs($locale: String!, $uid: String!) { + campaign_overview_page(locale: $locale, uid: $uid) { + web { + breadcrumbs { + ...BreadcrumbsRefs + } + } + system { + ...System + } + } +} diff --git a/packages/trpc/lib/graphql/Query/Breadcrumbs/CampaignOverviewPage.graphql.ts b/packages/trpc/lib/graphql/Query/Breadcrumbs/CampaignOverviewPage.graphql.ts deleted file mode 100644 index 619c5bf0b..000000000 --- a/packages/trpc/lib/graphql/Query/Breadcrumbs/CampaignOverviewPage.graphql.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { gql } from "graphql-tag" - -import { - Breadcrumbs, - BreadcrumbsRefs, -} from "../../Fragments/Breadcrumbs/Breadcrumbs.graphql" -import { System } from "../../Fragments/System.graphql" - -export const GetCampaignOverviewPageBreadcrumbs = gql` - query GetCampaignOverviewPageBreadcrumbs($locale: String!, $uid: String!) { - campaign_overview_page(locale: $locale, uid: $uid) { - url - web { - breadcrumbs { - ...Breadcrumbs - } - } - system { - ...System - } - } - } - ${Breadcrumbs} - ${System} -` - -export const GetCampaignOverviewPageBreadcrumbsRefs = gql` - query GetCampaignOverviewPageBreadcrumbsRefs( - $locale: String! - $uid: String! - ) { - campaign_overview_page(locale: $locale, uid: $uid) { - web { - breadcrumbs { - ...BreadcrumbsRefs - } - } - system { - ...System - } - } - } - ${BreadcrumbsRefs} - ${System} -` diff --git a/packages/trpc/lib/graphql/Query/Breadcrumbs/CampaignPage.graphql b/packages/trpc/lib/graphql/Query/Breadcrumbs/CampaignPage.graphql new file mode 100644 index 000000000..1e0944f72 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/Breadcrumbs/CampaignPage.graphql @@ -0,0 +1,29 @@ +#import "../../Fragments/Breadcrumbs/Breadcrumbs.graphql" +#import "../../Fragments/System.graphql" + +query GetCampaignPageBreadcrumbs($locale: String!, $uid: String!) { + campaign_page(locale: $locale, uid: $uid) { + url + web { + breadcrumbs { + ...Breadcrumbs + } + } + system { + ...System + } + } +} + +query GetCampaignPageBreadcrumbsRefs($locale: String!, $uid: String!) { + campaign_page(locale: $locale, uid: $uid) { + web { + breadcrumbs { + ...BreadcrumbsRefs + } + } + system { + ...System + } + } +} diff --git a/packages/trpc/lib/graphql/Query/Breadcrumbs/CampaignPage.graphql.ts b/packages/trpc/lib/graphql/Query/Breadcrumbs/CampaignPage.graphql.ts deleted file mode 100644 index fea9fa560..000000000 --- a/packages/trpc/lib/graphql/Query/Breadcrumbs/CampaignPage.graphql.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { gql } from "graphql-tag" - -import { - Breadcrumbs, - BreadcrumbsRefs, -} from "../../Fragments/Breadcrumbs/Breadcrumbs.graphql" -import { System } from "../../Fragments/System.graphql" - -export const GetCampaignPageBreadcrumbs = gql` - query GetCampaignPageBreadcrumbs($locale: String!, $uid: String!) { - campaign_page(locale: $locale, uid: $uid) { - url - web { - breadcrumbs { - ...Breadcrumbs - } - } - system { - ...System - } - } - } - ${Breadcrumbs} - ${System} -` - -export const GetCampaignPageBreadcrumbsRefs = gql` - query GetCampaignPageBreadcrumbsRefs($locale: String!, $uid: String!) { - campaign_page(locale: $locale, uid: $uid) { - web { - breadcrumbs { - ...BreadcrumbsRefs - } - } - system { - ...System - } - } - } - ${BreadcrumbsRefs} - ${System} -` diff --git a/packages/trpc/lib/graphql/Query/Breadcrumbs/CollectionPage.graphql b/packages/trpc/lib/graphql/Query/Breadcrumbs/CollectionPage.graphql new file mode 100644 index 000000000..5b5ce91a6 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/Breadcrumbs/CollectionPage.graphql @@ -0,0 +1,29 @@ +#import "../../Fragments/Breadcrumbs/Breadcrumbs.graphql" +#import "../../Fragments/System.graphql" + +query GetCollectionPageBreadcrumbs($locale: String!, $uid: String!) { + collection_page(locale: $locale, uid: $uid) { + url + web { + breadcrumbs { + ...Breadcrumbs + } + } + system { + ...System + } + } +} + +query GetCollectionPageBreadcrumbsRefs($locale: String!, $uid: String!) { + collection_page(locale: $locale, uid: $uid) { + web { + breadcrumbs { + ...BreadcrumbsRefs + } + } + system { + ...System + } + } +} diff --git a/packages/trpc/lib/graphql/Query/Breadcrumbs/CollectionPage.graphql.ts b/packages/trpc/lib/graphql/Query/Breadcrumbs/CollectionPage.graphql.ts deleted file mode 100644 index 4da03602d..000000000 --- a/packages/trpc/lib/graphql/Query/Breadcrumbs/CollectionPage.graphql.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { gql } from "graphql-tag" - -import { - Breadcrumbs, - BreadcrumbsRefs, -} from "../../Fragments/Breadcrumbs/Breadcrumbs.graphql" -import { System } from "../../Fragments/System.graphql" - -export const GetCollectionPageBreadcrumbs = gql` - query GetCollectionPageBreadcrumbs($locale: String!, $uid: String!) { - collection_page(locale: $locale, uid: $uid) { - url - web { - breadcrumbs { - ...Breadcrumbs - } - } - system { - ...System - } - } - } - ${Breadcrumbs} - ${System} -` - -export const GetCollectionPageBreadcrumbsRefs = gql` - query GetCollectionPageBreadcrumbsRefs($locale: String!, $uid: String!) { - collection_page(locale: $locale, uid: $uid) { - web { - breadcrumbs { - ...BreadcrumbsRefs - } - } - system { - ...System - } - } - } - ${BreadcrumbsRefs} - ${System} -` diff --git a/packages/trpc/lib/graphql/Query/Breadcrumbs/ContentPage.graphql b/packages/trpc/lib/graphql/Query/Breadcrumbs/ContentPage.graphql new file mode 100644 index 000000000..6ecdb68d1 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/Breadcrumbs/ContentPage.graphql @@ -0,0 +1,29 @@ +#import "../../Fragments/Breadcrumbs/Breadcrumbs.graphql" +#import "../../Fragments/System.graphql" + +query GetContentPageBreadcrumbs($locale: String!, $uid: String!) { + content_page(locale: $locale, uid: $uid) { + url + web { + breadcrumbs { + ...Breadcrumbs + } + } + system { + ...System + } + } +} + +query GetContentPageBreadcrumbsRefs($locale: String!, $uid: String!) { + content_page(locale: $locale, uid: $uid) { + web { + breadcrumbs { + ...BreadcrumbsRefs + } + } + system { + ...System + } + } +} diff --git a/packages/trpc/lib/graphql/Query/Breadcrumbs/ContentPage.graphql.ts b/packages/trpc/lib/graphql/Query/Breadcrumbs/ContentPage.graphql.ts deleted file mode 100644 index 94d11e032..000000000 --- a/packages/trpc/lib/graphql/Query/Breadcrumbs/ContentPage.graphql.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { gql } from "graphql-tag" - -import { - Breadcrumbs, - BreadcrumbsRefs, -} from "../../Fragments/Breadcrumbs/Breadcrumbs.graphql" -import { System } from "../../Fragments/System.graphql" - -export const GetContentPageBreadcrumbs = gql` - query GetContentPageBreadcrumbs($locale: String!, $uid: String!) { - content_page(locale: $locale, uid: $uid) { - url - web { - breadcrumbs { - ...Breadcrumbs - } - } - system { - ...System - } - } - } - ${Breadcrumbs} - ${System} -` - -export const GetContentPageBreadcrumbsRefs = gql` - query GetContentPageBreadcrumbsRefs($locale: String!, $uid: String!) { - content_page(locale: $locale, uid: $uid) { - web { - breadcrumbs { - ...BreadcrumbsRefs - } - } - system { - ...System - } - } - } - ${BreadcrumbsRefs} - ${System} -` diff --git a/packages/trpc/lib/graphql/Query/Breadcrumbs/DestinationCityPage.graphql b/packages/trpc/lib/graphql/Query/Breadcrumbs/DestinationCityPage.graphql new file mode 100644 index 000000000..626f18542 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/Breadcrumbs/DestinationCityPage.graphql @@ -0,0 +1,29 @@ +#import "../../Fragments/Breadcrumbs/Breadcrumbs.graphql" +#import "../../Fragments/System.graphql" + +query GetDestinationCityPageBreadcrumbs($locale: String!, $uid: String!) { + destination_city_page(locale: $locale, uid: $uid) { + url + web { + breadcrumbs { + ...Breadcrumbs + } + } + system { + ...System + } + } +} + +query GetDestinationCityPageBreadcrumbsRefs($locale: String!, $uid: String!) { + destination_city_page(locale: $locale, uid: $uid) { + web { + breadcrumbs { + ...BreadcrumbsRefs + } + } + system { + ...System + } + } +} diff --git a/packages/trpc/lib/graphql/Query/Breadcrumbs/DestinationCityPage.graphql.ts b/packages/trpc/lib/graphql/Query/Breadcrumbs/DestinationCityPage.graphql.ts deleted file mode 100644 index 4afe57426..000000000 --- a/packages/trpc/lib/graphql/Query/Breadcrumbs/DestinationCityPage.graphql.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { gql } from "graphql-tag" - -import { - Breadcrumbs, - BreadcrumbsRefs, -} from "../../Fragments/Breadcrumbs/Breadcrumbs.graphql" -import { System } from "../../Fragments/System.graphql" - -export const GetDestinationCityPageBreadcrumbs = gql` - query GetDestinationCityPageBreadcrumbs($locale: String!, $uid: String!) { - destination_city_page(locale: $locale, uid: $uid) { - url - web { - breadcrumbs { - ...Breadcrumbs - } - } - system { - ...System - } - } - } - ${Breadcrumbs} - ${System} -` - -export const GetDestinationCityPageBreadcrumbsRefs = gql` - query GetDestinationCityPageBreadcrumbsRefs($locale: String!, $uid: String!) { - destination_city_page(locale: $locale, uid: $uid) { - web { - breadcrumbs { - ...BreadcrumbsRefs - } - } - system { - ...System - } - } - } - ${BreadcrumbsRefs} - ${System} -` diff --git a/packages/trpc/lib/graphql/Query/Breadcrumbs/DestinationCountryPage.graphql b/packages/trpc/lib/graphql/Query/Breadcrumbs/DestinationCountryPage.graphql new file mode 100644 index 000000000..879a3255e --- /dev/null +++ b/packages/trpc/lib/graphql/Query/Breadcrumbs/DestinationCountryPage.graphql @@ -0,0 +1,32 @@ +#import "../../Fragments/Breadcrumbs/Breadcrumbs.graphql" +#import "../../Fragments/System.graphql" + +query GetDestinationCountryPageBreadcrumbs($locale: String!, $uid: String!) { + destination_country_page(locale: $locale, uid: $uid) { + url + web { + breadcrumbs { + ...Breadcrumbs + } + } + system { + ...System + } + } +} + +query GetDestinationCountryPageBreadcrumbsRefs( + $locale: String! + $uid: String! +) { + destination_country_page(locale: $locale, uid: $uid) { + web { + breadcrumbs { + ...BreadcrumbsRefs + } + } + system { + ...System + } + } +} diff --git a/packages/trpc/lib/graphql/Query/Breadcrumbs/DestinationCountryPage.graphql.ts b/packages/trpc/lib/graphql/Query/Breadcrumbs/DestinationCountryPage.graphql.ts deleted file mode 100644 index 8594d75f6..000000000 --- a/packages/trpc/lib/graphql/Query/Breadcrumbs/DestinationCountryPage.graphql.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { gql } from "graphql-tag" - -import { - Breadcrumbs, - BreadcrumbsRefs, -} from "../../Fragments/Breadcrumbs/Breadcrumbs.graphql" -import { System } from "../../Fragments/System.graphql" - -export const GetDestinationCountryPageBreadcrumbs = gql` - query GetDestinationCountryPageBreadcrumbs($locale: String!, $uid: String!) { - destination_country_page(locale: $locale, uid: $uid) { - url - web { - breadcrumbs { - ...Breadcrumbs - } - } - system { - ...System - } - } - } - ${Breadcrumbs} - ${System} -` - -export const GetDestinationCountryPageBreadcrumbsRefs = gql` - query GetDestinationCountryPageBreadcrumbsRefs( - $locale: String! - $uid: String! - ) { - destination_country_page(locale: $locale, uid: $uid) { - web { - breadcrumbs { - ...BreadcrumbsRefs - } - } - system { - ...System - } - } - } - ${BreadcrumbsRefs} - ${System} -` diff --git a/packages/trpc/lib/graphql/Query/Breadcrumbs/DestinationOverviewPage.graphql b/packages/trpc/lib/graphql/Query/Breadcrumbs/DestinationOverviewPage.graphql new file mode 100644 index 000000000..cc024ec4f --- /dev/null +++ b/packages/trpc/lib/graphql/Query/Breadcrumbs/DestinationOverviewPage.graphql @@ -0,0 +1,32 @@ +#import "../../Fragments/Breadcrumbs/Breadcrumbs.graphql" +#import "../../Fragments/System.graphql" + +query GetDestinationOverviewPageBreadcrumbs($locale: String!, $uid: String!) { + destination_overview_page(locale: $locale, uid: $uid) { + url + web { + breadcrumbs { + ...Breadcrumbs + } + } + system { + ...System + } + } +} + +query GetDestinationOverviewPageBreadcrumbsRefs( + $locale: String! + $uid: String! +) { + destination_overview_page(locale: $locale, uid: $uid) { + web { + breadcrumbs { + ...BreadcrumbsRefs + } + } + system { + ...System + } + } +} diff --git a/packages/trpc/lib/graphql/Query/Breadcrumbs/DestinationOverviewPage.graphql.ts b/packages/trpc/lib/graphql/Query/Breadcrumbs/DestinationOverviewPage.graphql.ts deleted file mode 100644 index ca0c4fcaf..000000000 --- a/packages/trpc/lib/graphql/Query/Breadcrumbs/DestinationOverviewPage.graphql.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { gql } from "graphql-tag" - -import { - Breadcrumbs, - BreadcrumbsRefs, -} from "../../Fragments/Breadcrumbs/Breadcrumbs.graphql" -import { System } from "../../Fragments/System.graphql" - -export const GetDestinationOverviewPageBreadcrumbs = gql` - query GetDestinationOverviewPageBreadcrumbs($locale: String!, $uid: String!) { - destination_overview_page(locale: $locale, uid: $uid) { - url - web { - breadcrumbs { - ...Breadcrumbs - } - } - system { - ...System - } - } - } - ${Breadcrumbs} - ${System} -` - -export const GetDestinationOverviewPageBreadcrumbsRefs = gql` - query GetDestinationOverviewPageBreadcrumbsRefs( - $locale: String! - $uid: String! - ) { - destination_overview_page(locale: $locale, uid: $uid) { - web { - breadcrumbs { - ...BreadcrumbsRefs - } - } - system { - ...System - } - } - } - ${BreadcrumbsRefs} - ${System} -` diff --git a/packages/trpc/lib/graphql/Query/Breadcrumbs/HotelPage.graphql b/packages/trpc/lib/graphql/Query/Breadcrumbs/HotelPage.graphql new file mode 100644 index 000000000..6d57b84c5 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/Breadcrumbs/HotelPage.graphql @@ -0,0 +1,29 @@ +#import "../../Fragments/Breadcrumbs/Breadcrumbs.graphql" +#import "../../Fragments/System.graphql" + +query GetHotelPageBreadcrumbs($locale: String!, $uid: String!) { + hotel_page(locale: $locale, uid: $uid) { + url + web { + breadcrumbs { + ...Breadcrumbs + } + } + system { + ...System + } + } +} + +query GetHotelPageBreadcrumbsRefs($locale: String!, $uid: String!) { + hotel_page(locale: $locale, uid: $uid) { + web { + breadcrumbs { + ...BreadcrumbsRefs + } + } + system { + ...System + } + } +} diff --git a/packages/trpc/lib/graphql/Query/Breadcrumbs/HotelPage.graphql.ts b/packages/trpc/lib/graphql/Query/Breadcrumbs/HotelPage.graphql.ts deleted file mode 100644 index ae2ff3e53..000000000 --- a/packages/trpc/lib/graphql/Query/Breadcrumbs/HotelPage.graphql.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { gql } from "graphql-tag" - -import { - Breadcrumbs, - BreadcrumbsRefs, -} from "../../Fragments/Breadcrumbs/Breadcrumbs.graphql" -import { System } from "../../Fragments/System.graphql" - -export const GetHotelPageBreadcrumbs = gql` - query GetHotelPageBreadcrumbs($locale: String!, $uid: String!) { - hotel_page(locale: $locale, uid: $uid) { - url - web { - breadcrumbs { - ...Breadcrumbs - } - } - system { - ...System - } - } - } - ${Breadcrumbs} - ${System} -` - -export const GetHotelPageBreadcrumbsRefs = gql` - query GetHotelPageBreadcrumbsRefs($locale: String!, $uid: String!) { - hotel_page(locale: $locale, uid: $uid) { - web { - breadcrumbs { - ...BreadcrumbsRefs - } - } - system { - ...System - } - } - } - ${BreadcrumbsRefs} - ${System} -` diff --git a/packages/trpc/lib/graphql/Query/Breadcrumbs/LoyaltyPage.graphql b/packages/trpc/lib/graphql/Query/Breadcrumbs/LoyaltyPage.graphql new file mode 100644 index 000000000..6369e1c5f --- /dev/null +++ b/packages/trpc/lib/graphql/Query/Breadcrumbs/LoyaltyPage.graphql @@ -0,0 +1,29 @@ +#import "../../Fragments/Breadcrumbs/Breadcrumbs.graphql" +#import "../../Fragments/System.graphql" + +query GetLoyaltyPageBreadcrumbs($locale: String!, $uid: String!) { + loyalty_page(locale: $locale, uid: $uid) { + url + web { + breadcrumbs { + ...Breadcrumbs + } + } + system { + ...System + } + } +} + +query GetLoyaltyPageBreadcrumbsRefs($locale: String!, $uid: String!) { + loyalty_page(locale: $locale, uid: $uid) { + web { + breadcrumbs { + ...BreadcrumbsRefs + } + } + system { + ...System + } + } +} diff --git a/packages/trpc/lib/graphql/Query/Breadcrumbs/LoyaltyPage.graphql.ts b/packages/trpc/lib/graphql/Query/Breadcrumbs/LoyaltyPage.graphql.ts deleted file mode 100644 index 6656bf118..000000000 --- a/packages/trpc/lib/graphql/Query/Breadcrumbs/LoyaltyPage.graphql.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { gql } from "graphql-tag" - -import { - Breadcrumbs, - BreadcrumbsRefs, -} from "../../Fragments/Breadcrumbs/Breadcrumbs.graphql" -import { System } from "../../Fragments/System.graphql" - -export const GetLoyaltyPageBreadcrumbs = gql` - query GetLoyaltyPageBreadcrumbs($locale: String!, $uid: String!) { - loyalty_page(locale: $locale, uid: $uid) { - url - web { - breadcrumbs { - ...Breadcrumbs - } - } - system { - ...System - } - } - } - ${Breadcrumbs} - ${System} -` - -export const GetLoyaltyPageBreadcrumbsRefs = gql` - query GetLoyaltyPageBreadcrumbsRefs($locale: String!, $uid: String!) { - loyalty_page(locale: $locale, uid: $uid) { - web { - breadcrumbs { - ...BreadcrumbsRefs - } - } - system { - ...System - } - } - } - ${BreadcrumbsRefs} - ${System} -` diff --git a/packages/trpc/lib/graphql/Query/Breadcrumbs/PromoCampaignPage.graphql b/packages/trpc/lib/graphql/Query/Breadcrumbs/PromoCampaignPage.graphql new file mode 100644 index 000000000..a0ccdc597 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/Breadcrumbs/PromoCampaignPage.graphql @@ -0,0 +1,29 @@ +#import "../../Fragments/Breadcrumbs/Breadcrumbs.graphql" +#import "../../Fragments/System.graphql" + +query GetPromoCampaignPageBreadcrumbs($locale: String!, $uid: String!) { + promo_campaign_page(locale: $locale, uid: $uid) { + url + web { + breadcrumbs { + ...Breadcrumbs + } + } + system { + ...System + } + } +} + +query GetPromoCampaignPageBreadcrumbsRefs($locale: String!, $uid: String!) { + promo_campaign_page(locale: $locale, uid: $uid) { + web { + breadcrumbs { + ...BreadcrumbsRefs + } + } + system { + ...System + } + } +} diff --git a/packages/trpc/lib/graphql/Query/Breadcrumbs/PromoCampaignPage.graphql.ts b/packages/trpc/lib/graphql/Query/Breadcrumbs/PromoCampaignPage.graphql.ts deleted file mode 100644 index 2abc78531..000000000 --- a/packages/trpc/lib/graphql/Query/Breadcrumbs/PromoCampaignPage.graphql.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { gql } from "graphql-tag" - -import { - Breadcrumbs, - BreadcrumbsRefs, -} from "../../Fragments/Breadcrumbs/Breadcrumbs.graphql" -import { System } from "../../Fragments/System.graphql" - -export const GetPromoCampaignPageBreadcrumbs = gql` - query GetPromoCampaignPageBreadcrumbs($locale: String!, $uid: String!) { - promo_campaign_page(locale: $locale, uid: $uid) { - url - web { - breadcrumbs { - ...Breadcrumbs - } - } - system { - ...System - } - } - } - ${Breadcrumbs} - ${System} -` - -export const GetPromoCampaignPageBreadcrumbsRefs = gql` - query GetPromoCampaignPageBreadcrumbsRefs($locale: String!, $uid: String!) { - promo_campaign_page(locale: $locale, uid: $uid) { - web { - breadcrumbs { - ...BreadcrumbsRefs - } - } - system { - ...System - } - } - } - ${BreadcrumbsRefs} - ${System} -` diff --git a/packages/trpc/lib/graphql/Query/CampaignOverviewPage/CampaignOverviewPage.graphql b/packages/trpc/lib/graphql/Query/CampaignOverviewPage/CampaignOverviewPage.graphql new file mode 100644 index 000000000..37fecbdfc --- /dev/null +++ b/packages/trpc/lib/graphql/Query/CampaignOverviewPage/CampaignOverviewPage.graphql @@ -0,0 +1,92 @@ +#import "../../Fragments/System.graphql" + +#import "../../Fragments/CampaignOverviewPage/NavigationLinks.graphql" +#import "../../Fragments/CampaignOverviewPage/TopCampaign.graphql" + +#import "../../Fragments/Blocks/AllCampaigns.graphql" +#import "../../Fragments/Blocks/CarouselCards.graphql" +#import "../../Fragments/Blocks/HotelListing.graphql" + +query GetCampaignOverviewPage($locale: String!, $uid: String!) { + campaign_overview_page(uid: $uid, locale: $locale) { + title + header { + heading + preamble + ...NavigationLinks_CampaignOverviewPage + } + top_campaign_block { + heading + campaignConnection { + edges { + node { + ...TopCampaign + } + } + } + } + blocks { + __typename + ...AllCampaigns + ...CarouselCards_CampaignOverviewPage + ...HotelListing_CampaignOverviewPage + } + system { + ...System + created_at + updated_at + } + } + trackingProps: campaign_overview_page(locale: "en", uid: $uid) { + url + } +} + +query GetCampaignOverviewPageRefs($locale: String!, $uid: String!) { + campaign_overview_page(locale: $locale, uid: $uid) { + header { + ...NavigationLinksRef_CampaignOverviewPage + } + top_campaign_block { + campaignConnection { + edges { + node { + ...TopCampaignRef + } + } + } + } + blocks { + __typename + ...CarouselCards_CampaignOverviewPageRefs + ...AllCampaignsRefs + } + system { + ...System + } + } +} + +query GetDaDeEnUrlsCampaignOverviewPage($uid: String!) { + de: campaign_overview_page(locale: "de", uid: $uid) { + url + } + en: campaign_overview_page(locale: "en", uid: $uid) { + url + } + da: campaign_overview_page(locale: "da", uid: $uid) { + url + } +} + +query GetFiNoSvUrlsCampaignOverviewPage($uid: String!) { + fi: campaign_overview_page(locale: "fi", uid: $uid) { + url + } + no: campaign_overview_page(locale: "no", uid: $uid) { + url + } + sv: campaign_overview_page(locale: "sv", uid: $uid) { + url + } +} diff --git a/packages/trpc/lib/graphql/Query/CampaignOverviewPage/CampaignOverviewPage.graphql.ts b/packages/trpc/lib/graphql/Query/CampaignOverviewPage/CampaignOverviewPage.graphql.ts deleted file mode 100644 index 820493142..000000000 --- a/packages/trpc/lib/graphql/Query/CampaignOverviewPage/CampaignOverviewPage.graphql.ts +++ /dev/null @@ -1,123 +0,0 @@ -import { gql } from "graphql-tag" - -import { - AllCampaigns, - AllCampaignsRefs, -} from "../../Fragments/Blocks/AllCampaigns.graphql" -import { - CarouselCards_CampaignOverviewPage, - CarouselCards_CampaignOverviewPageRefs, -} from "../../Fragments/Blocks/CarouselCards.graphql" -import { HotelListing_CampaignOverviewPage } from "../../Fragments/Blocks/HotelListing.graphql" -import { - NavigationLinks_CampaignOverviewPage, - NavigationLinksRef_CampaignOverviewPage, -} from "../../Fragments/CampaignOverviewPage/NavigationLinks.graphql" -import { - TopCampaign, - TopCampaignRef, -} from "../../Fragments/CampaignOverviewPage/TopCampaign.graphql" -import { System } from "../../Fragments/System.graphql" - -export const GetCampaignOverviewPage = gql` - query GetCampaignOverviewPage($locale: String!, $uid: String!) { - campaign_overview_page(uid: $uid, locale: $locale) { - title - header { - heading - preamble - ...NavigationLinks_CampaignOverviewPage - } - top_campaign_block { - heading - campaignConnection { - edges { - node { - ...TopCampaign - } - } - } - } - blocks { - __typename - ...AllCampaigns - ...CarouselCards_CampaignOverviewPage - ...HotelListing_CampaignOverviewPage - } - system { - ...System - created_at - updated_at - } - } - trackingProps: campaign_overview_page(locale: "en", uid: $uid) { - url - } - } - ${System} - ${NavigationLinks_CampaignOverviewPage} - ${TopCampaign} - ${AllCampaigns} - ${CarouselCards_CampaignOverviewPage} - ${HotelListing_CampaignOverviewPage} -` - -export const GetCampaignOverviewPageRefs = gql` - query GetCampaignOverviewPageRefs($locale: String!, $uid: String!) { - campaign_overview_page(locale: $locale, uid: $uid) { - header { - ...NavigationLinksRef_CampaignOverviewPage - } - top_campaign_block { - campaignConnection { - edges { - node { - ...TopCampaignRef - } - } - } - } - blocks { - __typename - ...CarouselCards_CampaignOverviewPageRefs - ...AllCampaignsRefs - } - system { - ...System - } - } - } - ${System} - ${NavigationLinksRef_CampaignOverviewPage} - ${TopCampaignRef} - ${CarouselCards_CampaignOverviewPageRefs} - ${AllCampaignsRefs} -` - -export const GetDaDeEnUrlsCampaignOverviewPage = gql` - query GetDaDeEnUrlsCampaignOverviewPage($uid: String!) { - de: campaign_overview_page(locale: "de", uid: $uid) { - url - } - en: campaign_overview_page(locale: "en", uid: $uid) { - url - } - da: campaign_overview_page(locale: "da", uid: $uid) { - url - } - } -` - -export const GetFiNoSvUrlsCampaignOverviewPage = gql` - query GetFiNoSvUrlsCampaignOverviewPage($uid: String!) { - fi: campaign_overview_page(locale: "fi", uid: $uid) { - url - } - no: campaign_overview_page(locale: "no", uid: $uid) { - url - } - sv: campaign_overview_page(locale: "sv", uid: $uid) { - url - } - } -` diff --git a/packages/trpc/lib/graphql/Query/CampaignOverviewPage/Metadata.graphql.ts b/packages/trpc/lib/graphql/Query/CampaignOverviewPage/Metadata.graphql similarity index 58% rename from packages/trpc/lib/graphql/Query/CampaignOverviewPage/Metadata.graphql.ts rename to packages/trpc/lib/graphql/Query/CampaignOverviewPage/Metadata.graphql index a379eb22b..e0ce37000 100644 --- a/packages/trpc/lib/graphql/Query/CampaignOverviewPage/Metadata.graphql.ts +++ b/packages/trpc/lib/graphql/Query/CampaignOverviewPage/Metadata.graphql @@ -1,9 +1,6 @@ -import { gql } from "graphql-tag" +#import "../../Fragments/Metadata.graphql" +#import "../../Fragments/System.graphql" -import { Metadata } from "../../Fragments/Metadata.graphql" -import { System } from "../../Fragments/System.graphql" - -export const GetCampaignOverviewPageMetadata = gql` query GetCampaignOverviewPageMetadata($locale: String!, $uid: String!) { campaign_overview_page(locale: $locale, uid: $uid) { web { @@ -23,6 +20,3 @@ query GetCampaignOverviewPageMetadata($locale: String!, $uid: String!) { } } } -${Metadata} -${System} -` diff --git a/packages/trpc/lib/graphql/Query/CampaignPage/CampaignPage.graphql b/packages/trpc/lib/graphql/Query/CampaignPage/CampaignPage.graphql new file mode 100644 index 000000000..c4a6a8e87 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/CampaignPage/CampaignPage.graphql @@ -0,0 +1,82 @@ +#import "../../Fragments/System.graphql" + +#import "../../Fragments/CampaignPage/IncludedHotels.graphql" +#import "../../Fragments/CampaignPage/Hero.graphql" + +#import "../../Fragments/Blocks/Accordion.graphql" +#import "../../Fragments/Blocks/Essentials.graphql" +#import "../../Fragments/Blocks/CarouselCards.graphql" +#import "../../Fragments/Blocks/HotelListing.graphql" + +query GetCampaignPage($locale: String!, $uid: String!) { + campaign_page(uid: $uid, locale: $locale) { + title + heading + subheading + preamble { + is_two_columns + first_column + second_column + } + included_hotels { + ...CampaignPageIncludedHotels + } + blocks { + __typename + ...Essentials_CampaignPage + ...CarouselCards_CampaignPage + ...Accordion_CampaignPage + ...HotelListing_CampaignPage + } + page_settings { + booking_code + } + system { + ...System + created_at + updated_at + } + ...Hero_CampaignPage + } + trackingProps: campaign_page(locale: "en", uid: $uid) { + url + } +} + +query GetCampaignPageRefs($locale: String!, $uid: String!) { + campaign_page(locale: $locale, uid: $uid) { + blocks { + __typename + ...CarouselCards_CampaignPageRefs + ...Accordion_CampaignPageRefs + } + ...HeroRef_CampaignPage + system { + ...System + } + } +} + +query GetDaDeEnUrlsCampaignPage($uid: String!) { + de: campaign_page(locale: "de", uid: $uid) { + url + } + en: campaign_page(locale: "en", uid: $uid) { + url + } + da: campaign_page(locale: "da", uid: $uid) { + url + } +} + +query GetFiNoSvUrlsCampaignPage($uid: String!) { + fi: campaign_page(locale: "fi", uid: $uid) { + url + } + no: campaign_page(locale: "no", uid: $uid) { + url + } + sv: campaign_page(locale: "sv", uid: $uid) { + url + } +} diff --git a/packages/trpc/lib/graphql/Query/CampaignPage/CampaignPage.graphql.ts b/packages/trpc/lib/graphql/Query/CampaignPage/CampaignPage.graphql.ts deleted file mode 100644 index 38c1ce4ed..000000000 --- a/packages/trpc/lib/graphql/Query/CampaignPage/CampaignPage.graphql.ts +++ /dev/null @@ -1,110 +0,0 @@ -import { gql } from "graphql-tag" - -import { - Accordion_CampaignPage, - Accordion_CampaignPageRefs, -} from "../../Fragments/Blocks/Accordion.graphql" -import { - CarouselCards_CampaignPage, - CarouselCards_CampaignPageRefs, -} from "../../Fragments/Blocks/CarouselCards.graphql" -import { Essentials_CampaignPage } from "../../Fragments/Blocks/Essentials.graphql" -import { HotelListing_CampaignPage } from "../../Fragments/Blocks/HotelListing.graphql" -import { - Hero_CampaignPage, - HeroRef_CampaignPage, -} from "../../Fragments/CampaignPage/Hero.graphql" -import { CampaignPageIncludedHotels } from "../../Fragments/CampaignPage/IncludedHotels.graphql" -import { System } from "../../Fragments/System.graphql" - -export const GetCampaignPage = gql` - query GetCampaignPage($locale: String!, $uid: String!) { - campaign_page(uid: $uid, locale: $locale) { - title - heading - subheading - preamble { - is_two_columns - first_column - second_column - } - included_hotels { - ...CampaignPageIncludedHotels - } - blocks { - __typename - ...Essentials_CampaignPage - ...CarouselCards_CampaignPage - ...Accordion_CampaignPage - ...HotelListing_CampaignPage - } - page_settings { - booking_code - } - system { - ...System - created_at - updated_at - } - ...Hero_CampaignPage - } - trackingProps: campaign_page(locale: "en", uid: $uid) { - url - } - } - ${System} - ${CampaignPageIncludedHotels} - ${Essentials_CampaignPage} - ${CarouselCards_CampaignPage} - ${Accordion_CampaignPage} - ${HotelListing_CampaignPage} - ${Hero_CampaignPage} -` - -export const GetCampaignPageRefs = gql` - query GetCampaignPageRefs($locale: String!, $uid: String!) { - campaign_page(locale: $locale, uid: $uid) { - blocks { - __typename - ...CarouselCards_CampaignPageRefs - ...Accordion_CampaignPageRefs - } - ...HeroRef_CampaignPage - system { - ...System - } - } - } - ${System} - ${CarouselCards_CampaignPageRefs} - ${Accordion_CampaignPageRefs} - ${HeroRef_CampaignPage} -` - -export const GetDaDeEnUrlsCampaignPage = gql` - query GetDaDeEnUrlsCampaignPage($uid: String!) { - de: campaign_page(locale: "de", uid: $uid) { - url - } - en: campaign_page(locale: "en", uid: $uid) { - url - } - da: campaign_page(locale: "da", uid: $uid) { - url - } - } -` - -export const GetFiNoSvUrlsCampaignPage = gql` - query GetFiNoSvUrlsCampaignPage($uid: String!) { - fi: campaign_page(locale: "fi", uid: $uid) { - url - } - no: campaign_page(locale: "no", uid: $uid) { - url - } - sv: campaign_page(locale: "sv", uid: $uid) { - url - } - } -` diff --git a/packages/trpc/lib/graphql/Query/CampaignPage/CampaignPagesByHotelUid.graphql b/packages/trpc/lib/graphql/Query/CampaignPage/CampaignPagesByHotelUid.graphql new file mode 100644 index 000000000..1cebbd641 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/CampaignPage/CampaignPagesByHotelUid.graphql @@ -0,0 +1,64 @@ +#import "../../Fragments/System.graphql" + +#import "../../Fragments/CampaignPage/Hero.graphql" + +query GetCampaignPagesByHotelUid( + $locale: String! + $hotelPageUid: String! + $today: DateTime! +) { + all_campaign_page( + where: { + OR: [ + { included_hotels: { list_1: { hotel_page: { uid: $hotelPageUid } } } } + { included_hotels: { list_2: { hotel_page: { uid: $hotelPageUid } } } } + ] + AND: [ + { OR: [{ startdate: null }, { startdate_lte: $today }] } + { OR: [{ enddate: null }, { enddate_gte: $today }] } + ] + } + locale: $locale + limit: 100 + ) { + items { + heading + url + sort_order + card_content { + heading + image + text + } + ...Hero_CampaignPage + system { + ...System + } + } + } +} + +query GetCampaignPagesByHotelUidRefs( + $locale: String! + $hotelPageUid: String! + $today: DateTime! +) { + all_campaign_page( + where: { + OR: [ + { included_hotels: { list_1: { hotel_page: { uid: $hotelPageUid } } } } + { included_hotels: { list_2: { hotel_page: { uid: $hotelPageUid } } } } + ] + AND: [ + { OR: [{ startdate: null }, { startdate_lte: $today }] } + { OR: [{ enddate: null }, { enddate_gte: $today }] } + ] + } + locale: $locale + limit: 100 + ) { + items { + ...CampaignPageRef + } + } +} diff --git a/packages/trpc/lib/graphql/Query/CampaignPage/CampaignPagesByHotelUid.graphql.ts b/packages/trpc/lib/graphql/Query/CampaignPage/CampaignPagesByHotelUid.graphql.ts deleted file mode 100644 index ebe6222ee..000000000 --- a/packages/trpc/lib/graphql/Query/CampaignPage/CampaignPagesByHotelUid.graphql.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { gql } from "graphql-tag" - -import { Hero_CampaignPage } from "../../Fragments/CampaignPage/Hero.graphql" -import { CampaignPageRef } from "../../Fragments/CampaignPage/Ref.graphql" -import { System } from "../../Fragments/System.graphql" - -export const GetCampaignPagesByHotelUid = gql` - query GetCampaignPagesByHotelUid( - $locale: String! - $hotelPageUid: String! - $today: DateTime! - ) { - all_campaign_page( - where: { - OR: [ - { - included_hotels: { list_1: { hotel_page: { uid: $hotelPageUid } } } - } - { - included_hotels: { list_2: { hotel_page: { uid: $hotelPageUid } } } - } - ] - AND: [ - { OR: [{ startdate: null }, { startdate_lte: $today }] } - { OR: [{ enddate: null }, { enddate_gte: $today }] } - ] - } - locale: $locale - limit: 100 - ) { - items { - heading - url - sort_order - card_content { - heading - image - text - } - ...Hero_CampaignPage - system { - ...System - } - } - } - } - ${System} - ${Hero_CampaignPage} -` - -export const GetCampaignPagesByHotelUidRefs = gql` - query GetCampaignPagesByHotelUidRefs( - $locale: String! - $hotelPageUid: String! - $today: DateTime! - ) { - all_campaign_page( - where: { - OR: [ - { - included_hotels: { list_1: { hotel_page: { uid: $hotelPageUid } } } - } - { - included_hotels: { list_2: { hotel_page: { uid: $hotelPageUid } } } - } - ] - AND: [ - { OR: [{ startdate: null }, { startdate_lte: $today }] } - { OR: [{ enddate: null }, { enddate_gte: $today }] } - ] - } - locale: $locale - limit: 100 - ) { - items { - ...CampaignPageRef - } - } - } - ${CampaignPageRef} -` diff --git a/packages/trpc/lib/graphql/Query/CampaignPage/Metadata.graphql.ts b/packages/trpc/lib/graphql/Query/CampaignPage/Metadata.graphql similarity index 58% rename from packages/trpc/lib/graphql/Query/CampaignPage/Metadata.graphql.ts rename to packages/trpc/lib/graphql/Query/CampaignPage/Metadata.graphql index eac0ed643..c7b3a51d5 100644 --- a/packages/trpc/lib/graphql/Query/CampaignPage/Metadata.graphql.ts +++ b/packages/trpc/lib/graphql/Query/CampaignPage/Metadata.graphql @@ -1,9 +1,6 @@ -import { gql } from "graphql-tag" +#import "../../Fragments/Metadata.graphql" +#import "../../Fragments/System.graphql" -import { Metadata } from "../../Fragments/Metadata.graphql" -import { System } from "../../Fragments/System.graphql" - -export const GetCampaignPageMetadata = gql` query GetCampaignPageMetadata($locale: String!, $uid: String!) { campaign_page(locale: $locale, uid: $uid) { web { @@ -23,6 +20,3 @@ query GetCampaignPageMetadata($locale: String!, $uid: String!) { } } } -${Metadata} -${System} -` diff --git a/packages/trpc/lib/graphql/Query/CollectionPage/CollectionPage.graphql b/packages/trpc/lib/graphql/Query/CollectionPage/CollectionPage.graphql new file mode 100644 index 000000000..3e620ced7 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/CollectionPage/CollectionPage.graphql @@ -0,0 +1,84 @@ +#import "../../Fragments/System.graphql" + +#import "../../Fragments/Blocks/CardsGrid.graphql" +#import "../../Fragments/Blocks/DynamicContent.graphql" +#import "../../Fragments/Blocks/Shortcuts.graphql" +#import "../../Fragments/Blocks/UspGrid.graphql" + +#import "../../Fragments/CollectionPage/NavigationLinks.graphql" +#import "../../Fragments/CollectionPage/TopPrimaryButton.graphql" + +query GetCollectionPage($locale: String!, $uid: String!) { + collection_page(uid: $uid, locale: $locale) { + hero_image + title + header { + heading + preamble + ...TopPrimaryButton_CollectionPage + ...NavigationLinks_CollectionPage + } + meeting_package { + show_widget + location + } + blocks { + __typename + ...CardsGrid_CollectionPage + ...Shortcuts_CollectionPage + ...UspGrid_CollectionPage + ...DynamicContent_CollectionPage + } + system { + ...System + created_at + updated_at + } + } + trackingProps: collection_page(locale: "en", uid: $uid) { + url + } +} + +query GetCollectionPageRefs($locale: String!, $uid: String!) { + collection_page(locale: $locale, uid: $uid) { + header { + ...TopPrimaryButtonRef_CollectionPage + ...NavigationLinksRef_CollectionPage + } + blocks { + __typename + ...CardsGrid_CollectionPageRefs + ...Shortcuts_CollectionPageRefs + ...UspGrid_CollectionPageRefs + ...DynamicContent_CollectionPageRefs + } + system { + ...System + } + } +} + +query GetDaDeEnUrlsCollectionPage($uid: String!) { + de: collection_page(locale: "de", uid: $uid) { + url + } + en: collection_page(locale: "en", uid: $uid) { + url + } + da: collection_page(locale: "da", uid: $uid) { + url + } +} + +query GetFiNoSvUrlsCollectionPage($uid: String!) { + fi: collection_page(locale: "fi", uid: $uid) { + url + } + no: collection_page(locale: "no", uid: $uid) { + url + } + sv: collection_page(locale: "sv", uid: $uid) { + url + } +} diff --git a/packages/trpc/lib/graphql/Query/CollectionPage/CollectionPage.graphql.ts b/packages/trpc/lib/graphql/Query/CollectionPage/CollectionPage.graphql.ts deleted file mode 100644 index 4dbf45b23..000000000 --- a/packages/trpc/lib/graphql/Query/CollectionPage/CollectionPage.graphql.ts +++ /dev/null @@ -1,123 +0,0 @@ -import { gql } from "graphql-tag" - -import { - CardsGrid_CollectionPage, - CardsGrid_CollectionPageRefs, -} from "../../Fragments/Blocks/CardsGrid.graphql" -import { - DynamicContent_CollectionPage, - DynamicContent_CollectionPageRefs, -} from "../../Fragments/Blocks/DynamicContent.graphql" -import { - Shortcuts_CollectionPage, - Shortcuts_CollectionPageRefs, -} from "../../Fragments/Blocks/Shortcuts.graphql" -import { - UspGrid_CollectionPage, - UspGrid_CollectionPageRefs, -} from "../../Fragments/Blocks/UspGrid.graphql" -import { - NavigationLinks_CollectionPage, - NavigationLinksRef_CollectionPage, -} from "../../Fragments/CollectionPage/NavigationLinks.graphql" -import { - TopPrimaryButton_CollectionPage, - TopPrimaryButtonRef_CollectionPage, -} from "../../Fragments/CollectionPage/TopPrimaryButton.graphql" -import { System } from "../../Fragments/System.graphql" - -export const GetCollectionPage = gql` - query GetCollectionPage($locale: String!, $uid: String!) { - collection_page(uid: $uid, locale: $locale) { - hero_image - title - header { - heading - preamble - ...TopPrimaryButton_CollectionPage - ...NavigationLinks_CollectionPage - } - meeting_package { - show_widget - location - } - blocks { - __typename - ...CardsGrid_CollectionPage - ...Shortcuts_CollectionPage - ...UspGrid_CollectionPage - ...DynamicContent_CollectionPage - } - system { - ...System - created_at - updated_at - } - } - trackingProps: collection_page(locale: "en", uid: $uid) { - url - } - } - ${TopPrimaryButton_CollectionPage} - ${NavigationLinks_CollectionPage} - ${CardsGrid_CollectionPage} - ${Shortcuts_CollectionPage} - ${UspGrid_CollectionPage} - ${DynamicContent_CollectionPage} -` - -export const GetCollectionPageRefs = gql` - query GetCollectionPageRefs($locale: String!, $uid: String!) { - collection_page(locale: $locale, uid: $uid) { - header { - ...TopPrimaryButtonRef_CollectionPage - ...NavigationLinksRef_CollectionPage - } - blocks { - __typename - ...CardsGrid_CollectionPageRefs - ...Shortcuts_CollectionPageRefs - ...UspGrid_CollectionPageRefs - ...DynamicContent_CollectionPageRefs - } - system { - ...System - } - } - } - ${System} - ${TopPrimaryButtonRef_CollectionPage} - ${NavigationLinksRef_CollectionPage} - ${CardsGrid_CollectionPageRefs} - ${Shortcuts_CollectionPageRefs} - ${UspGrid_CollectionPageRefs} - ${DynamicContent_CollectionPageRefs} -` - -export const GetDaDeEnUrlsCollectionPage = gql` - query GetDaDeEnUrlsCollectionPage($uid: String!) { - de: collection_page(locale: "de", uid: $uid) { - url - } - en: collection_page(locale: "en", uid: $uid) { - url - } - da: collection_page(locale: "da", uid: $uid) { - url - } - } -` - -export const GetFiNoSvUrlsCollectionPage = gql` - query GetFiNoSvUrlsCollectionPage($uid: String!) { - fi: collection_page(locale: "fi", uid: $uid) { - url - } - no: collection_page(locale: "no", uid: $uid) { - url - } - sv: collection_page(locale: "sv", uid: $uid) { - url - } - } -` diff --git a/packages/trpc/lib/graphql/Query/CollectionPage/Metadata.graphql.ts b/packages/trpc/lib/graphql/Query/CollectionPage/Metadata.graphql similarity index 59% rename from packages/trpc/lib/graphql/Query/CollectionPage/Metadata.graphql.ts rename to packages/trpc/lib/graphql/Query/CollectionPage/Metadata.graphql index a3c921ba7..e404ee230 100644 --- a/packages/trpc/lib/graphql/Query/CollectionPage/Metadata.graphql.ts +++ b/packages/trpc/lib/graphql/Query/CollectionPage/Metadata.graphql @@ -1,9 +1,6 @@ -import { gql } from "graphql-tag" +#import "../../Fragments/Metadata.graphql" +#import "../../Fragments/System.graphql" -import { Metadata } from "../../Fragments/Metadata.graphql" -import { System } from "../../Fragments/System.graphql" - -export const GetCollectionPageMetadata = gql` query GetCollectionPageMetadata($locale: String!, $uid: String!) { collection_page(locale: $locale, uid: $uid) { web { @@ -24,6 +21,3 @@ query GetCollectionPageMetadata($locale: String!, $uid: String!) { } } } -${Metadata} -${System} -` diff --git a/packages/trpc/lib/graphql/Query/ContactConfig.graphql.ts b/packages/trpc/lib/graphql/Query/ContactConfig.graphql similarity index 88% rename from packages/trpc/lib/graphql/Query/ContactConfig.graphql.ts rename to packages/trpc/lib/graphql/Query/ContactConfig.graphql index 3ba185dd7..0a17e9568 100644 --- a/packages/trpc/lib/graphql/Query/ContactConfig.graphql.ts +++ b/packages/trpc/lib/graphql/Query/ContactConfig.graphql @@ -1,6 +1,3 @@ -import { gql } from "graphql-tag" - -export const GetContactConfig = gql` query GetContactConfig($locale: String!) { all_contact_config(locale: $locale) { items { @@ -40,4 +37,3 @@ query GetContactConfig($locale: String!) { total } } -` diff --git a/packages/trpc/lib/graphql/Query/ContentPage/ContentPage.graphql b/packages/trpc/lib/graphql/Query/ContentPage/ContentPage.graphql new file mode 100644 index 000000000..3efa50899 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/ContentPage/ContentPage.graphql @@ -0,0 +1,147 @@ +#import "../../Fragments/System.graphql" + +#import "../../Fragments/Blocks/Accordion.graphql" +#import "../../Fragments/Blocks/CardsGrid.graphql" +#import "../../Fragments/Blocks/Content.graphql" +#import "../../Fragments/Blocks/DynamicContent.graphql" +#import "../../Fragments/Blocks/HotelListing.graphql" +#import "../../Fragments/Blocks/Shortcuts.graphql" +#import "../../Fragments/Blocks/Table.graphql" +#import "../../Fragments/Blocks/TextCols.graphql" +#import "../../Fragments/Blocks/UspGrid.graphql" +#import "../../Fragments/ContentPage/NavigationLinks.graphql" +#import "../../Fragments/ContentPage/TopPrimaryButton.graphql" + +#import "../../Fragments/Sidebar/Content.graphql" +#import "../../Fragments/Sidebar/DynamicContent.graphql" +#import "../../Fragments/Sidebar/JoinLoyaltyContact.graphql" +#import "../../Fragments/Sidebar/TeaserCard.graphql" +#import "../../Fragments/Sidebar/ScriptedCard.graphql" +#import "../../Fragments/Sidebar/QuickLinks.graphql" + +query GetContentPage($locale: String!, $uid: String!) { + content_page(uid: $uid, locale: $locale) { + hero_image + title + header { + heading + preamble + dynamic_content { + component + } + ...TopPrimaryButton_ContentPage + ...NavigationLinks_ContentPage + } + meeting_package { + show_widget + location + } + blocks { + __typename + } + sidebar { + __typename + ...ContentSidebar_ContentPage + ...DynamicContentSidebar_ContentPage + ...JoinLoyaltyContactSidebar_ContentPage + ...ScriptedCardSidebar_ContentPage + ...TeaserCardSidebar_ContentPage + ...QuickLinksSidebar_ContentPage + } + system { + ...System + created_at + updated_at + } + } + trackingProps: content_page(locale: "en", uid: $uid) { + url + } +} + +query GetContentPageBlocksBatch1($locale: String!, $uid: String!) { + content_page(uid: $uid, locale: $locale) { + blocks { + __typename + ...Accordion_ContentPage + ...CardsGrid_ContentPage + ...Content_ContentPage + ...DynamicContent_ContentPage + } + } +} + +query GetContentPageBlocksBatch2($locale: String!, $uid: String!) { + content_page(uid: $uid, locale: $locale) { + blocks { + __typename + ...HotelListing_ContentPage + ...Shortcuts_ContentPage + ...Table_ContentPage + ...TextCols_ContentPage + ...UspGrid_ContentPage + } + } +} + +query GetContentPageRefs($locale: String!, $uid: String!) { + content_page(locale: $locale, uid: $uid) { + header { + dynamic_content { + component + } + ...NavigationLinksRef_ContentPage + ...TopPrimaryButtonRef_ContentPage + } + sidebar { + __typename + ...ContentSidebar_ContentPageRefs + ...JoinLoyaltyContactSidebar_ContentPageRefs + ...ScriptedCardSidebar_ContentPageRefs + ...TeaserCardSidebar_ContentPageRefs + ...QuickLinksSidebar_ContentPageRefs + } + system { + ...System + } + } +} + +query GetContentPageBlocksRefs($locale: String!, $uid: String!) { + content_page(locale: $locale, uid: $uid) { + blocks { + __typename + ...Accordion_ContentPageRefs + ...CardsGrid_ContentPageRefs + ...Content_ContentPageRefs + ...DynamicContent_ContentPageRefs + ...Shortcuts_ContentPageRefs + ...TextCols_ContentPageRef + ...UspGrid_ContentPageRefs + } + } +} + +query GetDaDeEnUrlsContentPage($uid: String!) { + de: content_page(locale: "de", uid: $uid) { + url + } + en: content_page(locale: "en", uid: $uid) { + url + } + da: content_page(locale: "da", uid: $uid) { + url + } +} + +query GetFiNoSvUrlsContentPage($uid: String!) { + fi: content_page(locale: "fi", uid: $uid) { + url + } + no: content_page(locale: "no", uid: $uid) { + url + } + sv: content_page(locale: "sv", uid: $uid) { + url + } +} diff --git a/packages/trpc/lib/graphql/Query/ContentPage/ContentPage.graphql.ts b/packages/trpc/lib/graphql/Query/ContentPage/ContentPage.graphql.ts deleted file mode 100644 index c3cfcf155..000000000 --- a/packages/trpc/lib/graphql/Query/ContentPage/ContentPage.graphql.ts +++ /dev/null @@ -1,236 +0,0 @@ -import { gql } from "graphql-tag" - -import { - Accordion_ContentPage, - Accordion_ContentPageRefs, -} from "../../Fragments/Blocks/Accordion.graphql" -import { - CardsGrid_ContentPage, - CardsGrid_ContentPageRefs, -} from "../../Fragments/Blocks/CardsGrid.graphql" -import { - Content_ContentPage, - Content_ContentPageRefs, -} from "../../Fragments/Blocks/Content.graphql" -import { - DynamicContent_ContentPage, - DynamicContent_ContentPageRefs, -} from "../../Fragments/Blocks/DynamicContent.graphql" -import { HotelListing_ContentPage } from "../../Fragments/Blocks/HotelListing.graphql" -import { - Shortcuts_ContentPage, - Shortcuts_ContentPageRefs, -} from "../../Fragments/Blocks/Shortcuts.graphql" -import { Table_ContentPage } from "../../Fragments/Blocks/Table.graphql" -import { - TextCols_ContentPage, - TextCols_ContentPageRef, -} from "../../Fragments/Blocks/TextCols.graphql" -import { - UspGrid_ContentPage, - UspGrid_ContentPageRefs, -} from "../../Fragments/Blocks/UspGrid.graphql" -import { - NavigationLinks_ContentPage, - NavigationLinksRef_ContentPage, -} from "../../Fragments/ContentPage/NavigationLinks.graphql" -import { - TopPrimaryButton_ContentPage, - TopPrimaryButtonRef_ContentPage, -} from "../../Fragments/ContentPage/TopPrimaryButton.graphql" -import { - ContentSidebar_ContentPage, - ContentSidebar_ContentPageRefs, -} from "../../Fragments/Sidebar/Content.graphql" -import { DynamicContentSidebar_ContentPage } from "../../Fragments/Sidebar/DynamicContent.graphql" -import { - JoinLoyaltyContactSidebar_ContentPage, - JoinLoyaltyContactSidebar_ContentPageRefs, -} from "../../Fragments/Sidebar/JoinLoyaltyContact.graphql" -import { - QuickLinksSidebar_ContentPage, - QuickLinksSidebar_ContentPageRefs, -} from "../../Fragments/Sidebar/QuickLinks.graphql" -import { - ScriptedCardSidebar_ContentPage, - ScriptedCardSidebar_ContentPageRefs, -} from "../../Fragments/Sidebar/ScriptedCard.graphql" -import { - TeaserCardSidebar_ContentPage, - TeaserCardSidebar_ContentPageRefs, -} from "../../Fragments/Sidebar/TeaserCard.graphql" -import { System } from "../../Fragments/System.graphql" - -export const GetContentPage = gql` - query GetContentPage($locale: String!, $uid: String!) { - content_page(uid: $uid, locale: $locale) { - hero_image - title - header { - heading - preamble - dynamic_content { - component - } - ...TopPrimaryButton_ContentPage - ...NavigationLinks_ContentPage - } - meeting_package { - show_widget - location - } - blocks { - __typename - } - sidebar { - __typename - ...ContentSidebar_ContentPage - ...DynamicContentSidebar_ContentPage - ...JoinLoyaltyContactSidebar_ContentPage - ...ScriptedCardSidebar_ContentPage - ...TeaserCardSidebar_ContentPage - ...QuickLinksSidebar_ContentPage - } - system { - ...System - created_at - updated_at - } - } - trackingProps: content_page(locale: "en", uid: $uid) { - url - } - } - ${System} - ${TopPrimaryButton_ContentPage} - ${NavigationLinks_ContentPage} - ${ContentSidebar_ContentPage} - ${DynamicContentSidebar_ContentPage} - ${JoinLoyaltyContactSidebar_ContentPage} - ${ScriptedCardSidebar_ContentPage} - ${TeaserCardSidebar_ContentPage} - ${QuickLinksSidebar_ContentPage} -` - -export const GetContentPageBlocksBatch1 = gql` - query GetContentPageBlocksBatch1($locale: String!, $uid: String!) { - content_page(uid: $uid, locale: $locale) { - blocks { - __typename - ...Accordion_ContentPage - ...CardsGrid_ContentPage - ...Content_ContentPage - ...DynamicContent_ContentPage - } - } - } - ${Accordion_ContentPage} - ${CardsGrid_ContentPage} - ${Content_ContentPage} - ${DynamicContent_ContentPage} -` - -export const GetContentPageBlocksBatch2 = gql` - query GetContentPageBlocksBatch2($locale: String!, $uid: String!) { - content_page(uid: $uid, locale: $locale) { - blocks { - __typename - ...HotelListing_ContentPage - ...Shortcuts_ContentPage - ...Table_ContentPage - ...TextCols_ContentPage - ...UspGrid_ContentPage - } - } - } - ${HotelListing_ContentPage} - ${Shortcuts_ContentPage} - ${Table_ContentPage} - ${TextCols_ContentPage} - ${UspGrid_ContentPage} -` - -export const GetContentPageRefs = gql` - query GetContentPageRefs($locale: String!, $uid: String!) { - content_page(locale: $locale, uid: $uid) { - header { - dynamic_content { - component - } - ...NavigationLinksRef_ContentPage - ...TopPrimaryButtonRef_ContentPage - } - sidebar { - __typename - ...ContentSidebar_ContentPageRefs - ...JoinLoyaltyContactSidebar_ContentPageRefs - ...ScriptedCardSidebar_ContentPageRefs - ...TeaserCardSidebar_ContentPageRefs - ...QuickLinksSidebar_ContentPageRefs - } - system { - ...System - } - } - } - ${System} - ${NavigationLinksRef_ContentPage} - ${TopPrimaryButtonRef_ContentPage} - ${ContentSidebar_ContentPageRefs} - ${JoinLoyaltyContactSidebar_ContentPageRefs} - ${ScriptedCardSidebar_ContentPageRefs} - ${TeaserCardSidebar_ContentPageRefs} - ${QuickLinksSidebar_ContentPageRefs} -` - -export const GetContentPageBlocksRefs = gql` - query GetContentPageBlocksRefs($locale: String!, $uid: String!) { - content_page(locale: $locale, uid: $uid) { - blocks { - __typename - ...Accordion_ContentPageRefs - ...CardsGrid_ContentPageRefs - ...Content_ContentPageRefs - ...DynamicContent_ContentPageRefs - ...Shortcuts_ContentPageRefs - ...TextCols_ContentPageRef - ...UspGrid_ContentPageRefs - } - } - } - ${Accordion_ContentPageRefs} - ${CardsGrid_ContentPageRefs} - ${Content_ContentPageRefs} - ${DynamicContent_ContentPageRefs} - ${Shortcuts_ContentPageRefs} - ${TextCols_ContentPageRef} - ${UspGrid_ContentPageRefs} -` - -export const GetDaDeEnUrlsContentPage = gql` - query GetDaDeEnUrlsContentPage($uid: String!) { - de: content_page(locale: "de", uid: $uid) { - url - } - en: content_page(locale: "en", uid: $uid) { - url - } - da: content_page(locale: "da", uid: $uid) { - url - } - } -` - -export const GetFiNoSvUrlsContentPage = gql` - query GetFiNoSvUrlsContentPage($uid: String!) { - fi: content_page(locale: "fi", uid: $uid) { - url - } - no: content_page(locale: "no", uid: $uid) { - url - } - sv: content_page(locale: "sv", uid: $uid) { - url - } - } -` diff --git a/packages/trpc/lib/graphql/Query/ContentPage/Metadata.graphql.ts b/packages/trpc/lib/graphql/Query/ContentPage/Metadata.graphql similarity index 68% rename from packages/trpc/lib/graphql/Query/ContentPage/Metadata.graphql.ts rename to packages/trpc/lib/graphql/Query/ContentPage/Metadata.graphql index 97586ee7a..c156c8cad 100644 --- a/packages/trpc/lib/graphql/Query/ContentPage/Metadata.graphql.ts +++ b/packages/trpc/lib/graphql/Query/ContentPage/Metadata.graphql @@ -1,9 +1,6 @@ -import { gql } from "graphql-tag" +#import "../../Fragments/Metadata.graphql" +#import "../../Fragments/System.graphql" -import { Metadata } from "../../Fragments/Metadata.graphql" -import { System } from "../../Fragments/System.graphql" - -export const GetContentPageMetadata = gql` query GetContentPageMetadata($locale: String!, $uid: String!) { content_page(locale: $locale, uid: $uid) { web { @@ -33,6 +30,3 @@ query GetContentPageMetadata($locale: String!, $uid: String!) { } } } -${Metadata} -${System} -` diff --git a/packages/trpc/lib/graphql/Query/DestinationCityPage/DestinationCityListData.graphql.ts b/packages/trpc/lib/graphql/Query/DestinationCityPage/DestinationCityListData.graphql similarity index 87% rename from packages/trpc/lib/graphql/Query/DestinationCityPage/DestinationCityListData.graphql.ts rename to packages/trpc/lib/graphql/Query/DestinationCityPage/DestinationCityListData.graphql index 7bacb559e..66fbb3a7d 100644 --- a/packages/trpc/lib/graphql/Query/DestinationCityPage/DestinationCityListData.graphql.ts +++ b/packages/trpc/lib/graphql/Query/DestinationCityPage/DestinationCityListData.graphql @@ -1,8 +1,5 @@ -import { gql } from "graphql-tag" +#import "../../Fragments/System.graphql" -import { System } from "../../Fragments/System.graphql" - -export const GetDestinationCityListData = gql` query GetDestinationCityListData($locale: String!, $cityIdentifier: String!) { all_destination_city_page( where: { @@ -46,5 +43,3 @@ query GetDestinationCityListData($locale: String!, $cityIdentifier: String!) { } } } -${System} -` diff --git a/packages/trpc/lib/graphql/Query/DestinationCityPage/DestinationCityPage.graphql b/packages/trpc/lib/graphql/Query/DestinationCityPage/DestinationCityPage.graphql new file mode 100644 index 000000000..91df55d21 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/DestinationCityPage/DestinationCityPage.graphql @@ -0,0 +1,178 @@ +#import "../../Fragments/System.graphql" + +#import "../../Fragments/DestinationFilter.graphql" + +#import "../../Fragments/Blocks/Accordion.graphql" +#import "../../Fragments/Blocks/Content.graphql" + +#import "../../Fragments/PageLink/AccountPageLink.graphql" +#import "../../Fragments/PageLink/CampaignOverviewPageLink.graphql" +#import "../../Fragments/PageLink/CampaignPageLink.graphql" +#import "../../Fragments/PageLink/CollectionPageLink.graphql" +#import "../../Fragments/PageLink/ContentPageLink.graphql" +#import "../../Fragments/PageLink/DestinationCityPageLink.graphql" +#import "../../Fragments/PageLink/DestinationCountryPageLink.graphql" +#import "../../Fragments/PageLink/DestinationOverviewPageLink.graphql" +#import "../../Fragments/PageLink/HotelPageLink.graphql" +#import "../../Fragments/PageLink/LoyaltyPageLink.graphql" +#import "../../Fragments/PageLink/StartPageLink.graphql" +#import "../../Fragments/PageLink/PromoCampaignPageLink.graphql" + +#import "../../Fragments/AccountPage/Ref.graphql" +#import "../../Fragments/CampaignOverviewPage/Ref.graphql" +#import "../../Fragments/CampaignPage/Ref.graphql" +#import "../../Fragments/CollectionPage/Ref.graphql" +#import "../../Fragments/ContentPage/Ref.graphql" +#import "../../Fragments/DestinationCityPage/Ref.graphql" +#import "../../Fragments/DestinationCountryPage/Ref.graphql" +#import "../../Fragments/DestinationOverviewPage/Ref.graphql" +#import "../../Fragments/HotelPage/Ref.graphql" +#import "../../Fragments/LoyaltyPage/Ref.graphql" +#import "../../Fragments/StartPage/Ref.graphql" +#import "../../Fragments/PromoCampaignPage/Ref.graphql" + +query GetDestinationCityPage($locale: String!, $uid: String!) { + destination_city_page(uid: $uid, locale: $locale) { + title + destination_settings { + city_denmark + city_finland + city_germany + city_norway + city_poland + city_sweden + 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_DestinationCityPage + ...Content_DestinationCityPage + } + seo_filters { + ...DestinationFilter + } + system { + ...System + created_at + updated_at + } + } + trackingProps: destination_city_page(locale: "en", uid: $uid) { + url + } +} + +query GetDestinationCityPageRefs($locale: String!, $uid: String!) { + destination_city_page(locale: $locale, uid: $uid) { + destination_settings { + city_denmark + city_finland + city_germany + city_norway + city_poland + city_sweden + location { + longitude + latitude + default_zoom + } + } + sidepeek_content { + content { + embedded_itemsConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + } + blocks { + __typename + ...Accordion_DestinationCityPageRefs + ...Content_DestinationCityPageRefs + } + seo_filters { + ...DestinationFilterRef + } + system { + ...System + } + } +} + +query GetDaDeEnUrlsDestinationCityPage($uid: String!) { + de: destination_city_page(locale: "de", uid: $uid) { + url + } + en: destination_city_page(locale: "en", uid: $uid) { + url + } + da: destination_city_page(locale: "da", uid: $uid) { + url + } +} + +query GetFiNoSvUrlsDestinationCityPage($uid: String!) { + fi: destination_city_page(locale: "fi", uid: $uid) { + url + } + no: destination_city_page(locale: "no", uid: $uid) { + url + } + sv: destination_city_page(locale: "sv", uid: $uid) { + url + } +} diff --git a/packages/trpc/lib/graphql/Query/DestinationCityPage/DestinationCityPage.graphql.ts b/packages/trpc/lib/graphql/Query/DestinationCityPage/DestinationCityPage.graphql.ts deleted file mode 100644 index abba3613c..000000000 --- a/packages/trpc/lib/graphql/Query/DestinationCityPage/DestinationCityPage.graphql.ts +++ /dev/null @@ -1,225 +0,0 @@ -import { gql } from "graphql-tag" - -import { AccountPageRef } from "../../Fragments/AccountPage/Ref.graphql" -import { - Accordion_DestinationCityPage, - Accordion_DestinationCityPageRefs, -} from "../../Fragments/Blocks/Accordion.graphql" -import { - Content_DestinationCityPage, - Content_DestinationCityPageRefs, -} from "../../Fragments/Blocks/Content.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 { - DestinationFilter, - DestinationFilterRef, -} from "../../Fragments/DestinationFilter.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 GetDestinationCityPage = gql` - query GetDestinationCityPage($locale: String!, $uid: String!) { - destination_city_page(uid: $uid, locale: $locale) { - title - destination_settings { - city_denmark - city_finland - city_germany - city_norway - city_poland - city_sweden - 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_DestinationCityPage - ...Content_DestinationCityPage - } - seo_filters { - ...DestinationFilter - } - system { - ...System - created_at - updated_at - } - } - trackingProps: destination_city_page(locale: "en", uid: $uid) { - url - } - } - ${System} - ${Accordion_DestinationCityPage} - ${Content_DestinationCityPage} - ${DestinationFilter} - ${AccountPageLink} - ${CampaignOverviewPageLink} - ${CampaignPageLink} - ${CollectionPageLink} - ${ContentPageLink} - ${DestinationCityPageLink} - ${DestinationCountryPageLink} - ${DestinationOverviewPageLink} - ${HotelPageLink} - ${LoyaltyPageLink} - ${StartPageLink} - ${PromoCampaignPageLink} -` - -export const GetDestinationCityPageRefs = gql` - query GetDestinationCityPageRefs($locale: String!, $uid: String!) { - destination_city_page(locale: $locale, uid: $uid) { - destination_settings { - city_denmark - city_finland - city_germany - city_norway - city_poland - city_sweden - location { - longitude - latitude - default_zoom - } - } - sidepeek_content { - content { - embedded_itemsConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - } - blocks { - __typename - ...Accordion_DestinationCityPageRefs - ...Content_DestinationCityPageRefs - } - seo_filters { - ...DestinationFilterRef - } - system { - ...System - } - } - } - ${System} - ${Accordion_DestinationCityPageRefs} - ${Content_DestinationCityPageRefs} - ${DestinationFilterRef} - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${CollectionPageRef} - ${ContentPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${StartPageRef} - ${PromoCampaignPageRef} -` - -export const GetDaDeEnUrlsDestinationCityPage = gql` - query GetDaDeEnUrlsDestinationCityPage($uid: String!) { - de: destination_city_page(locale: "de", uid: $uid) { - url - } - en: destination_city_page(locale: "en", uid: $uid) { - url - } - da: destination_city_page(locale: "da", uid: $uid) { - url - } - } -` - -export const GetFiNoSvUrlsDestinationCityPage = gql` - query GetFiNoSvUrlsDestinationCityPage($uid: String!) { - fi: destination_city_page(locale: "fi", uid: $uid) { - url - } - no: destination_city_page(locale: "no", uid: $uid) { - url - } - sv: destination_city_page(locale: "sv", uid: $uid) { - url - } - } -` diff --git a/packages/trpc/lib/graphql/Query/DestinationCityPage/DestinationCityPageCount.graphql b/packages/trpc/lib/graphql/Query/DestinationCityPage/DestinationCityPageCount.graphql new file mode 100644 index 000000000..0084e58a4 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/DestinationCityPage/DestinationCityPageCount.graphql @@ -0,0 +1,7 @@ +#import "../../Fragments/System.graphql" + +query GetCityPageCount($locale: String!) { + all_destination_city_page(locale: $locale) { + total + } +} diff --git a/packages/trpc/lib/graphql/Query/DestinationCityPage/DestinationCityPageCount.graphql.ts b/packages/trpc/lib/graphql/Query/DestinationCityPage/DestinationCityPageCount.graphql.ts deleted file mode 100644 index 072020329..000000000 --- a/packages/trpc/lib/graphql/Query/DestinationCityPage/DestinationCityPageCount.graphql.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { gql } from "graphql-tag" - -export const GetCityPageCount = gql` - query GetCityPageCount($locale: String!) { - all_destination_city_page(locale: $locale) { - total - } - } -` diff --git a/packages/trpc/lib/graphql/Query/DestinationCityPage/DestinationCityPageUrl.graphql.ts b/packages/trpc/lib/graphql/Query/DestinationCityPage/DestinationCityPageUrl.graphql similarity index 72% rename from packages/trpc/lib/graphql/Query/DestinationCityPage/DestinationCityPageUrl.graphql.ts rename to packages/trpc/lib/graphql/Query/DestinationCityPage/DestinationCityPageUrl.graphql index 55c1b88c6..342f6e83c 100644 --- a/packages/trpc/lib/graphql/Query/DestinationCityPage/DestinationCityPageUrl.graphql.ts +++ b/packages/trpc/lib/graphql/Query/DestinationCityPage/DestinationCityPageUrl.graphql @@ -1,8 +1,5 @@ -import { gql } from "graphql-tag" +#import "../../Fragments/System.graphql" -import { System } from "../../Fragments/System.graphql" - -export const GetCityPageUrls = gql` query GetCityPageUrls($locale: String!, $skip: Int) { all_destination_city_page(locale: $locale, limit: 100, skip: $skip) { items { @@ -21,5 +18,3 @@ query GetCityPageUrls($locale: String!, $skip: Int) { } } } -${System} -` diff --git a/packages/trpc/lib/graphql/Query/DestinationCityPage/Metadata.graphql b/packages/trpc/lib/graphql/Query/DestinationCityPage/Metadata.graphql new file mode 100644 index 000000000..64e3cd808 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/DestinationCityPage/Metadata.graphql @@ -0,0 +1,44 @@ +#import "../../Fragments/Metadata.graphql" +#import "../../Fragments/System.graphql" +#import "../../Fragments/HotelFilter.graphql" + +query GetDestinationCityPageMetadata($locale: String!, $uid: String!) { + destination_city_page(locale: $locale, uid: $uid) { + web { + breadcrumbs { + title + } + seo_metadata { + ...Metadata + } + } + destination_settings { + city_denmark + city_finland + city_germany + city_norway + city_poland + city_sweden + } + images { + image + } + seo_filters { + heading + preamble + seo_metadata { + ...Metadata + } + filterConnection { + edges { + node { + ...HotelFilter + } + } + } + } + system { + ...System + } + } +} diff --git a/packages/trpc/lib/graphql/Query/DestinationCityPage/Metadata.graphql.ts b/packages/trpc/lib/graphql/Query/DestinationCityPage/Metadata.graphql.ts deleted file mode 100644 index f880e098a..000000000 --- a/packages/trpc/lib/graphql/Query/DestinationCityPage/Metadata.graphql.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { gql } from "graphql-tag" - -import { HotelFilter } from "../../Fragments/HotelFilter.graphql" -import { Metadata } from "../../Fragments/Metadata.graphql" -import { System } from "../../Fragments/System.graphql" - -export const GetDestinationCityPageMetadata = gql` - query GetDestinationCityPageMetadata($locale: String!, $uid: String!) { - destination_city_page(locale: $locale, uid: $uid) { - web { - breadcrumbs { - title - } - seo_metadata { - ...Metadata - } - } - destination_settings { - city_denmark - city_finland - city_germany - city_norway - city_poland - city_sweden - } - images { - image - } - seo_filters { - heading - preamble - seo_metadata { - ...Metadata - } - filterConnection { - edges { - node { - ...HotelFilter - } - } - } - } - system { - ...System - } - } - } - ${Metadata} - ${System} - ${HotelFilter} -` diff --git a/packages/trpc/lib/graphql/Query/DestinationCountryPage/DestinationCountryPage.graphql b/packages/trpc/lib/graphql/Query/DestinationCountryPage/DestinationCountryPage.graphql new file mode 100644 index 000000000..4c9109fbc --- /dev/null +++ b/packages/trpc/lib/graphql/Query/DestinationCountryPage/DestinationCountryPage.graphql @@ -0,0 +1,160 @@ +#import "../../Fragments/System.graphql" + +#import "../../Fragments/DestinationFilter.graphql" + +#import "../../Fragments/Blocks/Accordion.graphql" +#import "../../Fragments/Blocks/Content.graphql" + +#import "../../Fragments/PageLink/AccountPageLink.graphql" +#import "../../Fragments/PageLink/CampaignOverviewPageLink.graphql" +#import "../../Fragments/PageLink/CampaignPageLink.graphql" +#import "../../Fragments/PageLink/CollectionPageLink.graphql" +#import "../../Fragments/PageLink/ContentPageLink.graphql" +#import "../../Fragments/PageLink/DestinationCityPageLink.graphql" +#import "../../Fragments/PageLink/DestinationCountryPageLink.graphql" +#import "../../Fragments/PageLink/DestinationOverviewPageLink.graphql" +#import "../../Fragments/PageLink/HotelPageLink.graphql" +#import "../../Fragments/PageLink/LoyaltyPageLink.graphql" +#import "../../Fragments/PageLink/StartPageLink.graphql" +#import "../../Fragments/PageLink/PromoCampaignPageLink.graphql" + +#import "../../Fragments/AccountPage/Ref.graphql" +#import "../../Fragments/CampaignOverviewPage/Ref.graphql" +#import "../../Fragments/CampaignPage/Ref.graphql" +#import "../../Fragments/CollectionPage/Ref.graphql" +#import "../../Fragments/ContentPage/Ref.graphql" +#import "../../Fragments/DestinationCityPage/Ref.graphql" +#import "../../Fragments/DestinationCountryPage/Ref.graphql" +#import "../../Fragments/DestinationOverviewPage/Ref.graphql" +#import "../../Fragments/HotelPage/Ref.graphql" +#import "../../Fragments/LoyaltyPage/Ref.graphql" +#import "../../Fragments/StartPage/Ref.graphql" +#import "../../Fragments/PromoCampaignPage/Ref.graphql" + +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 + } +} + +query GetDestinationCountryPageRefs($locale: String!, $uid: String!) { + destination_country_page(locale: $locale, uid: $uid) { + sidepeek_content { + content { + embedded_itemsConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + } + blocks { + __typename + ...Accordion_DestinationCountryPageRefs + ...Content_DestinationCountryPageRefs + } + seo_filters { + ...DestinationFilterRef + } + system { + ...System + } + } +} + +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 + } +} + +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 + } +} diff --git a/packages/trpc/lib/graphql/Query/DestinationCountryPage/DestinationCountryPage.graphql.ts b/packages/trpc/lib/graphql/Query/DestinationCountryPage/DestinationCountryPage.graphql.ts deleted file mode 100644 index 9ca52fec2..000000000 --- a/packages/trpc/lib/graphql/Query/DestinationCountryPage/DestinationCountryPage.graphql.ts +++ /dev/null @@ -1,207 +0,0 @@ -import { gql } from "graphql-tag" - -import { AccountPageRef } from "../../Fragments/AccountPage/Ref.graphql" -import { - Accordion_DestinationCountryPage, - Accordion_DestinationCountryPageRefs, -} from "../../Fragments/Blocks/Accordion.graphql" -import { - Content_DestinationCountryPage, - Content_DestinationCountryPageRefs, -} from "../../Fragments/Blocks/Content.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 { - DestinationFilter, - DestinationFilterRef, -} from "../../Fragments/DestinationFilter.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 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 GetDestinationCountryPageRefs = gql` - query GetDestinationCountryPageRefs($locale: String!, $uid: String!) { - destination_country_page(locale: $locale, uid: $uid) { - sidepeek_content { - content { - embedded_itemsConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - } - blocks { - __typename - ...Accordion_DestinationCountryPageRefs - ...Content_DestinationCountryPageRefs - } - seo_filters { - ...DestinationFilterRef - } - system { - ...System - } - } - } - ${System} - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${CollectionPageRef} - ${ContentPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${StartPageRef} - ${PromoCampaignPageRef} - ${Accordion_DestinationCountryPageRefs} - ${Content_DestinationCountryPageRefs} - ${DestinationFilterRef} -` - -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 - } - } -` diff --git a/packages/trpc/lib/graphql/Query/DestinationCountryPage/DestinationCountryPageUrl.graphql.ts b/packages/trpc/lib/graphql/Query/DestinationCountryPage/DestinationCountryPageUrl.graphql similarity index 61% rename from packages/trpc/lib/graphql/Query/DestinationCountryPage/DestinationCountryPageUrl.graphql.ts rename to packages/trpc/lib/graphql/Query/DestinationCountryPage/DestinationCountryPageUrl.graphql index 5f4953fae..4c21f5bdc 100644 --- a/packages/trpc/lib/graphql/Query/DestinationCountryPage/DestinationCountryPageUrl.graphql.ts +++ b/packages/trpc/lib/graphql/Query/DestinationCountryPage/DestinationCountryPageUrl.graphql @@ -1,8 +1,5 @@ -import { gql } from "graphql-tag" +#import "../../Fragments/System.graphql" -import { System } from "../../Fragments/System.graphql" - -export const GetCountryPageUrls = gql` query GetCountryPageUrls($locale: String!) { all_destination_country_page(locale: $locale) { items { @@ -16,5 +13,3 @@ query GetCountryPageUrls($locale: String!) { } } } -${System} -` diff --git a/packages/trpc/lib/graphql/Query/DestinationCountryPage/Metadata.graphql b/packages/trpc/lib/graphql/Query/DestinationCountryPage/Metadata.graphql new file mode 100644 index 000000000..0c12482a4 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/DestinationCountryPage/Metadata.graphql @@ -0,0 +1,39 @@ +#import "../../Fragments/Metadata.graphql" +#import "../../Fragments/System.graphql" +#import "../../Fragments/HotelFilter.graphql" + +query GetDestinationCountryPageMetadata($locale: String!, $uid: String!) { + destination_country_page(locale: $locale, uid: $uid) { + web { + breadcrumbs { + title + } + seo_metadata { + ...Metadata + } + } + destination_settings { + country + } + images { + image + } + seo_filters { + heading + preamble + seo_metadata { + ...Metadata + } + filterConnection { + edges { + node { + ...HotelFilter + } + } + } + } + system { + ...System + } + } +} diff --git a/packages/trpc/lib/graphql/Query/DestinationCountryPage/Metadata.graphql.ts b/packages/trpc/lib/graphql/Query/DestinationCountryPage/Metadata.graphql.ts deleted file mode 100644 index 336f5d06f..000000000 --- a/packages/trpc/lib/graphql/Query/DestinationCountryPage/Metadata.graphql.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { gql } from "graphql-tag" - -import { HotelFilter } from "../../Fragments/HotelFilter.graphql" -import { Metadata } from "../../Fragments/Metadata.graphql" -import { System } from "../../Fragments/System.graphql" - -export const GetDestinationCountryPageMetadata = gql` - query GetDestinationCountryPageMetadata($locale: String!, $uid: String!) { - destination_country_page(locale: $locale, uid: $uid) { - web { - breadcrumbs { - title - } - seo_metadata { - ...Metadata - } - } - destination_settings { - country - } - images { - image - } - seo_filters { - heading - preamble - seo_metadata { - ...Metadata - } - filterConnection { - edges { - node { - ...HotelFilter - } - } - } - } - system { - ...System - } - } - } - ${Metadata} - ${System} - ${HotelFilter} -` diff --git a/packages/trpc/lib/graphql/Query/DestinationOverviewPage/DestinationOverviewPage.graphql b/packages/trpc/lib/graphql/Query/DestinationOverviewPage/DestinationOverviewPage.graphql new file mode 100644 index 000000000..c0f15dd8d --- /dev/null +++ b/packages/trpc/lib/graphql/Query/DestinationOverviewPage/DestinationOverviewPage.graphql @@ -0,0 +1,63 @@ +#import "../../Fragments/System.graphql" + +#import "../../Fragments/Blocks/CardGallery.graphql" + +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 + } +} + +query GetDestinationOverviewPageRefs($locale: String!, $uid: String!) { + destination_overview_page(locale: $locale, uid: $uid) { + blocks { + __typename + ...CardGallery_DestinationOverviewPageRefs + } + system { + ...System + } + } +} + +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 + } +} + +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 + } +} diff --git a/packages/trpc/lib/graphql/Query/DestinationOverviewPage/DestinationOverviewPage.graphql.ts b/packages/trpc/lib/graphql/Query/DestinationOverviewPage/DestinationOverviewPage.graphql.ts deleted file mode 100644 index 2a450b42f..000000000 --- a/packages/trpc/lib/graphql/Query/DestinationOverviewPage/DestinationOverviewPage.graphql.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { gql } from "graphql-tag" - -import { - CardGallery_DestinationOverviewPage, - CardGallery_DestinationOverviewPageRefs, -} 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 GetDestinationOverviewPageRefs = gql` - query GetDestinationOverviewPageRefs($locale: String!, $uid: String!) { - destination_overview_page(locale: $locale, uid: $uid) { - blocks { - __typename - ...CardGallery_DestinationOverviewPageRefs - } - system { - ...System - } - } - } - ${System} - ${CardGallery_DestinationOverviewPageRefs} -` - -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 - } - } -` diff --git a/packages/trpc/lib/graphql/Query/DestinationOverviewPage/Metadata.graphql.ts b/packages/trpc/lib/graphql/Query/DestinationOverviewPage/Metadata.graphql similarity index 55% rename from packages/trpc/lib/graphql/Query/DestinationOverviewPage/Metadata.graphql.ts rename to packages/trpc/lib/graphql/Query/DestinationOverviewPage/Metadata.graphql index 5a39b9769..5c6f8bf83 100644 --- a/packages/trpc/lib/graphql/Query/DestinationOverviewPage/Metadata.graphql.ts +++ b/packages/trpc/lib/graphql/Query/DestinationOverviewPage/Metadata.graphql @@ -1,9 +1,6 @@ -import { gql } from "graphql-tag" +#import "../../Fragments/Metadata.graphql" +#import "../../Fragments/System.graphql" -import { Metadata } from "../../Fragments/Metadata.graphql" -import { System } from "../../Fragments/System.graphql" - -export const GetDestinationOverviewPageMetadata = gql` query GetDestinationOverviewPageMetadata($locale: String!, $uid: String!) { destination_overview_page(locale: $locale, uid: $uid) { web { @@ -19,6 +16,3 @@ query GetDestinationOverviewPageMetadata($locale: String!, $uid: String!) { } } } -${Metadata} -${System} -` diff --git a/packages/trpc/lib/graphql/Query/Footer.graphql b/packages/trpc/lib/graphql/Query/Footer.graphql new file mode 100644 index 000000000..4e63b4043 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/Footer.graphql @@ -0,0 +1,192 @@ +#import "../Fragments/System.graphql" + +#import "../Fragments/PageLink/AccountPageLink.graphql" +#import "../Fragments/PageLink/CampaignOverviewPageLink.graphql" +#import "../Fragments/PageLink/CampaignPageLink.graphql" +#import "../Fragments/PageLink/CollectionPageLink.graphql" +#import "../Fragments/PageLink/ContentPageLink.graphql" +#import "../Fragments/PageLink/DestinationCityPageLink.graphql" +#import "../Fragments/PageLink/DestinationCountryPageLink.graphql" +#import "../Fragments/PageLink/DestinationOverviewPageLink.graphql" +#import "../Fragments/PageLink/HotelPageLink.graphql" +#import "../Fragments/PageLink/LoyaltyPageLink.graphql" +#import "../Fragments/PageLink/StartPageLink.graphql" +#import "../Fragments/PageLink/PromoCampaignPageLink.graphql" + +#import "../Fragments/AccountPage/Ref.graphql" +#import "../Fragments/CampaignOverviewPage/Ref.graphql" +#import "../Fragments/CampaignPage/Ref.graphql" +#import "../Fragments/CollectionPage/Ref.graphql" +#import "../Fragments/ContentPage/Ref.graphql" +#import "../Fragments/DestinationCityPage/Ref.graphql" +#import "../Fragments/DestinationCountryPage/Ref.graphql" +#import "../Fragments/DestinationOverviewPage/Ref.graphql" +#import "../Fragments/HotelPage/Ref.graphql" +#import "../Fragments/LoyaltyPage/Ref.graphql" +#import "../Fragments/StartPage/Ref.graphql" +#import "../Fragments/PromoCampaignPage/Ref.graphql" + +#import "../Fragments/Footer/AppDownloads.graphql" +#import "../Fragments/Footer/SocialMedia.graphql" + +query GetFooter($locale: String!) { + all_footer(limit: 1, locale: $locale) { + items { + main_links { + title + open_in_new_tab + link { + href + title + } + pageConnection { + edges { + node { + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + } + secondary_links { + title + links { + title + open_in_new_tab + pageConnection { + edges { + node { + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + link { + href + title + } + } + } + tertiary_links { + title + open_in_new_tab + link { + href + title + } + pageConnection { + edges { + node { + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + } + ...AppDownloads + ...SocialMedia + } + } +} + +query GetFooterRef($locale: String!) { + all_footer(limit: 1, locale: $locale) { + items { + main_links { + pageConnection { + edges { + node { + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + secondary_links { + links { + pageConnection { + edges { + node { + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + } + tertiary_links { + pageConnection { + edges { + node { + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + system { + ...System + } + } + } +} diff --git a/packages/trpc/lib/graphql/Query/Footer.graphql.ts b/packages/trpc/lib/graphql/Query/Footer.graphql.ts deleted file mode 100644 index c1b268891..000000000 --- a/packages/trpc/lib/graphql/Query/Footer.graphql.ts +++ /dev/null @@ -1,222 +0,0 @@ -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 { AppDownloads } from "../Fragments/Footer/AppDownloads.graphql" -import { SocialMedia } from "../Fragments/Footer/SocialMedia.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 GetFooter = gql` - query GetFooter($locale: String!) { - all_footer(limit: 1, locale: $locale) { - items { - main_links { - title - open_in_new_tab - link { - href - title - } - pageConnection { - edges { - node { - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - } - secondary_links { - title - links { - title - open_in_new_tab - pageConnection { - edges { - node { - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - link { - href - title - } - } - } - tertiary_links { - title - open_in_new_tab - link { - href - title - } - pageConnection { - edges { - node { - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - } - ...AppDownloads - ...SocialMedia - } - } - } - ${AccountPageLink} - ${CampaignOverviewPageLink} - ${CampaignPageLink} - ${CollectionPageLink} - ${ContentPageLink} - ${DestinationCityPageLink} - ${DestinationCountryPageLink} - ${DestinationOverviewPageLink} - ${HotelPageLink} - ${LoyaltyPageLink} - ${StartPageLink} - ${PromoCampaignPageLink} - ${AppDownloads} - ${SocialMedia} -` - -export const GetFooterRef = gql` - query GetFooterRef($locale: String!) { - all_footer(limit: 1, locale: $locale) { - items { - main_links { - pageConnection { - edges { - node { - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - secondary_links { - links { - pageConnection { - edges { - node { - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - } - tertiary_links { - pageConnection { - edges { - node { - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - system { - ...System - } - } - } - } - ${System} - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${CollectionPageRef} - ${ContentPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${StartPageRef} - ${PromoCampaignPageRef} -` diff --git a/packages/trpc/lib/graphql/Query/Header.graphql b/packages/trpc/lib/graphql/Query/Header.graphql new file mode 100644 index 000000000..60fbe959a --- /dev/null +++ b/packages/trpc/lib/graphql/Query/Header.graphql @@ -0,0 +1,314 @@ +#import "../Fragments/System.graphql" + +#import "../Fragments/Blocks/Card.graphql" +#import "../Fragments/Blocks/Refs/Card.graphql" + +#import "../Fragments/PageLink/AccountPageLink.graphql" +#import "../Fragments/PageLink/CampaignOverviewPageLink.graphql" +#import "../Fragments/PageLink/CampaignPageLink.graphql" +#import "../Fragments/PageLink/CollectionPageLink.graphql" +#import "../Fragments/PageLink/ContentPageLink.graphql" +#import "../Fragments/PageLink/DestinationCityPageLink.graphql" +#import "../Fragments/PageLink/DestinationCountryPageLink.graphql" +#import "../Fragments/PageLink/DestinationOverviewPageLink.graphql" +#import "../Fragments/PageLink/HotelPageLink.graphql" +#import "../Fragments/PageLink/LoyaltyPageLink.graphql" +#import "../Fragments/PageLink/StartPageLink.graphql" +#import "../Fragments/PageLink/PromoCampaignPageLink.graphql" + +#import "../Fragments/AccountPage/Ref.graphql" +#import "../Fragments/CampaignOverviewPage/Ref.graphql" +#import "../Fragments/CampaignPage/Ref.graphql" +#import "../Fragments/CollectionPage/Ref.graphql" +#import "../Fragments/ContentPage/Ref.graphql" +#import "../Fragments/DestinationCityPage/Ref.graphql" +#import "../Fragments/DestinationCountryPage/Ref.graphql" +#import "../Fragments/DestinationOverviewPage/Ref.graphql" +#import "../Fragments/HotelPage/Ref.graphql" +#import "../Fragments/LoyaltyPage/Ref.graphql" +#import "../Fragments/StartPage/Ref.graphql" +#import "../Fragments/PromoCampaignPage/Ref.graphql" + +query GetHeader($locale: String!) { + all_header(limit: 1, locale: $locale) { + items { + top_link { + logged_in { + icon + is_contentstack_link + title + linkConnection { + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + external_link { + href + title + } + } + logged_out { + icon + is_contentstack_link + title + linkConnection { + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + external_link { + href + title + } + } + } + menu_items { + is_contentstack_link + title + linkConnection { + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + external_link { + href + title + } + see_all_link { + is_contentstack_link + title + linkConnection { + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + external_link { + href + title + } + } + submenu { + title + links { + is_contentstack_link + title + linkConnection { + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + external_link { + href + title + } + } + } + cardConnection { + edges { + node { + __typename + ...CardBlock + } + } + } + } + } + } +} + +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 + } + } + } +} diff --git a/packages/trpc/lib/graphql/Query/Header.graphql.ts b/packages/trpc/lib/graphql/Query/Header.graphql.ts deleted file mode 100644 index d9c6f1f6f..000000000 --- a/packages/trpc/lib/graphql/Query/Header.graphql.ts +++ /dev/null @@ -1,344 +0,0 @@ -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" -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 GetHeader = gql` - query GetHeader($locale: String!) { - all_header(limit: 1, locale: $locale) { - items { - top_link { - logged_in { - icon - is_contentstack_link - title - linkConnection { - edges { - node { - __typename - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - external_link { - href - title - } - } - logged_out { - icon - is_contentstack_link - title - linkConnection { - edges { - node { - __typename - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - external_link { - href - title - } - } - } - menu_items { - is_contentstack_link - title - linkConnection { - edges { - node { - __typename - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - external_link { - href - title - } - see_all_link { - is_contentstack_link - title - linkConnection { - edges { - node { - __typename - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - external_link { - href - title - } - } - submenu { - title - links { - is_contentstack_link - title - linkConnection { - edges { - node { - __typename - ...AccountPageLink - ...CampaignOverviewPageLink - ...CampaignPageLink - ...CollectionPageLink - ...ContentPageLink - ...DestinationCityPageLink - ...DestinationCountryPageLink - ...DestinationOverviewPageLink - ...HotelPageLink - ...LoyaltyPageLink - ...StartPageLink - ...PromoCampaignPageLink - } - } - } - external_link { - href - title - } - } - } - cardConnection { - edges { - node { - __typename - ...CardBlock - } - } - } - } - } - } - } - ${CardBlock} - ${AccountPageLink} - ${CampaignOverviewPageLink} - ${CampaignPageLink} - ${CollectionPageLink} - ${ContentPageLink} - ${DestinationCityPageLink} - ${DestinationCountryPageLink} - ${DestinationOverviewPageLink} - ${HotelPageLink} - ${LoyaltyPageLink} - ${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} -` diff --git a/packages/trpc/lib/graphql/Query/HotelPage/HotelPage.graphql b/packages/trpc/lib/graphql/Query/HotelPage/HotelPage.graphql new file mode 100644 index 000000000..a163b0082 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/HotelPage/HotelPage.graphql @@ -0,0 +1,172 @@ +#import "../../Fragments/PageLink/CollectionPageLink.graphql" +#import "../../Fragments/PageLink/ContentPageLink.graphql" + +#import "../../Fragments/AccountPage/Ref.graphql" +#import "../../Fragments/CollectionPage/Ref.graphql" +#import "../../Fragments/ContentPage/Ref.graphql" + +#import "../../Fragments/Blocks/Accordion.graphql" +#import "../../Fragments/Blocks/Refs/Accordion.graphql" + +query GetHotelPage($locale: String!, $uid: String!) { + hotel_page(locale: $locale, uid: $uid) { + hotel_page_id + title + url + hotel_navigation { + overview + rooms + restaurant_bar + conferences_meetings + health_wellness + activities + offers + faq + } + campaigns { + heading + preamble + prioritized_campaignsConnection { + edges { + node { + ... on CampaignPage { + system { + uid + } + } + } + } + } + } + faq { + __typename + title + global_faqConnection { + __typename + edges { + node { + ...AccordionBlock + } + } + } + specific_faq { + __typename + ...GlobalAccordionBlock + } + } + content { + __typename + ... on HotelPageContentUpcomingActivitiesCard { + upcoming_activities_card { + background_image + cta_text + sidepeek_cta_text + heading + body_text + scripted_title + sidepeek_slug + hotel_page_activities_content_pageConnection { + edges { + node { + __typename + ... on ContentPage { + ...ContentPageLink + header { + preamble + } + } + ... on CollectionPage { + ...CollectionPageLink + header { + preamble + } + } + } + } + } + } + } + ... on HotelPageContentSpaPage { + spa_page { + button_cta + pageConnection { + edges { + node { + ...CollectionPageLink + ...ContentPageLink + } + } + } + } + } + } + system { + ...System + created_at + updated_at + } + } +} + +query GetHotelPageRefs($locale: String!, $uid: String!) { + hotel_page(locale: $locale, uid: $uid) { + faq { + global_faqConnection { + edges { + node { + ...AccordionBlockRefs + } + } + } + specific_faq { + ...GlobalAccordionBlockRefs + } + } + content { + __typename + ... on HotelPageContentUpcomingActivitiesCard { + upcoming_activities_card { + hotel_page_activities_content_pageConnection { + edges { + node { + __typename + ...CollectionPageRef + ...ContentPageRef + } + } + } + } + } + } + system { + ...System + } + } + trackingProps: hotel_page(locale: "en", uid: $uid) { + url + } +} + +query GetDaDeEnUrlsHotelPage($uid: String!) { + de: hotel_page(locale: "de", uid: $uid) { + url + } + en: hotel_page(locale: "en", uid: $uid) { + url + } + da: hotel_page(locale: "da", uid: $uid) { + url + } +} + +query GetFiNoSvUrlsHotelPage($uid: String!) { + fi: hotel_page(locale: "fi", uid: $uid) { + url + } + no: hotel_page(locale: "no", uid: $uid) { + url + } + sv: hotel_page(locale: "sv", uid: $uid) { + url + } +} diff --git a/packages/trpc/lib/graphql/Query/HotelPage/HotelPage.graphql.ts b/packages/trpc/lib/graphql/Query/HotelPage/HotelPage.graphql.ts deleted file mode 100644 index 879d3a883..000000000 --- a/packages/trpc/lib/graphql/Query/HotelPage/HotelPage.graphql.ts +++ /dev/null @@ -1,196 +0,0 @@ -import { gql } from "graphql-tag" - -import { - AccordionBlock, - GlobalAccordionBlock, -} from "../../Fragments/Blocks/Accordion.graphql" -import { - AccordionBlockRefs, - GlobalAccordionBlockRefs, -} from "../../Fragments/Blocks/Refs/Accordion.graphql" -import { CollectionPageRef } from "../../Fragments/CollectionPage/Ref.graphql" -import { ContentPageRef } from "../../Fragments/ContentPage/Ref.graphql" -import { CollectionPageLink } from "../../Fragments/PageLink/CollectionPageLink.graphql" -import { ContentPageLink } from "../../Fragments/PageLink/ContentPageLink.graphql" -import { System } from "../../Fragments/System.graphql" - -export const GetHotelPage = gql` - query GetHotelPage($locale: String!, $uid: String!) { - hotel_page(locale: $locale, uid: $uid) { - hotel_page_id - title - url - hotel_navigation { - overview - rooms - restaurant_bar - conferences_meetings - health_wellness - activities - offers - faq - } - campaigns { - heading - preamble - prioritized_campaignsConnection { - edges { - node { - ... on CampaignPage { - system { - uid - } - } - } - } - } - } - faq { - __typename - title - global_faqConnection { - __typename - edges { - node { - ...AccordionBlock - } - } - } - specific_faq { - __typename - ...GlobalAccordionBlock - } - } - content { - __typename - ... on HotelPageContentUpcomingActivitiesCard { - upcoming_activities_card { - background_image - cta_text - sidepeek_cta_text - heading - body_text - scripted_title - sidepeek_slug - hotel_page_activities_content_pageConnection { - edges { - node { - __typename - ... on ContentPage { - ...ContentPageLink - header { - preamble - } - } - ... on CollectionPage { - ...CollectionPageLink - header { - preamble - } - } - } - } - } - } - } - ... on HotelPageContentSpaPage { - spa_page { - button_cta - pageConnection { - edges { - node { - ...CollectionPageLink - ...ContentPageLink - } - } - } - } - } - } - system { - ...System - created_at - updated_at - } - } - } - ${System} - ${AccordionBlock} - ${GlobalAccordionBlock} - ${ContentPageLink} - ${CollectionPageLink} -` - -export const GetHotelPageRefs = gql` - query GetHotelPageRefs($locale: String!, $uid: String!) { - hotel_page(locale: $locale, uid: $uid) { - faq { - global_faqConnection { - edges { - node { - ...AccordionBlockRefs - } - } - } - specific_faq { - ...GlobalAccordionBlockRefs - } - } - content { - __typename - ... on HotelPageContentUpcomingActivitiesCard { - upcoming_activities_card { - hotel_page_activities_content_pageConnection { - edges { - node { - __typename - ...CollectionPageRef - ...ContentPageRef - } - } - } - } - } - } - system { - ...System - } - } - trackingProps: hotel_page(locale: "en", uid: $uid) { - url - } - } - ${CollectionPageRef} - ${ContentPageRef} - ${AccordionBlockRefs} - ${GlobalAccordionBlockRefs} - ${System} -` - -export const GetDaDeEnUrlsHotelPage = gql` - query GetDaDeEnUrlsHotelPage($uid: String!) { - de: hotel_page(locale: "de", uid: $uid) { - url - } - en: hotel_page(locale: "en", uid: $uid) { - url - } - da: hotel_page(locale: "da", uid: $uid) { - url - } - } -` - -export const GetFiNoSvUrlsHotelPage = gql` - query GetFiNoSvUrlsHotelPage($uid: String!) { - fi: hotel_page(locale: "fi", uid: $uid) { - url - } - no: hotel_page(locale: "no", uid: $uid) { - url - } - sv: hotel_page(locale: "sv", uid: $uid) { - url - } - } -` diff --git a/packages/trpc/lib/graphql/Query/HotelPage/HotelPageCount.graphql b/packages/trpc/lib/graphql/Query/HotelPage/HotelPageCount.graphql new file mode 100644 index 000000000..6c83af553 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/HotelPage/HotelPageCount.graphql @@ -0,0 +1,7 @@ +#import "../../Fragments/System.graphql" + +query GetHotelPageCount($locale: String!) { + all_hotel_page(locale: $locale) { + total + } +} diff --git a/packages/trpc/lib/graphql/Query/HotelPage/HotelPageCount.graphql.ts b/packages/trpc/lib/graphql/Query/HotelPage/HotelPageCount.graphql.ts deleted file mode 100644 index 237bfbdc3..000000000 --- a/packages/trpc/lib/graphql/Query/HotelPage/HotelPageCount.graphql.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { gql } from "graphql-tag" - -export const GetHotelPageCount = gql` - query GetHotelPageCount($locale: String!) { - all_hotel_page(locale: $locale) { - total - } - } -` diff --git a/packages/trpc/lib/graphql/Query/HotelPage/HotelPageUrl.graphql.ts b/packages/trpc/lib/graphql/Query/HotelPage/HotelPageUrl.graphql similarity index 60% rename from packages/trpc/lib/graphql/Query/HotelPage/HotelPageUrl.graphql.ts rename to packages/trpc/lib/graphql/Query/HotelPage/HotelPageUrl.graphql index 4cb762b32..6d2856641 100644 --- a/packages/trpc/lib/graphql/Query/HotelPage/HotelPageUrl.graphql.ts +++ b/packages/trpc/lib/graphql/Query/HotelPage/HotelPageUrl.graphql @@ -1,8 +1,5 @@ -import { gql } from "graphql-tag" +#import "../../Fragments/System.graphql" -import { System } from "../../Fragments/System.graphql" - -export const GetHotelPageUrls = gql` query GetHotelPageUrls($locale: String!, $skip: Int) { all_hotel_page(locale: $locale, limit: 100, skip: $skip) { items { @@ -14,5 +11,3 @@ query GetHotelPageUrls($locale: String!, $skip: Int) { } } } -${System} -` diff --git a/packages/trpc/lib/graphql/Query/HotelPage/Metadata.graphql.ts b/packages/trpc/lib/graphql/Query/HotelPage/Metadata.graphql similarity index 55% rename from packages/trpc/lib/graphql/Query/HotelPage/Metadata.graphql.ts rename to packages/trpc/lib/graphql/Query/HotelPage/Metadata.graphql index 658995c1a..6daed5c86 100644 --- a/packages/trpc/lib/graphql/Query/HotelPage/Metadata.graphql.ts +++ b/packages/trpc/lib/graphql/Query/HotelPage/Metadata.graphql @@ -1,9 +1,6 @@ -import { gql } from "graphql-tag" +#import "../../Fragments/Metadata.graphql" +#import "../../Fragments/System.graphql" -import { Metadata } from "../../Fragments/Metadata.graphql" -import { System } from "../../Fragments/System.graphql" - -export const GetHotelPageMetadata = gql` query GetHotelPageMetadata($locale: String!, $uid: String!) { hotel_page(locale: $locale, uid: $uid) { hotel_page_id @@ -20,6 +17,3 @@ query GetHotelPageMetadata($locale: String!, $uid: String!) { } } } -${Metadata} -${System} -` diff --git a/packages/trpc/lib/graphql/Query/LoyaltyLevels.graphql.ts b/packages/trpc/lib/graphql/Query/LoyaltyLevels.graphql similarity index 82% rename from packages/trpc/lib/graphql/Query/LoyaltyLevels.graphql.ts rename to packages/trpc/lib/graphql/Query/LoyaltyLevels.graphql index 057c64a0a..652d096d7 100644 --- a/packages/trpc/lib/graphql/Query/LoyaltyLevels.graphql.ts +++ b/packages/trpc/lib/graphql/Query/LoyaltyLevels.graphql @@ -1,6 +1,3 @@ -import { gql } from "graphql-tag" - -export const GetAllLoyaltyLevels = gql` query GetAllLoyaltyLevels($lang: String!, $level_ids: [String]!) { all_loyalty_level(where: { level_id_in: $level_ids }, locale: $lang) { items { @@ -13,9 +10,7 @@ query GetAllLoyaltyLevels($lang: String!, $level_ids: [String]!) { } } } -` -export const GetLoyaltyLevel = gql` query GetLoyaltyLevel($lang: String!, $level_id: String!) { all_loyalty_level(where: { level_id: $level_id }, locale: $lang) { items { @@ -28,4 +23,3 @@ query GetLoyaltyLevel($lang: String!, $level_id: String!) { } } } -` diff --git a/packages/trpc/lib/graphql/Query/LoyaltyPage/LoyaltyPage.graphql b/packages/trpc/lib/graphql/Query/LoyaltyPage/LoyaltyPage.graphql new file mode 100644 index 000000000..cae4e97dd --- /dev/null +++ b/packages/trpc/lib/graphql/Query/LoyaltyPage/LoyaltyPage.graphql @@ -0,0 +1,102 @@ +#import "../../Fragments/System.graphql" + +#import "../../Fragments/Blocks/CardsGrid.graphql" +#import "../../Fragments/Blocks/Content.graphql" +#import "../../Fragments/Blocks/DynamicContent.graphql" +#import "../../Fragments/Blocks/Shortcuts.graphql" + +#import "../../Fragments/Sidebar/Content.graphql" +#import "../../Fragments/Sidebar/DynamicContent.graphql" +#import "../../Fragments/Sidebar/JoinLoyaltyContact.graphql" + +query GetLoyaltyPage($locale: String!, $uid: String!) { + loyalty_page(uid: $uid, locale: $locale) { + heading + hero_image + preamble + title + blocks { + __typename + ...CardsGrid_LoyaltyPage + ...Content_LoyaltyPage + ...DynamicContent_LoyaltyPage + ...Shortcuts_LoyaltyPage + } + sidebar { + __typename + ...ContentSidebar_LoyaltyPage + ...DynamicContentSidebar_LoyaltyPage + ...JoinLoyaltyContactSidebar_LoyaltyPage + } + system { + ...System + created_at + updated_at + } + } + trackingProps: loyalty_page(locale: "en", uid: $uid) { + url + } +} + +query GetLoyaltyPageRefs($locale: String!, $uid: String!) { + loyalty_page(locale: $locale, uid: $uid) { + blocks { + __typename + ...CardsGrid_LoyaltyPageRefs + ...Content_LoyaltyPageRefs + ...DynamicContent_LoyaltyPageRefs + ...Shortcuts_LoyaltyPageRefs + } + sidebar { + __typename + ...ContentSidebar_LoyaltyPageRefs + ...JoinLoyaltyContactSidebar_LoyaltyPageRefs + } + system { + ...System + } + } +} + +query GetDaDeEnUrlsLoyaltyPage($uid: String!) { + de: loyalty_page(locale: "de", uid: $uid) { + web { + original_url + } + url + } + en: loyalty_page(locale: "en", uid: $uid) { + web { + original_url + } + url + } + da: loyalty_page(locale: "da", uid: $uid) { + web { + original_url + } + url + } +} + +query GetFiNoSvUrlsLoyaltyPage($uid: String!) { + sv: loyalty_page(locale: "sv", uid: $uid) { + web { + original_url + } + url + } + no: loyalty_page(locale: "no", uid: $uid) { + web { + original_url + } + url + } + fi: loyalty_page(locale: "fi", uid: $uid) { + web { + original_url + } + url + } +} diff --git a/packages/trpc/lib/graphql/Query/LoyaltyPage/LoyaltyPage.graphql.ts b/packages/trpc/lib/graphql/Query/LoyaltyPage/LoyaltyPage.graphql.ts deleted file mode 100644 index 9a99a1f07..000000000 --- a/packages/trpc/lib/graphql/Query/LoyaltyPage/LoyaltyPage.graphql.ts +++ /dev/null @@ -1,143 +0,0 @@ -import { gql } from "graphql-tag" - -import { - CardsGrid_LoyaltyPage, - CardsGrid_LoyaltyPageRefs, -} from "../../Fragments/Blocks/CardsGrid.graphql" -import { - Content_LoyaltyPage, - Content_LoyaltyPageRefs, -} from "../../Fragments/Blocks/Content.graphql" -import { - DynamicContent_LoyaltyPage, - DynamicContent_LoyaltyPageRefs, -} from "../../Fragments/Blocks/DynamicContent.graphql" -import { - Shortcuts_LoyaltyPage, - Shortcuts_LoyaltyPageRefs, -} from "../../Fragments/Blocks/Shortcuts.graphql" -import { - ContentSidebar_LoyaltyPage, - ContentSidebar_LoyaltyPageRefs, -} from "../../Fragments/Sidebar/Content.graphql" -import { DynamicContentSidebar_LoyaltyPage } from "../../Fragments/Sidebar/DynamicContent.graphql" -import { - JoinLoyaltyContactSidebar_LoyaltyPage, - JoinLoyaltyContactSidebar_LoyaltyPageRefs, -} from "../../Fragments/Sidebar/JoinLoyaltyContact.graphql" -import { System } from "../../Fragments/System.graphql" - -export const GetLoyaltyPage = gql` - query GetLoyaltyPage($locale: String!, $uid: String!) { - loyalty_page(uid: $uid, locale: $locale) { - heading - hero_image - preamble - title - blocks { - __typename - ...CardsGrid_LoyaltyPage - ...Content_LoyaltyPage - ...DynamicContent_LoyaltyPage - ...Shortcuts_LoyaltyPage - } - sidebar { - __typename - ...ContentSidebar_LoyaltyPage - ...DynamicContentSidebar_LoyaltyPage - ...JoinLoyaltyContactSidebar_LoyaltyPage - } - system { - ...System - created_at - updated_at - } - } - trackingProps: loyalty_page(locale: "en", uid: $uid) { - url - } - } - ${System} - ${CardsGrid_LoyaltyPage} - ${Content_LoyaltyPage} - ${DynamicContent_LoyaltyPage} - ${Shortcuts_LoyaltyPage} - ${ContentSidebar_LoyaltyPage} - ${DynamicContentSidebar_LoyaltyPage} - ${JoinLoyaltyContactSidebar_LoyaltyPage} -` - -export const GetLoyaltyPageRefs = gql` - query GetLoyaltyPageRefs($locale: String!, $uid: String!) { - loyalty_page(locale: $locale, uid: $uid) { - blocks { - __typename - ...CardsGrid_LoyaltyPageRefs - ...Content_LoyaltyPageRefs - ...DynamicContent_LoyaltyPageRefs - ...Shortcuts_LoyaltyPageRefs - } - sidebar { - __typename - ...ContentSidebar_LoyaltyPageRefs - ...JoinLoyaltyContactSidebar_LoyaltyPageRefs - } - system { - ...System - } - } - } - ${System} - ${CardsGrid_LoyaltyPageRefs} - ${Content_LoyaltyPageRefs} - ${DynamicContent_LoyaltyPageRefs} - ${Shortcuts_LoyaltyPageRefs} - ${ContentSidebar_LoyaltyPageRefs} - ${JoinLoyaltyContactSidebar_LoyaltyPageRefs} -` - -export const GetDaDeEnUrlsLoyaltyPage = gql` - query GetDaDeEnUrlsLoyaltyPage($uid: String!) { - de: loyalty_page(locale: "de", uid: $uid) { - web { - original_url - } - url - } - en: loyalty_page(locale: "en", uid: $uid) { - web { - original_url - } - url - } - da: loyalty_page(locale: "da", uid: $uid) { - web { - original_url - } - url - } - } -` - -export const GetFiNoSvUrlsLoyaltyPage = gql` - query GetFiNoSvUrlsLoyaltyPage($uid: String!) { - sv: loyalty_page(locale: "sv", uid: $uid) { - web { - original_url - } - url - } - no: loyalty_page(locale: "no", uid: $uid) { - web { - original_url - } - url - } - fi: loyalty_page(locale: "fi", uid: $uid) { - web { - original_url - } - url - } - } -` diff --git a/packages/trpc/lib/graphql/Query/LoyaltyPage/Metadata.graphql.ts b/packages/trpc/lib/graphql/Query/LoyaltyPage/Metadata.graphql similarity index 67% rename from packages/trpc/lib/graphql/Query/LoyaltyPage/Metadata.graphql.ts rename to packages/trpc/lib/graphql/Query/LoyaltyPage/Metadata.graphql index f8956bd7f..b084d8738 100644 --- a/packages/trpc/lib/graphql/Query/LoyaltyPage/Metadata.graphql.ts +++ b/packages/trpc/lib/graphql/Query/LoyaltyPage/Metadata.graphql @@ -1,9 +1,6 @@ -import { gql } from "graphql-tag" +#import "../../Fragments/Metadata.graphql" +#import "../../Fragments/System.graphql" -import { Metadata } from "../../Fragments/Metadata.graphql" -import { System } from "../../Fragments/System.graphql" - -export const GetLoyaltyPageMetadata = gql` query GetLoyaltyPageMetadata($locale: String!, $uid: String!) { loyalty_page(locale: $locale, uid: $uid) { web { @@ -32,6 +29,3 @@ query GetLoyaltyPageMetadata($locale: String!, $uid: String!) { } } } -${Metadata} -${System} -` diff --git a/packages/trpc/lib/graphql/Query/PageSettings.graphql.ts b/packages/trpc/lib/graphql/Query/PageSettings.graphql similarity index 72% rename from packages/trpc/lib/graphql/Query/PageSettings.graphql.ts rename to packages/trpc/lib/graphql/Query/PageSettings.graphql index c832d151c..627ee5b69 100644 --- a/packages/trpc/lib/graphql/Query/PageSettings.graphql.ts +++ b/packages/trpc/lib/graphql/Query/PageSettings.graphql @@ -1,8 +1,5 @@ -import { gql } from "graphql-tag" +#import "../Fragments/PageSettings.graphql" -import { PageSettings } from "../Fragments/PageSettings.graphql" - -export const GetAccountPageSettings = gql` query GetAccountPageSettings($uid: String!, $locale: String!) { page: account_page(uid: $uid, locale: $locale) { settings: page_settings { @@ -10,10 +7,7 @@ query GetAccountPageSettings($uid: String!, $locale: String!) { } } } -${PageSettings} -` -export const GetCampaignOverviewPageSettings = gql` query GetCampaignOverviewPageSettings($uid: String!, $locale: String!) { page: campaign_overview_page(uid: $uid, locale: $locale) { settings: page_settings { @@ -21,10 +15,7 @@ query GetCampaignOverviewPageSettings($uid: String!, $locale: String!) { } } } -${PageSettings} -` -export const GetCampaignPageSettings = gql` query GetCampaignPageSettings($uid: String!, $locale: String!) { page: campaign_page(uid: $uid, locale: $locale) { settings: page_settings { @@ -32,10 +23,7 @@ query GetCampaignPageSettings($uid: String!, $locale: String!) { } } } -${PageSettings} -` -export const GetCollectionPageSettings = gql` query GetCollectionPageSettings($uid: String!, $locale: String!) { page: collection_page(uid: $uid, locale: $locale) { settings: page_settings { @@ -43,10 +31,7 @@ query GetCollectionPageSettings($uid: String!, $locale: String!) { } } } -${PageSettings} -` -export const GetContentPageSettings = gql` query GetContentPageSettings($uid: String!, $locale: String!) { page: content_page(uid: $uid, locale: $locale) { settings: page_settings { @@ -54,10 +39,7 @@ query GetContentPageSettings($uid: String!, $locale: String!) { } } } -${PageSettings} -` -export const GetCurrentBlocksPageSettings = gql` query GetCurrentBlocksPageSettings($uid: String!, $locale: String!) { page: current_blocks_page(uid: $uid, locale: $locale) { settings: page_settings { @@ -65,10 +47,7 @@ query GetCurrentBlocksPageSettings($uid: String!, $locale: String!) { } } } -${PageSettings} -` -export const GetDestinationCityPageSettings = gql` query GetDestinationCityPageSettings($uid: String!, $locale: String!) { page: destination_city_page(uid: $uid, locale: $locale) { settings: page_settings { @@ -76,10 +55,7 @@ query GetDestinationCityPageSettings($uid: String!, $locale: String!) { } } } -${PageSettings} -` -export const GetDestinationCountryPageSettings = gql` query GetDestinationCountryPageSettings($uid: String!, $locale: String!) { page: destination_country_page(uid: $uid, locale: $locale) { settings: page_settings { @@ -87,10 +63,7 @@ query GetDestinationCountryPageSettings($uid: String!, $locale: String!) { } } } -${PageSettings} -` -export const GetDestinationOverviewPageSettings = gql` query GetDestinationOverviewPageSettings($uid: String!, $locale: String!) { page: destination_overview_page(uid: $uid, locale: $locale) { settings: page_settings { @@ -98,10 +71,7 @@ query GetDestinationOverviewPageSettings($uid: String!, $locale: String!) { } } } -${PageSettings} -` -export const GetHotelPageSettings = gql` query GetHotelPageSettings($uid: String!, $locale: String!) { page: hotel_page(uid: $uid, locale: $locale) { settings: page_settings { @@ -109,10 +79,7 @@ query GetHotelPageSettings($uid: String!, $locale: String!) { } } } -${PageSettings} -` -export const GetLoyaltyPageSettings = gql` query GetLoyaltyPageSettings($uid: String!, $locale: String!) { page: loyalty_page(uid: $uid, locale: $locale) { settings: page_settings { @@ -120,10 +87,7 @@ query GetLoyaltyPageSettings($uid: String!, $locale: String!) { } } } -${PageSettings} -` -export const GetStartPageSettings = gql` query GetStartPageSettings($uid: String!, $locale: String!) { page: start_page(uid: $uid, locale: $locale) { settings: page_settings { @@ -131,10 +95,7 @@ query GetStartPageSettings($uid: String!, $locale: String!) { } } } -${PageSettings} -` -export const GetPromoCampaignPageSettings = gql` query GetPromoCampaignPageSettings($uid: String!, $locale: String!) { page: promo_campaign_page(uid: $uid, locale: $locale) { settings: page_settings { @@ -142,5 +103,3 @@ query GetPromoCampaignPageSettings($uid: String!, $locale: String!) { } } } -${PageSettings} -` diff --git a/packages/trpc/lib/graphql/Query/PromoCampaignPage/Metadata.graphql.ts b/packages/trpc/lib/graphql/Query/PromoCampaignPage/Metadata.graphql similarity index 55% rename from packages/trpc/lib/graphql/Query/PromoCampaignPage/Metadata.graphql.ts rename to packages/trpc/lib/graphql/Query/PromoCampaignPage/Metadata.graphql index edfba5493..10d10fcda 100644 --- a/packages/trpc/lib/graphql/Query/PromoCampaignPage/Metadata.graphql.ts +++ b/packages/trpc/lib/graphql/Query/PromoCampaignPage/Metadata.graphql @@ -1,9 +1,6 @@ -import { gql } from "graphql-tag" +#import "../../Fragments/Metadata.graphql" +#import "../../Fragments/System.graphql" -import { Metadata } from "../../Fragments/Metadata.graphql" -import { System } from "../../Fragments/System.graphql" - -export const GetPromoCampaignPageMetadata = gql` query GetPromoCampaignPageMetadata($locale: String!, $uid: String!) { promo_campaign_page(locale: $locale, uid: $uid) { web { @@ -20,6 +17,3 @@ query GetPromoCampaignPageMetadata($locale: String!, $uid: String!) { } } } -${Metadata} -${System} -` diff --git a/packages/trpc/lib/graphql/Query/PromoCampaignPage/PromoCampaignPage.graphql b/packages/trpc/lib/graphql/Query/PromoCampaignPage/PromoCampaignPage.graphql new file mode 100644 index 000000000..4619b37df --- /dev/null +++ b/packages/trpc/lib/graphql/Query/PromoCampaignPage/PromoCampaignPage.graphql @@ -0,0 +1,75 @@ +#import "../../Fragments/System.graphql" + +#import "../../Fragments/Blocks/Accordion.graphql" +#import "../../Fragments/Blocks/Content.graphql" + +query GetPromoCampaignPage($locale: String!, $uid: String!) { + promo_campaign_page(uid: $uid, locale: $locale) { + title + heading + subheading + promo_hero { + image + heading + benefits + } + page_settings { + booking_code + } + campaign_type + promo_code + startdate + enddate + level_selection + blocks { + __typename + ...Accordion_PromoCampaignPage + ...Content_PromoCampaignPage + } + system { + ...System + created_at + updated_at + } + } + trackingProps: promo_campaign_page(locale: "en", uid: $uid) { + url + } +} + +query GetPromoCampaignPageRefs($locale: String!, $uid: String!) { + promo_campaign_page(locale: $locale, uid: $uid) { + blocks { + __typename + ...Accordion_PromoCampaignPageRefs + ...Content_PromoCampaignPageRefs + } + system { + ...System + } + } +} + +query GetDaDeEnUrlsPromoCampaignPage($uid: String!) { + de: promo_campaign_page(locale: "de", uid: $uid) { + url + } + en: promo_campaign_page(locale: "en", uid: $uid) { + url + } + da: promo_campaign_page(locale: "da", uid: $uid) { + url + } +} + +query GetFiNoSvUrlsPromoCampaignPage($uid: String!) { + fi: promo_campaign_page(locale: "fi", uid: $uid) { + url + } + no: promo_campaign_page(locale: "no", uid: $uid) { + url + } + sv: promo_campaign_page(locale: "sv", uid: $uid) { + url + } +} diff --git a/packages/trpc/lib/graphql/Query/PromoCampaignPage/PromoCampaignPage.graphql.ts b/packages/trpc/lib/graphql/Query/PromoCampaignPage/PromoCampaignPage.graphql.ts deleted file mode 100644 index 36bf48471..000000000 --- a/packages/trpc/lib/graphql/Query/PromoCampaignPage/PromoCampaignPage.graphql.ts +++ /dev/null @@ -1,96 +0,0 @@ -import { gql } from "graphql-tag" - -import { - Accordion_PromoCampaignPage, - Accordion_PromoCampaignPageRefs, -} from "../../Fragments/Blocks/Accordion.graphql" -import { - Content_PromoCampaignPage, - Content_PromoCampaignPageRefs, -} from "../../Fragments/Blocks/Content.graphql" -import { System } from "../../Fragments/System.graphql" - -export const GetPromoCampaignPage = gql` - query GetPromoCampaignPage($locale: String!, $uid: String!) { - promo_campaign_page(uid: $uid, locale: $locale) { - title - heading - subheading - promo_hero { - image - heading - benefits - } - page_settings { - booking_code - } - campaign_type - promo_code - startdate - enddate - level_selection - blocks { - __typename - ...Accordion_PromoCampaignPage - ...Content_PromoCampaignPage - } - system { - ...System - created_at - updated_at - } - } - trackingProps: promo_campaign_page(locale: "en", uid: $uid) { - url - } - } - ${System} - ${Accordion_PromoCampaignPage} - ${Content_PromoCampaignPage} -` - -export const GetPromoCampaignPageRefs = gql` - query GetPromoCampaignPageRefs($locale: String!, $uid: String!) { - promo_campaign_page(locale: $locale, uid: $uid) { - blocks { - __typename - ...Accordion_PromoCampaignPageRefs - ...Content_PromoCampaignPageRefs - } - system { - ...System - } - } - } - ${System} - ${Accordion_PromoCampaignPageRefs} - ${Content_PromoCampaignPageRefs} -` - -export const GetDaDeEnUrlsPromoCampaignPage = gql` - query GetDaDeEnUrlsPromoCampaignPage($uid: String!) { - de: promo_campaign_page(locale: "de", uid: $uid) { - url - } - en: promo_campaign_page(locale: "en", uid: $uid) { - url - } - da: promo_campaign_page(locale: "da", uid: $uid) { - url - } - } -` - -export const GetFiNoSvUrlsPromoCampaignPage = gql` - query GetFiNoSvUrlsPromoCampaignPage($uid: String!) { - fi: promo_campaign_page(locale: "fi", uid: $uid) { - url - } - no: promo_campaign_page(locale: "no", uid: $uid) { - url - } - sv: promo_campaign_page(locale: "sv", uid: $uid) { - url - } - } -` diff --git a/packages/trpc/lib/graphql/Query/ResolveEntry.graphql b/packages/trpc/lib/graphql/Query/ResolveEntry.graphql new file mode 100644 index 000000000..5141e9f5c --- /dev/null +++ b/packages/trpc/lib/graphql/Query/ResolveEntry.graphql @@ -0,0 +1,114 @@ +#import "../Fragments/System.graphql" + +query EntryByUrlBatch1($locale: String!, $url: String!) { + all_account_page(where: { url: $url }, locale: $locale) { + items { + system { + ...System + } + } + total + } + all_collection_page(where: { url: $url }, locale: $locale) { + items { + system { + ...System + } + } + total + } + all_content_page(where: { url: $url }, locale: $locale) { + items { + system { + ...System + } + } + total + } + all_current_blocks_page(where: { url: $url }, locale: $locale) { + items { + system { + ...System + } + } + total + } + all_loyalty_page(where: { url: $url }, locale: $locale) { + items { + system { + ...System + } + } + total + } + all_hotel_page(where: { url: $url }, locale: $locale) { + items { + system { + ...System + } + } + total + } +} + +query EntryByUrlBatch2($locale: String!, $url: String!) { + all_destination_overview_page(where: { url: $url }, locale: $locale) { + items { + system { + ...System + } + } + total + } + all_destination_country_page(where: { url: $url }, locale: $locale) { + items { + system { + ...System + } + } + total + } + all_destination_city_page(where: { url: $url }, locale: $locale) { + items { + system { + ...System + } + } + total + } + all_start_page(where: { url: $url }, locale: $locale) { + items { + system { + ...System + } + } + total + } + all_campaign_page(where: { url: $url }, locale: $locale) { + items { + system { + ...System + } + } + total + } + all_campaign_overview_page(where: { url: $url }, locale: $locale) { + items { + system { + ...System + } + } + total + } +} + +query EntryByUrlBatch3($locale: String!, $url: String!) { + all_promo_campaign_page(where: { url: $url }, locale: $locale) { + items { + system { + ...System + } + } + total + } +} diff --git a/packages/trpc/lib/graphql/Query/ResolveEntry.graphql.ts b/packages/trpc/lib/graphql/Query/ResolveEntry.graphql.ts deleted file mode 100644 index 1f00ebdb5..000000000 --- a/packages/trpc/lib/graphql/Query/ResolveEntry.graphql.ts +++ /dev/null @@ -1,128 +0,0 @@ -import { gql } from "graphql-tag" - -import { SystemFragment } from "../Fragments/SystemFragment.graphql" - -export const EntryByUrlBatch1 = gql` - query EntryByUrlBatch1($locale: String!, $url: String!) { - all_account_page(where: { url: $url }, locale: $locale) { - items { - system { - ...SystemFragment - } - } - total - } - all_collection_page(where: { url: $url }, locale: $locale) { - items { - system { - ...SystemFragment - } - } - total - } - all_content_page(where: { url: $url }, locale: $locale) { - items { - system { - ...SystemFragment - } - } - total - } - all_current_blocks_page(where: { url: $url }, locale: $locale) { - items { - system { - ...SystemFragment - } - } - total - } - all_loyalty_page(where: { url: $url }, locale: $locale) { - items { - system { - ...SystemFragment - } - } - total - } - all_hotel_page(where: { url: $url }, locale: $locale) { - items { - system { - ...SystemFragment - } - } - total - } - } - - ${SystemFragment} -` - -export const EntryByUrlBatch2 = gql` - query EntryByUrlBatch2($locale: String!, $url: String!) { - all_destination_overview_page(where: { url: $url }, locale: $locale) { - items { - system { - ...SystemFragment - } - } - total - } - all_destination_country_page(where: { url: $url }, locale: $locale) { - items { - system { - ...SystemFragment - } - } - total - } - all_destination_city_page(where: { url: $url }, locale: $locale) { - items { - system { - ...SystemFragment - } - } - total - } - all_start_page(where: { url: $url }, locale: $locale) { - items { - system { - ...SystemFragment - } - } - total - } - all_campaign_page(where: { url: $url }, locale: $locale) { - items { - system { - ...SystemFragment - } - } - total - } - all_campaign_overview_page(where: { url: $url }, locale: $locale) { - items { - system { - ...SystemFragment - } - } - total - } - } - - ${SystemFragment} -` - -export const EntryByUrlBatch3 = gql` - query EntryByUrlBatch3($locale: String!, $url: String!) { - all_promo_campaign_page(where: { url: $url }, locale: $locale) { - items { - system { - ...SystemFragment - } - } - total - } - } - - ${SystemFragment} -` diff --git a/packages/trpc/lib/graphql/Query/Rewards.graphql.ts b/packages/trpc/lib/graphql/Query/Rewards.graphql similarity index 81% rename from packages/trpc/lib/graphql/Query/Rewards.graphql.ts rename to packages/trpc/lib/graphql/Query/Rewards.graphql index 93e141da8..58915640f 100644 --- a/packages/trpc/lib/graphql/Query/Rewards.graphql.ts +++ b/packages/trpc/lib/graphql/Query/Rewards.graphql @@ -1,6 +1,3 @@ -import { gql } from "graphql-tag" - -export const GetRewards = gql` query GetRewards($locale: String!, $rewardIds: [String!]) { all_reward(locale: $locale, where: { reward_id_in: $rewardIds }) { items { @@ -16,4 +13,3 @@ query GetRewards($locale: String!, $rewardIds: [String!]) { } } } -` diff --git a/packages/trpc/lib/graphql/Query/RewardsWithRedeem.graphql b/packages/trpc/lib/graphql/Query/RewardsWithRedeem.graphql new file mode 100644 index 000000000..dd33e2c37 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/RewardsWithRedeem.graphql @@ -0,0 +1,96 @@ +#import "../Fragments/System.graphql" + +#import "../Fragments/PageLink/AccountPageLink.graphql" +#import "../Fragments/PageLink/CampaignOverviewPageLink.graphql" +#import "../Fragments/PageLink/CampaignPageLink.graphql" +#import "../Fragments/PageLink/CollectionPageLink.graphql" +#import "../Fragments/PageLink/ContentPageLink.graphql" +#import "../Fragments/PageLink/DestinationCityPageLink.graphql" +#import "../Fragments/PageLink/DestinationCountryPageLink.graphql" +#import "../Fragments/PageLink/DestinationOverviewPageLink.graphql" +#import "../Fragments/PageLink/HotelPageLink.graphql" +#import "../Fragments/PageLink/LoyaltyPageLink.graphql" +#import "../Fragments/PageLink/StartPageLink.graphql" +#import "../Fragments/PageLink/PromoCampaignPageLink.graphql" + +#import "../Fragments/AccountPage/Ref.graphql" +#import "../Fragments/CampaignOverviewPage/Ref.graphql" +#import "../Fragments/CampaignPage/Ref.graphql" +#import "../Fragments/CollectionPage/Ref.graphql" +#import "../Fragments/ContentPage/Ref.graphql" +#import "../Fragments/DestinationCityPage/Ref.graphql" +#import "../Fragments/DestinationCountryPage/Ref.graphql" +#import "../Fragments/DestinationOverviewPage/Ref.graphql" +#import "../Fragments/HotelPage/Ref.graphql" +#import "../Fragments/LoyaltyPage/Ref.graphql" +#import "../Fragments/StartPage/Ref.graphql" +#import "../Fragments/PromoCampaignPage/Ref.graphql" + +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 + } + } +} + +query GetRewardsRef($locale: String!, $rewardIds: [String!]) { + all_reward(locale: $locale, where: { reward_id_in: $rewardIds }) { + items { + redeem_description { + embedded_itemsConnection { + edges { + node { + __typename + ...AccountPageRef + ...CampaignOverviewPageRef + ...CampaignPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef + ...PromoCampaignPageRef + } + } + } + } + system { + ...System + } + } + } +} diff --git a/packages/trpc/lib/graphql/Query/RewardsWithRedeem.graphql.ts b/packages/trpc/lib/graphql/Query/RewardsWithRedeem.graphql.ts deleted file mode 100644 index 98d8abb16..000000000 --- a/packages/trpc/lib/graphql/Query/RewardsWithRedeem.graphql.ts +++ /dev/null @@ -1,125 +0,0 @@ -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 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} -` - -export const GetRewardsRef = gql` - query GetRewardsRef($locale: String!, $rewardIds: [String!]) { - all_reward(locale: $locale, where: { reward_id_in: $rewardIds }) { - items { - redeem_description { - embedded_itemsConnection { - edges { - node { - __typename - ...AccountPageRef - ...CampaignOverviewPageRef - ...CampaignPageRef - ...CollectionPageRef - ...ContentPageRef - ...DestinationCityPageRef - ...DestinationCountryPageRef - ...DestinationOverviewPageRef - ...HotelPageRef - ...LoyaltyPageRef - ...StartPageRef - ...PromoCampaignPageRef - } - } - } - } - system { - ...System - } - } - } - } - ${System} - ${AccountPageRef} - ${CampaignOverviewPageRef} - ${CampaignPageRef} - ${CollectionPageRef} - ${ContentPageRef} - ${DestinationCityPageRef} - ${DestinationCountryPageRef} - ${DestinationOverviewPageRef} - ${HotelPageRef} - ${LoyaltyPageRef} - ${StartPageRef} - ${PromoCampaignPageRef} -` diff --git a/packages/trpc/lib/graphql/Query/SASTierComparison.graphql b/packages/trpc/lib/graphql/Query/SASTierComparison.graphql new file mode 100644 index 000000000..7041c8444 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/SASTierComparison.graphql @@ -0,0 +1,55 @@ +#import "../Fragments/PageLink/AccountPageLink.graphql" +#import "../Fragments/PageLink/CampaignOverviewPageLink.graphql" +#import "../Fragments/PageLink/CampaignPageLink.graphql" +#import "../Fragments/PageLink/CollectionPageLink.graphql" +#import "../Fragments/PageLink/ContentPageLink.graphql" +#import "../Fragments/PageLink/DestinationCityPageLink.graphql" +#import "../Fragments/PageLink/DestinationCountryPageLink.graphql" +#import "../Fragments/PageLink/DestinationOverviewPageLink.graphql" +#import "../Fragments/PageLink/HotelPageLink.graphql" +#import "../Fragments/PageLink/LoyaltyPageLink.graphql" +#import "../Fragments/PageLink/StartPageLink.graphql" +#import "../Fragments/PageLink/PromoCampaignPageLink.graphql" + +query GetAllSasTierComparison($lang: String!) { + all_sas_tier_comparison(locale: $lang) { + items { + scandic_column_title + sas_column_title + tier_matches { + title + scandic_friends_tier_name + sas_eb_tier_name + content { + json + } + link { + href + title + } + } + call_to_action { + title + linkConnection { + edges { + node { + __typename + ...AccountPageLink + ...CampaignOverviewPageLink + ...CampaignPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink + ...PromoCampaignPageLink + } + } + } + } + } + } +} diff --git a/packages/trpc/lib/graphql/Query/SASTierComparison.graphql.ts b/packages/trpc/lib/graphql/Query/SASTierComparison.graphql.ts deleted file mode 100644 index 9ffdb42ea..000000000 --- a/packages/trpc/lib/graphql/Query/SASTierComparison.graphql.ts +++ /dev/null @@ -1,71 +0,0 @@ -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 GetAllSasTierComparison = gql` - query GetAllSasTierComparison($lang: String!) { - all_sas_tier_comparison(locale: $lang) { - items { - scandic_column_title - sas_column_title - tier_matches { - title - scandic_friends_tier_name - sas_eb_tier_name - content { - json - } - link { - href - title - } - } - call_to_action { - title - 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} -` diff --git a/packages/trpc/lib/graphql/Query/SiteConfig.graphql b/packages/trpc/lib/graphql/Query/SiteConfig.graphql new file mode 100644 index 000000000..cd0760dbe --- /dev/null +++ b/packages/trpc/lib/graphql/Query/SiteConfig.graphql @@ -0,0 +1,43 @@ +#import "../Fragments/System.graphql" + +#import "../Fragments/Alert.graphql" + +query GetSiteConfig($locale: String!) { + all_site_config(limit: 1, locale: $locale) { + items { + sitewide_alert { + alerts { + booking_widget_disabled + alertConnection { + edges { + node { + ...Alert + } + } + } + } + } + } + } +} + +query GetSiteConfigRef($locale: String!) { + all_site_config(limit: 1, locale: $locale) { + items { + sitewide_alert { + alerts { + alertConnection { + edges { + node { + ...AlertRef + } + } + } + } + } + system { + ...System + } + } + } +} diff --git a/packages/trpc/lib/graphql/Query/SiteConfig.graphql.ts b/packages/trpc/lib/graphql/Query/SiteConfig.graphql.ts deleted file mode 100644 index 3f74aab97..000000000 --- a/packages/trpc/lib/graphql/Query/SiteConfig.graphql.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { gql } from "graphql-tag" - -import { Alert, AlertRef } from "../Fragments/Alert.graphql" -import { System } from "../Fragments/System.graphql" - -export const GetSiteConfig = gql` - query GetSiteConfig($locale: String!) { - all_site_config(limit: 1, locale: $locale) { - items { - sitewide_alert { - alerts { - booking_widget_disabled - alertConnection { - edges { - node { - ...Alert - } - } - } - } - } - } - } - } - ${Alert} -` - -export const GetSiteConfigRef = gql` - query GetSiteConfigRef($locale: String!) { - all_site_config(limit: 1, locale: $locale) { - items { - sitewide_alert { - alerts { - alertConnection { - edges { - node { - ...AlertRef - } - } - } - } - } - system { - ...System - } - } - } - } - ${System} - ${AlertRef} -` diff --git a/packages/trpc/lib/graphql/Query/SitewideCampaignBanner.graphql b/packages/trpc/lib/graphql/Query/SitewideCampaignBanner.graphql new file mode 100644 index 000000000..2a8c7f2f3 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/SitewideCampaignBanner.graphql @@ -0,0 +1,34 @@ +#import "../Fragments/System.graphql" + +#import "../Fragments/Banner.graphql" + +query GetSitewideCampaignBanner($locale: String!) { + all_sitewide_campaign_banner(limit: 1, locale: $locale) { + items { + bannerConnection { + edges { + node { + ...Banner + } + } + } + } + } +} + +query GetSitewideCampaignBannerRef($locale: String!) { + all_sitewide_campaign_banner(limit: 1, locale: $locale) { + items { + bannerConnection { + edges { + node { + ...BannerRef + } + } + } + system { + ...System + } + } + } +} diff --git a/packages/trpc/lib/graphql/Query/SitewideCampaignBanner.graphql.ts b/packages/trpc/lib/graphql/Query/SitewideCampaignBanner.graphql.ts deleted file mode 100644 index f17b3cdd7..000000000 --- a/packages/trpc/lib/graphql/Query/SitewideCampaignBanner.graphql.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { gql } from "graphql-tag" - -import { Banner, BannerRef } from "../Fragments/Banner.graphql" -import { System } from "../Fragments/System.graphql" - -export const GetSitewideCampaignBanner = gql` - query GetSitewideCampaignBanner($locale: String!) { - all_sitewide_campaign_banner(limit: 1, locale: $locale) { - items { - bannerConnection { - edges { - node { - ...Banner - } - } - } - } - } - } - ${Banner} -` - -export const GetSitewideCampaignBannerRef = gql` - query GetSitewideCampaignBannerRef($locale: String!) { - all_sitewide_campaign_banner(limit: 1, locale: $locale) { - items { - bannerConnection { - edges { - node { - ...BannerRef - } - } - } - system { - ...System - } - } - } - } - ${System} - ${BannerRef} -` diff --git a/packages/trpc/lib/graphql/Query/StartPage/Metadata.graphql.ts b/packages/trpc/lib/graphql/Query/StartPage/Metadata.graphql similarity index 54% rename from packages/trpc/lib/graphql/Query/StartPage/Metadata.graphql.ts rename to packages/trpc/lib/graphql/Query/StartPage/Metadata.graphql index 1c042e66e..68d03fbe1 100644 --- a/packages/trpc/lib/graphql/Query/StartPage/Metadata.graphql.ts +++ b/packages/trpc/lib/graphql/Query/StartPage/Metadata.graphql @@ -1,9 +1,6 @@ -import { gql } from "graphql-tag" +#import "../../Fragments/Metadata.graphql" +#import "../../Fragments/System.graphql" -import { Metadata } from "../../Fragments/Metadata.graphql" -import { System } from "../../Fragments/System.graphql" - -export const GetStartPageMetadata = gql` query GetStartPageMetadata($locale: String!, $uid: String!) { start_page(locale: $locale, uid: $uid) { web { @@ -20,6 +17,3 @@ query GetStartPageMetadata($locale: String!, $uid: String!) { } } } -${Metadata} -${System} -` diff --git a/packages/trpc/lib/graphql/Query/StartPage/StartPage.graphql b/packages/trpc/lib/graphql/Query/StartPage/StartPage.graphql new file mode 100644 index 000000000..6ba478994 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/StartPage/StartPage.graphql @@ -0,0 +1,90 @@ +#import "../../Fragments/System.graphql" +#import "../../Fragments/Blocks/CardsGrid.graphql" +#import "../../Fragments/Blocks/FullWidthCampaign.graphql" +#import "../../Fragments/Blocks/CarouselCards.graphql" +#import "../../Fragments/Blocks/JoinScandicFriends.graphql" + +query GetStartPage($locale: String!, $uid: String!) { + start_page(locale: $locale, uid: $uid) { + title + url + header { + heading + hero_image + } + blocks { + __typename + ...CardsGrid_StartPage + ...CarouselCards_StartPage + ... on StartPageBlocksFullWidthCampaign { + __typename + full_width_campaign { + full_width_campaignConnection { + edges { + node { + ...FullWidthCampaign + } + } + } + } + } + ...JoinScandicFriends_StartPage + } + system { + ...System + created_at + updated_at + } + } + trackingProps: start_page(locale: "en", uid: $uid) { + url + } +} + +query GetStartPageRefs($locale: String!, $uid: String!) { + start_page(locale: $locale, uid: $uid) { + blocks { + __typename + ...CardsGrid_StartPageRefs + ...CarouselCards_StartPageRefs + ... on StartPageBlocksFullWidthCampaign { + full_width_campaign { + full_width_campaignConnection { + edges { + node { + ...FullWidthCampaignRefs + } + } + } + } + } + ...JoinScandicFriends_StartPageRefs + } + system { + ...System + } + } +} + +query GetDaDeEnUrlsStartPage($uid: String!) { + de: start_page(locale: "de", uid: $uid) { + url + } + en: start_page(locale: "en", uid: $uid) { + url + } + da: start_page(locale: "da", uid: $uid) { + url + } +} +query GetFiNoSvUrlsStartPage($uid: String!) { + fi: start_page(locale: "fi", uid: $uid) { + url + } + no: start_page(locale: "no", uid: $uid) { + url + } + sv: start_page(locale: "sv", uid: $uid) { + url + } +} diff --git a/packages/trpc/lib/graphql/Query/StartPage/StartPage.graphql.ts b/packages/trpc/lib/graphql/Query/StartPage/StartPage.graphql.ts deleted file mode 100644 index e7070cdad..000000000 --- a/packages/trpc/lib/graphql/Query/StartPage/StartPage.graphql.ts +++ /dev/null @@ -1,123 +0,0 @@ -import { gql } from "graphql-tag" - -import { - CardsGrid_StartPage, - CardsGrid_StartPageRefs, -} from "../../Fragments/Blocks/CardsGrid.graphql" -import { - CarouselCards_StartPage, - CarouselCards_StartPageRefs, -} from "../../Fragments/Blocks/CarouselCards.graphql" -import { - FullWidthCampaign, - FullWidthCampaignRefs, -} from "../../Fragments/Blocks/FullWidthCampaign.graphql" -import { - JoinScandicFriends_StartPage, - JoinScandicFriends_StartPageRefs, -} from "../../Fragments/Blocks/JoinScandicFriends.graphql" -import { System } from "../../Fragments/System.graphql" - -export const GetStartPage = gql` - query GetStartPage($locale: String!, $uid: String!) { - start_page(locale: $locale, uid: $uid) { - title - url - header { - heading - hero_image - } - blocks { - __typename - ...CardsGrid_StartPage - ...CarouselCards_StartPage - ... on StartPageBlocksFullWidthCampaign { - __typename - full_width_campaign { - full_width_campaignConnection { - edges { - node { - ...FullWidthCampaign - } - } - } - } - } - ...JoinScandicFriends_StartPage - } - system { - ...System - created_at - updated_at - } - } - trackingProps: start_page(locale: "en", uid: $uid) { - url - } - } - ${System} - ${CardsGrid_StartPage} - ${FullWidthCampaign} - ${CarouselCards_StartPage} - ${JoinScandicFriends_StartPage} -` - -export const GetStartPageRefs = gql` - query GetStartPageRefs($locale: String!, $uid: String!) { - start_page(locale: $locale, uid: $uid) { - blocks { - __typename - ...CardsGrid_StartPageRefs - ...CarouselCards_StartPageRefs - ... on StartPageBlocksFullWidthCampaign { - full_width_campaign { - full_width_campaignConnection { - edges { - node { - ...FullWidthCampaignRefs - } - } - } - } - } - ...JoinScandicFriends_StartPageRefs - } - system { - ...System - } - } - } - ${System} - ${CardsGrid_StartPageRefs} - ${FullWidthCampaignRefs} - ${CarouselCards_StartPageRefs} - ${JoinScandicFriends_StartPageRefs} -` - -export const GetDaDeEnUrlsStartPage = gql` - query GetDaDeEnUrlsStartPage($uid: String!) { - de: start_page(locale: "de", uid: $uid) { - url - } - en: start_page(locale: "en", uid: $uid) { - url - } - da: start_page(locale: "da", uid: $uid) { - url - } - } -` - -export const GetFiNoSvUrlsStartPage = gql` - query GetFiNoSvUrlsStartPage($uid: String!) { - fi: start_page(locale: "fi", uid: $uid) { - url - } - no: start_page(locale: "no", uid: $uid) { - url - } - sv: start_page(locale: "sv", uid: $uid) { - url - } - } -` diff --git a/packages/trpc/lib/graphql/_request.ts b/packages/trpc/lib/graphql/_request.ts index ef55cbd68..ad7dd7c69 100644 --- a/packages/trpc/lib/graphql/_request.ts +++ b/packages/trpc/lib/graphql/_request.ts @@ -29,6 +29,31 @@ export async function request( client.requestConfig.cache = params?.cache client.requestConfig.next = params?.next + if (env.PRINT_QUERY) { + const print = (await import("graphql/language/printer")).print + const rawResponse = await client.rawRequest( + print(query as DocumentNode), + variables, + { + access_token: env.CMS_ACCESS_TOKEN, + "Content-Type": "application/json", + } + ) + + /** + * TODO: Send to Monitoring (Logging and Metrics) + */ + requestLogger.debug("complexity", { + complexityLimit: rawResponse.headers.get("x-query-complexity"), + referenceDepth: rawResponse.headers.get("x-reference-depth"), + resolverCost: rawResponse.headers.get("x-resolver-cost"), + }) + + return { + data: rawResponse.data, + } + } + try { // @ts-expect-error: query can be undefined (?) const operationName = (query as DocumentNode).definitions.find( @@ -115,7 +140,6 @@ export async function request( `[gql] Error sending graphql request to ${env.CMS_URL}`, error ) - - throw new Error("Failed to fetch data from CMS", { cause: { error } }) + throw new Error("Something went wrong") } } diff --git a/packages/trpc/lib/graphql/request.ts b/packages/trpc/lib/graphql/request.ts index ced20e25f..8b09b1f95 100644 --- a/packages/trpc/lib/graphql/request.ts +++ b/packages/trpc/lib/graphql/request.ts @@ -1,5 +1,4 @@ import fetchRetry from "fetch-retry" -import { type DocumentNode, print } from "graphql" import { GraphQLClient } from "graphql-request" import stringify from "json-stable-stringify-without-jsonify" import { cache as reactCache } from "react" @@ -15,6 +14,8 @@ import { getPreviewHash, isPreviewByUid } from "../previewContext" import { request as _request } from "./_request" import { getOperationName } from "./getOperationName" +import type { DocumentNode } from "graphql" + import type { Data } from "../types/requestData" export async function request( @@ -44,7 +45,7 @@ export async function request( return doCall() } - const queryString = typeof query === "string" ? query : print(query) + const queryString = typeof query === "string" ? query : stringify(query) const variablesString = stringify(variables) const fullQuery = `${queryString}${variablesString}` diff --git a/packages/trpc/lib/graphql/validate.test.ts b/packages/trpc/lib/graphql/validate.test.ts deleted file mode 100644 index ae68bd915..000000000 --- a/packages/trpc/lib/graphql/validate.test.ts +++ /dev/null @@ -1,332 +0,0 @@ -import fg from "fast-glob" -import { Kind } from "graphql" -import gql from "graphql-tag" -import path from "path" -import { describe, expect, it } from "vitest" - -import type { DocumentNode } from "graphql" - -const repoRoot = path.resolve(__dirname, "..", "..", "..") - -const fragmentFiles = await fg("**/Fragments/**/*.graphql.ts", { - cwd: repoRoot, - absolute: true, -}) -const queryFiles = await fg("**/Query/**/*.graphql.ts", { - cwd: repoRoot, - absolute: true, -}) - -describe("GraphQL Validate", () => { - it("should validate a simple query", async () => { - const document = gql` - fragment Dance on DanceType { - style - } - ` - const validationResult = validateFragments(document) - expect(validationResult.valid).toBe(true) - }) - - it("should validate a simple query", async () => { - const doc = gql` - fragment Dance on DanceType { - style - } - ` - - expect(validateFragments(doc)).toEqual({ - valid: true, - hasOperation: false, - missing: [], - unused: ["Dance"], - }) - }) - - it("should throw when we pass a broken fragment", async () => { - expect( - () => gql` - fraagment Dance on DanceType { - style - } - ` - ).toThrow() - }) - - it("should throw when we pass a query with invalid syntax", async () => { - expect( - () => gql` - queery Dance { - style - } - ` - ).toThrow() - }) - - it("should not be valid when we have a unused fragment", async () => { - const doc = gql` - query Dance { - style - } - fragment UnusedFragment on DanceType { - id - } - ` - const validationResult = validateFragments(doc) - expect(validationResult.valid).toBe(false) - }) - - it("should not be valid when using a non-existent fragment", async () => { - const doc = gql` - query Dance { - style - ...NonExistingFragment - } - ` - const validationResult = validateFragments(doc) - expect(validationResult.valid).toBe(false) - }) - - it("should be valid when file contains only fragments without internal fragment references", async () => { - const doc = gql` - fragment UserInfo on User { - id - name - email - } - fragment PostInfo on Post { - id - title - content - } - ` - const validationResult = validateFragments(doc) - expect(validationResult.valid).toBe(true) - expect(validationResult.missing).toEqual([]) - expect(validationResult.unused).toEqual(["UserInfo", "PostInfo"]) // Fragments are unused but that's OK when there are no operations - }) - - it("should not be valid when fragments reference undefined fragments", async () => { - const doc = gql` - fragment UserInfo on User { - id - name - ...UndefinedFragment - } - fragment PostInfo on Post { - id - title - content - } - ` - const validationResult = validateFragments(doc) - expect(validationResult.valid).toBe(false) - expect(validationResult.missing).toEqual(["UndefinedFragment"]) - }) - - it("should be valid when fragments reference other fragments defined in the same file", async () => { - const doc = gql` - fragment UserDetails on User { - id - name - ...ContactInfo - } - fragment ContactInfo on User { - email - phone - } - ` - const validationResult = validateFragments(doc) - expect(validationResult.valid).toBe(true) - expect(validationResult.missing).toEqual([]) - // ContactInfo is used by UserDetails, but UserDetails itself is unused - expect(validationResult.unused).toEqual(["UserDetails"]) - }) - - it.each(fragmentFiles)("validates fragment %s", async (file) => { - const imported = await import(file) - if (imported.default) { - const graphqlDocument = imported.default as unknown as DocumentNode - const validationResult = validateFragments(graphqlDocument) - expect(validationResult.valid).toBe(true) - } - - for (const namedExports in imported) { - const graphqlDocument = imported[namedExports] as unknown as DocumentNode - if (!graphqlDocument) continue - - expect(graphqlDocument.kind).toBe(Kind.DOCUMENT) - - const validationResult = validateFragments(graphqlDocument) - expect(validationResult.missing).toEqual([]) - expect(validationResult.valid).toBe(true) - } - }) - - it("should handle transitive fragment usage in operations", () => { - const doc = gql` - query TestQuery { - user { - ...UserInfo - } - } - - fragment UserInfo on User { - id - name - ...ContactInfo - } - - fragment ContactInfo on User { - email - phone - } - ` - const validationResult = validateFragments(doc) - expect(validationResult.valid).toBe(true) - expect(validationResult.hasOperation).toBe(true) - expect(validationResult.missing).toEqual([]) - expect(validationResult.unused).toEqual([]) - }) - - it("should handle complex union type fragments", () => { - const doc = gql` - query TestQuery { - blocks { - __typename - ...BlockA - ...BlockB - } - } - - fragment BlockA on TypeA { - id - title - } - - fragment BlockB on TypeB { - id - content - } - ` - const validationResult = validateFragments(doc) - expect(validationResult).toEqual({ - valid: true, - hasOperation: true, - missing: [], - unused: [], - }) - }) - - it.each(queryFiles)("validates query %s", async (file) => { - const imported = await import(file) - if (imported.default) { - const graphqlDocument = imported.default as unknown as DocumentNode - const validationResult = validateFragments(graphqlDocument) - expect(validationResult.valid).toBe(true) - } - - for (const namedExport in imported) { - const graphqlDocument = imported[namedExport] as unknown as DocumentNode - if (!graphqlDocument) continue - - expect(graphqlDocument.kind).toBe(Kind.DOCUMENT) - const validationResult = validateFragments(graphqlDocument) - - expect(validationResult, `Validation failed for ${namedExport}`).toEqual({ - valid: true, - hasOperation: true, - unused: [], - missing: [], - }) - } - }) -}) - -/** - * Validates GraphQL fragments in a document. - * - * For documents with operations: - * - All fragments must be used (no unused fragments allowed) - * - All referenced fragments must be defined (no missing fragments allowed) - * - * For documents with only fragments (no operations): - * - Fragments can be unused (they are definitions for external use) - * - All referenced fragments must still be defined (no missing fragments allowed) - * - * @param doc - The GraphQL document to validate - * @returns Validation result with valid flag, missing fragments, and unused fragments - */ -export function validateFragments(doc: DocumentNode) { - const defined = new Set() - const used = new Set() - const fragMap = new Map() - - for (const def of doc.definitions) { - if (def.kind === Kind.FRAGMENT_DEFINITION) { - defined.add(def.name.value) - fragMap.set(def.name.value, def) - } - } - - function walk(node: any, visitedFragments = new Set()) { - if (!node) return - - if (node.kind === Kind.FRAGMENT_SPREAD) { - const name = node.name.value - if (!used.has(name)) { - used.add(name) - // If we have the fragment definition, walk its selectionSet to mark transitive usages. - const fragDef = fragMap.get(name) - if (fragDef && !visitedFragments.has(name)) { - visitedFragments.add(name) - walk(fragDef.selectionSet, new Set(visitedFragments)) - } - } - return - } - - if (node.selectionSet) { - for (const sel of node.selectionSet.selections) { - walk(sel, visitedFragments) - } - } - - // Also check in inline fragments and other selection types - if (node.selections) { - for (const sel of node.selections) { - walk(sel, visitedFragments) - } - } - } - - const hasOperation = doc.definitions.some( - (d) => d.kind === Kind.OPERATION_DEFINITION - ) - - if (hasOperation) { - // Start from operations to determine which fragments are actually used. - for (const def of doc.definitions) { - if (def.kind === Kind.OPERATION_DEFINITION) { - walk(def) - } - } - } else { - // No operations: allow standalone fragments. - // Still validate fragment-to-fragment references (detect missing fragments). - for (const def of doc.definitions) { - if (def.kind === Kind.FRAGMENT_DEFINITION) { - walk(def) - } - } - } - - const missing = [...used].filter((name) => !defined.has(name)) - const unused = [...defined].filter((name) => !used.has(name)) - - const valid = hasOperation - ? missing.length === 0 && unused.length === 0 - : missing.length === 0 - - return { valid, missing, unused, hasOperation } -} diff --git a/packages/trpc/lib/routers/contentstack/breadcrumbs/query.ts b/packages/trpc/lib/routers/contentstack/breadcrumbs/query.ts index e42161eb1..aa1a8349e 100644 --- a/packages/trpc/lib/routers/contentstack/breadcrumbs/query.ts +++ b/packages/trpc/lib/routers/contentstack/breadcrumbs/query.ts @@ -1,4 +1,3 @@ -import { type DocumentNode } from "graphql" import { cache } from "react" import { createCounter } from "@scandic-hotels/common/telemetry" @@ -65,8 +64,8 @@ import type { interface BreadcrumbsPageData { dataKey: keyof T - refQuery: string | DocumentNode - query: string | DocumentNode + refQuery: string + query: string } const getBreadcrumbs = cache(async function fetchMemoizedBreadcrumbs( diff --git a/packages/trpc/lib/routers/contentstack/metadata/query.ts b/packages/trpc/lib/routers/contentstack/metadata/query.ts index c17fa5de9..db3131459 100644 --- a/packages/trpc/lib/routers/contentstack/metadata/query.ts +++ b/packages/trpc/lib/routers/contentstack/metadata/query.ts @@ -28,12 +28,11 @@ import { affix, getCityData, getCountryData } from "./utils" import type { LanguageSwitcherData } from "@scandic-hotels/common/constants/language" import type { Lang } from "@scandic-hotels/common/constants/language" -import type { DocumentNode } from "graphql" import type { RawMetadataSchema } from "./output" const fetchMetadata = cache(async function fetchMemoizedMetadata( - query: string | DocumentNode, + query: string, { uid, lang }: { uid: string; lang: Lang } ) { const getMetadataCounter = createCounter("trpc.contentstack", "metadata.get") diff --git a/scripts/README-convert-graphql-to-ts.md b/scripts/README-convert-graphql-to-ts.md deleted file mode 100644 index 26a4831b0..000000000 --- a/scripts/README-convert-graphql-to-ts.md +++ /dev/null @@ -1,150 +0,0 @@ -# GraphQL to TypeScript Converter - -This script converts GraphQL files (`.graphql`) to TypeScript files (`.graphql.ts`) that use the `gql` template literal from `graphql-tag`. - -## Features - -- Converts individual fragments and queries into separate TypeScript exports -- Handles GraphQL imports (`#import`) and converts them to TypeScript imports -- Preserves fragment references and generates proper import statements -- Groups multiple imports from the same file -- Supports fragments, queries, mutations, and subscriptions -- Handles files with multiple operations - -## Usage - -### Basic Conversion - -Convert all GraphQL files in the project: - -```bash -yarn graphql:convert -``` - -Convert files matching a specific pattern: - -```bash -yarn graphql:convert "packages/trpc/**/*.graphql" -``` - -Convert a single file: - -```bash -yarn graphql:convert "path/to/file.graphql" -``` - -### Options - -- `--dry-run`: Preview what files would be converted without actually converting them -- `--delete-originals`: Delete original `.graphql` files after successful conversion -- `--help`, `-h`: Show help message - -### Examples - -Preview conversion: - -```bash -yarn graphql:convert --dry-run -``` - -Convert and delete originals: - -```bash -yarn graphql:convert --delete-originals -``` - -Convert specific directory: - -```bash -yarn graphql:convert "packages/trpc/lib/graphql/Fragments/**/*.graphql" -``` - -## Input Format - -### GraphQL Fragment - -```graphql -fragment Contact on ContactBlock { - sections { - __typename - } -} -``` - -### GraphQL Query with Imports - -```graphql -#import "../Fragments/System.graphql" -#import "../Fragments/Metadata.graphql" - -query GetData($locale: String!) { - data(locale: $locale) { - ...System - ...Metadata - } -} -``` - -## Output Format - -### TypeScript Fragment - -```typescript -import { gql } from "graphql-tag"; - -export const Contact = gql` - fragment Contact on ContactBlock { - sections { - __typename - } - } -`; -``` - -### TypeScript Query with Imports - -```typescript -import { gql } from "graphql-tag"; - -import { System } from "../Fragments/System.graphql"; -import { Metadata } from "../Fragments/Metadata.graphql"; - -export const GetData = gql` - query GetData($locale: String!) { - data(locale: $locale) { - ...System - ...Metadata - } - } - ${System} - ${Metadata} -`; -``` - -## How It Works - -1. **Parse GraphQL Files**: Reads `.graphql` files and extracts imports and operations -2. **Handle Imports**: Converts `#import` statements to TypeScript imports by: - - Reading the imported file to determine export names - - Converting paths from `.graphql` to `.graphql.ts` - - Grouping multiple imports from the same file -3. **Extract Operations**: Identifies fragments, queries, mutations, and subscriptions -4. **Generate TypeScript**: Creates TypeScript files with: - - `gql` template literals - - Proper import statements - - Named exports for each operation - -## Dependencies - -- `glob`: For file pattern matching -- `tsx`: For TypeScript execution -- `@types/node`: For Node.js types -- `graphql-tag`: For the `gql` template literal (runtime dependency) - -## Notes - -- The script preserves the original file structure and naming -- Fragment references (`...FragmentName`) are preserved in the GraphQL content -- Multiple operations in a single file are split into separate exports -- Import conflicts are avoided by using the exact export names from referenced files -- Generated files maintain the same directory structure with `.graphql.ts` extension diff --git a/scripts/convert-graphql-to-ts.ts b/scripts/convert-graphql-to-ts.ts deleted file mode 100644 index ab23c5bfc..000000000 --- a/scripts/convert-graphql-to-ts.ts +++ /dev/null @@ -1,373 +0,0 @@ -#!/usr/bin/env tsx - -import * as fs from "fs"; -import * as path from "path"; -import { glob } from "glob"; - -interface ImportInfo { - fragmentName: string; - importPath: string; - variableName: string; -} - -interface GraphQLFile { - content: string; - imports: ImportInfo[]; - operations: Array<{ name: string; content: string }>; -} - -/** - * Extracts individual fragments/operations from GraphQL content - */ -function extractOperations( - content: string -): Array<{ name: string; content: string }> { - const operations: Array<{ name: string; content: string }> = []; - - // Split content into lines for processing - const lines = content.split("\n"); - let currentOperation: { name: string; content: string[] } | null = null; - let braceCount = 0; - - for (const line of lines) { - const trimmedLine = line.trim(); - - // Check if this line starts a new operation - const fragmentMatch = trimmedLine.match(/^fragment\s+(\w+)\s+on/); - const queryMatch = trimmedLine.match(/^query\s+(\w+)\s*[({]/); - const mutationMatch = trimmedLine.match(/^mutation\s+(\w+)\s*[({]/); - const subscriptionMatch = trimmedLine.match( - /^subscription\s+(\w+)\s*[({]/ - ); - - if (fragmentMatch || queryMatch || mutationMatch || subscriptionMatch) { - // Finish previous operation if exists - if (currentOperation && currentOperation.content.length > 0) { - operations.push({ - name: currentOperation.name, - content: currentOperation.content.join("\n").trim(), - }); - } - - // Start new operation - const operationName = (fragmentMatch || - queryMatch || - mutationMatch || - subscriptionMatch)![1]; - currentOperation = { - name: operationName, - content: [line], - }; - - // Count braces in the current line - braceCount = - (line.match(/{/g) || []).length - - (line.match(/}/g) || []).length; - } else if (currentOperation) { - // Add line to current operation - currentOperation.content.push(line); - - // Update brace count - braceCount += - (line.match(/{/g) || []).length - - (line.match(/}/g) || []).length; - - // If we've closed all braces, this operation is complete - if (braceCount === 0 && trimmedLine.includes("}")) { - operations.push({ - name: currentOperation.name, - content: currentOperation.content.join("\n").trim(), - }); - currentOperation = null; - } - } - } - - // Handle case where file ends without closing brace - if (currentOperation && currentOperation.content.length > 0) { - operations.push({ - name: currentOperation.name, - content: currentOperation.content.join("\n").trim(), - }); - } - - return operations; -} - -/** - * Generates TypeScript content from parsed GraphQL - */ -function generateTypeScriptContent(parsedFile: GraphQLFile): string { - const { imports, operations } = parsedFile; - - let output = 'import { gql } from "graphql-tag"\n'; - - // Add imports for fragments - group by import path to avoid duplicates - if (imports.length > 0) { - output += "\n"; - - const importsByPath = new Map(); - for (const imp of imports) { - if (!importsByPath.has(imp.importPath)) { - importsByPath.set(imp.importPath, []); - } - if ( - !importsByPath.get(imp.importPath)!.includes(imp.variableName) - ) { - importsByPath.get(imp.importPath)!.push(imp.variableName); - } - } - - for (const [importPath, variableNames] of importsByPath) { - output += `import { ${variableNames.join(", ")} } from "${importPath}"\n`; - } - } - - output += "\n"; - - // Generate exports for each operation - if (operations.length === 0) { - // If no operation names found, use a default export - const defaultName = "GraphQLDocument"; - const fragmentSubstitutions = - imports.length > 0 - ? "\n" + - imports.map((imp) => `\${${imp.variableName}}`).join("\n") - : ""; - output += `export const ${defaultName} = gql\`\n${parsedFile.content}${fragmentSubstitutions}\n\`\n`; - } else { - for (let i = 0; i < operations.length; i++) { - const operation = operations[i]; - const fragmentSubstitutions = - imports.length > 0 - ? "\n" + - imports.map((imp) => `\${${imp.variableName}}`).join("\n") - : ""; - output += `export const ${operation.name} = gql\`\n${operation.content}${fragmentSubstitutions}\n\`\n`; - - if (i < operations.length - 1) { - output += "\n"; - } - } - } - - return output; -} - -/** - * Converts a GraphQL import path to a TypeScript import path - */ -function convertImportPath(graphqlPath: string): string { - // Remove the .graphql extension and add .graphql - const withoutExt = graphqlPath.replace(/\.graphql$/, ""); - return `${withoutExt}.graphql`; -} - -/** - * Gets the export names from a GraphQL file by analyzing the fragments it contains - */ -function getExportNamesFromGraphQLFile(filePath: string): string[] { - try { - const content = fs.readFileSync(filePath, "utf-8"); - const operations = extractOperations(content); - return operations.map((op) => op.name); - } catch { - // If file doesn't exist or can't be read, try to infer from path - console.warn( - `Warning: Could not read ${filePath}, inferring export name from path` - ); - return [getVariableNameFromPath(filePath)]; - } -} - -/** - * Extracts the expected variable name from a file path - */ -function getVariableNameFromPath(filePath: string): string { - const basename = path.basename(filePath, ".graphql"); - - // Convert kebab-case or snake_case to PascalCase - return basename - .split(/[-_]/) - .map((word) => word.charAt(0).toUpperCase() + word.slice(1)) - .join(""); -} - -/** - * Parses a GraphQL file and extracts imports and content - */ -function parseGraphQLFile(filePath: string): GraphQLFile { - const content = fs.readFileSync(filePath, "utf-8"); - const lines = content.split("\n"); - const imports: ImportInfo[] = []; - const contentLines: string[] = []; - - for (const line of lines) { - const trimmedLine = line.trim(); - - if (trimmedLine.startsWith("#import")) { - // Extract import path from #import "path" - const match = trimmedLine.match(/#import\s+"([^"]+)"/); - if (match) { - const importPath = match[1]; - const fullImportPath = path.resolve( - path.dirname(filePath), - importPath - ); - const exportNames = - getExportNamesFromGraphQLFile(fullImportPath); - const tsImportPath = convertImportPath(importPath); - - // Add all exports from the imported file - for (const exportName of exportNames) { - imports.push({ - fragmentName: exportName, - importPath: tsImportPath, - variableName: exportName, - }); - } - } - } else if (trimmedLine && !trimmedLine.startsWith("#")) { - contentLines.push(line); - } - } - - const cleanContent = contentLines.join("\n").trim(); - const operations = extractOperations(cleanContent); - - return { - content: cleanContent, - imports, - operations, - }; -} - -/** - * Converts a single GraphQL file to TypeScript - */ -function convertFile(graphqlPath: string): void { - try { - console.log(`Converting: ${graphqlPath}`); - - const parsed = parseGraphQLFile(graphqlPath); - const tsContent = generateTypeScriptContent(parsed); - const tsPath = graphqlPath.replace(/\.graphql$/, ".graphql.ts"); - - fs.writeFileSync(tsPath, tsContent, "utf-8"); - console.log(`✓ Created: ${tsPath}`); - - // Optionally remove the original .graphql file - // Uncomment the next line if you want to delete the original files - // fs.unlinkSync(graphqlPath) - } catch (error) { - console.error(`Error converting ${graphqlPath}:`, error); - } -} - -/** - * Main function to convert all GraphQL files - */ -async function main() { - const args = process.argv.slice(2); - - if (args.includes("--help") || args.includes("-h")) { - console.log(` -GraphQL to TypeScript Converter - -Converts GraphQL files (.graphql) to TypeScript files (.graphql.ts) using gql template literals. - -Usage: tsx convert-graphql-to-ts.ts [options] [pattern] - -Options: - --help, -h Show this help message - --dry-run Show what files would be converted without converting them - --delete-originals Delete original .graphql files after conversion - -Examples: - tsx convert-graphql-to-ts.ts # Convert all .graphql files - tsx convert-graphql-to-ts.ts "packages/trpc/**/*.graphql" # Convert specific pattern - tsx convert-graphql-to-ts.ts --dry-run # Preview conversion - tsx convert-graphql-to-ts.ts --delete-originals # Convert and delete originals - -Features: - • Converts fragments, queries, mutations, and subscriptions - • Handles GraphQL imports (#import) and converts to TypeScript imports - • Preserves fragment references and generates proper import statements - • Groups multiple imports from the same file - • Splits multiple operations into separate exports -`); - return; - } - - const dryRun = args.includes("--dry-run"); - const deleteOriginals = args.includes("--delete-originals"); - - // Get the pattern from args or use default - const pattern = args.find((arg) => !arg.startsWith("--")) || "**/*.graphql"; - - console.log(`🔍 Searching for GraphQL files with pattern: ${pattern}`); - - try { - const files = await glob(pattern, { - ignore: ["**/*.graphql.ts", "**/node_modules/**"], - }); - - if (files.length === 0) { - console.log("❌ No GraphQL files found."); - return; - } - - console.log(`📁 Found ${files.length} GraphQL files`); - - if (dryRun) { - console.log("\n📋 Files that would be converted:"); - files.forEach((file, index) => { - console.log( - ` ${index + 1}. ${file} → ${file.replace(/\.graphql$/, ".graphql.ts")}` - ); - }); - console.log("\n🔍 --dry-run mode: No files were converted."); - return; - } - - console.log("\n🔄 Converting files..."); - let successCount = 0; - let errorCount = 0; - - for (let i = 0; i < files.length; i++) { - const file = files[i]; - try { - console.log( - `📝 [${i + 1}/${files.length}] Converting: ${file}` - ); - convertFile(file); - successCount++; - - if (deleteOriginals) { - fs.unlinkSync(file); - console.log(`🗑️ Deleted: ${file}`); - } - } catch (error) { - console.error(`❌ Error converting ${file}:`, error); - errorCount++; - } - } - - console.log(`\n✅ Conversion complete!`); - console.log(` 📈 Successfully converted: ${successCount} files`); - if (errorCount > 0) { - console.log(` ❌ Errors: ${errorCount} files`); - } - if (deleteOriginals && successCount > 0) { - console.log(` 🗑️ Deleted: ${successCount} original files`); - } - } catch (error) { - console.error("❌ Error:", error); - process.exit(1); - } -} - -// Run the script -if (import.meta.url === `file://${process.argv[1]}`) { - main().catch(console.error); -}