diff --git a/apps/partner-sas/next.config.ts b/apps/partner-sas/next.config.ts index ce41377be..06b8472a3 100644 --- a/apps/partner-sas/next.config.ts +++ b/apps/partner-sas/next.config.ts @@ -27,16 +27,6 @@ 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 fcdc13fea..ddd53abc8 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", + "dev": "NODE_OPTIONS=--openssl-legacy-provider PORT=3001 NEXT_PUBLIC_PORT=3001 next dev --turbo", "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 2d1df0269..2bca05238 100644 --- a/apps/scandic-web/next.config.ts +++ b/apps/scandic-web/next.config.ts @@ -92,17 +92,6 @@ 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 d571cd06e..8cdd2d3e1 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", + "dev": "NODE_OPTIONS=--openssl-legacy-provider PORT=3000 NEXT_PUBLIC_PORT=3000 next dev --turbo", "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 430ca8962..9fa48e2a6 100644 --- a/apps/scandic-web/vitest.config.ts +++ b/apps/scandic-web/vitest.config.ts @@ -4,7 +4,8 @@ import { defineConfig } from "vitest/config" export default defineConfig({ plugins: [ - tsconfigPaths(), + // eslint-disable-next-line @typescript-eslint/no-explicit-any + tsconfigPaths() as any, react({ babel: { plugins: [ diff --git a/package.json b/package.json index 961ae62ce..32d240385 100644 --- a/package.json +++ b/package.json @@ -48,6 +48,7 @@ "turbo": "^2.5.2" }, "resolutions": { - "vite": "^6.3.5" + "vite": "^6.3.5", + "import-in-the-middle": "^1.14.2" } } diff --git a/packages/common/lint-staged.config.js b/packages/common/lint-staged.config.js index eb5351d26..d7e5bd99f 100644 --- a/packages/common/lint-staged.config.js +++ b/packages/common/lint-staged.config.js @@ -1,7 +1,7 @@ const config = { "*.{ts,tsx}": [ () => "yarn lint", - () => "yarn type-check", + () => "yarn check-types", "prettier --write", ], "*.{json,md}": "prettier --write", diff --git a/packages/common/polyfills/at.ts b/packages/common/polyfills/at.ts index 1c9b811ff..dd65d5589 100644 --- a/packages/common/polyfills/at.ts +++ b/packages/common/polyfills/at.ts @@ -1,3 +1,5 @@ +export {} + if (!Array.prototype.at) { Array.prototype.at = function (index: number) { // Convert the index to an integer diff --git a/packages/trpc/env/server.ts b/packages/trpc/env/server.ts index 9bf661a3f..4cd42a0d5 100644 --- a/packages/trpc/env/server.ts +++ b/packages/trpc/env/server.ts @@ -35,11 +35,6 @@ 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, @@ -60,7 +55,6 @@ 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 deleted file mode 100644 index 043af22f9..000000000 --- a/packages/trpc/lib/graphql/Fragments/AccountPage/Ref.graphql +++ /dev/null @@ -1,7 +0,0 @@ -#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 new file mode 100644 index 000000000..7109851c2 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/AccountPage/Ref.graphql.ts @@ -0,0 +1,12 @@ +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 deleted file mode 100644 index fd33afa64..000000000 --- a/packages/trpc/lib/graphql/Fragments/Alert.graphql +++ /dev/null @@ -1,141 +0,0 @@ -#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 new file mode 100644 index 000000000..0367fd80c --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Alert.graphql.ts @@ -0,0 +1,173 @@ +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 deleted file mode 100644 index 32c51dbd5..000000000 --- a/packages/trpc/lib/graphql/Fragments/Aside/Contact.graphql +++ /dev/null @@ -1,14 +0,0 @@ -#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 new file mode 100644 index 000000000..0b3f4f325 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Aside/Contact.graphql.ts @@ -0,0 +1,19 @@ +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 deleted file mode 100644 index 1ed6ba3ca..000000000 --- a/packages/trpc/lib/graphql/Fragments/Aside/Puff.graphql +++ /dev/null @@ -1,7 +0,0 @@ -#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 new file mode 100644 index 000000000..6744f4621 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Aside/Puff.graphql.ts @@ -0,0 +1,12 @@ +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 deleted file mode 100644 index 4f73f049e..000000000 --- a/packages/trpc/lib/graphql/Fragments/Banner.graphql +++ /dev/null @@ -1,82 +0,0 @@ -#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 new file mode 100644 index 000000000..a67a9ea46 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Banner.graphql.ts @@ -0,0 +1,111 @@ +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 deleted file mode 100644 index 28d5533d7..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/Accordion.graphql +++ /dev/null @@ -1,838 +0,0 @@ -#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 new file mode 100644 index 000000000..b028baa96 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/Accordion.graphql.ts @@ -0,0 +1,1162 @@ +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 deleted file mode 100644 index 53b13236a..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/AllCampaigns.graphql +++ /dev/null @@ -1,38 +0,0 @@ -#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 new file mode 100644 index 000000000..e7d60df07 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/AllCampaigns.graphql.ts @@ -0,0 +1,45 @@ +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 deleted file mode 100644 index c978f914f..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/Card.graphql +++ /dev/null @@ -1,83 +0,0 @@ -#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 new file mode 100644 index 000000000..fd6bed1ac --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/Card.graphql.ts @@ -0,0 +1,99 @@ +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 deleted file mode 100644 index 07e6697ab..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/CardGallery.graphql +++ /dev/null @@ -1,108 +0,0 @@ -#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 new file mode 100644 index 000000000..370908791 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/CardGallery.graphql.ts @@ -0,0 +1,139 @@ +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 deleted file mode 100644 index 2887d88d6..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/CardsGrid.graphql +++ /dev/null @@ -1,215 +0,0 @@ -#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 new file mode 100644 index 000000000..eaed17ebc --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/CardsGrid.graphql.ts @@ -0,0 +1,273 @@ +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 deleted file mode 100644 index 55b468904..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/CarouselCards.graphql +++ /dev/null @@ -1,171 +0,0 @@ -#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 new file mode 100644 index 000000000..5a6d02f95 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/CarouselCards.graphql.ts @@ -0,0 +1,209 @@ +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 deleted file mode 100644 index 5b3cbfbbe..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/Content.graphql +++ /dev/null @@ -1,351 +0,0 @@ -#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 new file mode 100644 index 000000000..f6be9694d --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/Content.graphql.ts @@ -0,0 +1,524 @@ +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 deleted file mode 100644 index 788af8069..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/ContentCard.graphql +++ /dev/null @@ -1,95 +0,0 @@ -#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 new file mode 100644 index 000000000..68982aefa --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/ContentCard.graphql.ts @@ -0,0 +1,125 @@ +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 deleted file mode 100644 index 3774f58c0..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/DynamicContent.graphql +++ /dev/null @@ -1,249 +0,0 @@ -#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 new file mode 100644 index 000000000..f7bb40a24 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/DynamicContent.graphql.ts @@ -0,0 +1,362 @@ +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 b/packages/trpc/lib/graphql/Fragments/Blocks/Essentials.graphql deleted file mode 100644 index 9803aa4f7..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/Essentials.graphql +++ /dev/null @@ -1,11 +0,0 @@ -fragment Essentials_CampaignPage on CampaignPageBlocksEssentials { - essentials { - title - preamble - items { - label - icon_identifier - description - } - } -} diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/Essentials.graphql.ts b/packages/trpc/lib/graphql/Fragments/Blocks/Essentials.graphql.ts new file mode 100644 index 000000000..416b209d9 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/Essentials.graphql.ts @@ -0,0 +1,15 @@ +import { gql } from "graphql-tag" + +export const Essentials_CampaignPage = gql` + fragment Essentials_CampaignPage on CampaignPageBlocksEssentials { + essentials { + title + preamble + items { + label + icon_identifier + description + } + } + } +` diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/FullWidthCampaign.graphql b/packages/trpc/lib/graphql/Fragments/Blocks/FullWidthCampaign.graphql deleted file mode 100644 index d03a25efa..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/FullWidthCampaign.graphql +++ /dev/null @@ -1,135 +0,0 @@ -#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 new file mode 100644 index 000000000..57a0368dd --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/FullWidthCampaign.graphql.ts @@ -0,0 +1,162 @@ +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 deleted file mode 100644 index 5b3033c41..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/HotelListing.graphql +++ /dev/null @@ -1,46 +0,0 @@ -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 new file mode 100644 index 000000000..010b56f84 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/HotelListing.graphql.ts @@ -0,0 +1,57 @@ +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 deleted file mode 100644 index 59447c074..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/InfoCard.graphql +++ /dev/null @@ -1,83 +0,0 @@ -#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 new file mode 100644 index 000000000..62018acf4 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/InfoCard.graphql.ts @@ -0,0 +1,98 @@ +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 deleted file mode 100644 index 117a87b1e..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/JoinScandicFriends.graphql +++ /dev/null @@ -1,89 +0,0 @@ -#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 new file mode 100644 index 000000000..90055862c --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/JoinScandicFriends.graphql.ts @@ -0,0 +1,116 @@ +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 deleted file mode 100644 index 17720ffea..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/List.graphql +++ /dev/null @@ -1,29 +0,0 @@ -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 new file mode 100644 index 000000000..3c5243d51 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/List.graphql.ts @@ -0,0 +1,39 @@ +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 deleted file mode 100644 index 2c08caed6..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/LoyaltyCard.graphql +++ /dev/null @@ -1,52 +0,0 @@ -#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 new file mode 100644 index 000000000..ae6efdeae --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/LoyaltyCard.graphql.ts @@ -0,0 +1,68 @@ +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 b/packages/trpc/lib/graphql/Fragments/Blocks/Puff.graphql deleted file mode 100644 index f42cf99e0..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/Puff.graphql +++ /dev/null @@ -1,13 +0,0 @@ -#import "../Puff.graphql" - -fragment PuffBlock on CurrentBlocksPageBlocksPuffs { - puffs { - puffs { - ... on CurrentBlocksPageBlocksPuffsBlockPuffsPuff { - puff { - ...Puff - } - } - } - } -} diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/Puff.graphql.ts b/packages/trpc/lib/graphql/Fragments/Blocks/Puff.graphql.ts new file mode 100644 index 000000000..fa71ee3cc --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/Puff.graphql.ts @@ -0,0 +1,18 @@ +import { gql } from "graphql-tag" + +import { Puff } from "../Puff.graphql" + +export const PuffBlock = gql` + fragment PuffBlock on CurrentBlocksPageBlocksPuffs { + puffs { + puffs { + ... on CurrentBlocksPageBlocksPuffsBlockPuffsPuff { + puff { + ...Puff + } + } + } + } + } + ${Puff} +` diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/Refs/Accordion.graphql b/packages/trpc/lib/graphql/Fragments/Blocks/Refs/Accordion.graphql deleted file mode 100644 index 5cde62479..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/Refs/Accordion.graphql +++ /dev/null @@ -1,64 +0,0 @@ -#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 new file mode 100644 index 000000000..a0d00e923 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/Refs/Accordion.graphql.ts @@ -0,0 +1,94 @@ +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 deleted file mode 100644 index 084e37543..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/Refs/Card.graphql +++ /dev/null @@ -1,60 +0,0 @@ -#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 new file mode 100644 index 000000000..1326105e9 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/Refs/Card.graphql.ts @@ -0,0 +1,78 @@ +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 deleted file mode 100644 index 9b266512c..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/Refs/InfoCard.graphql +++ /dev/null @@ -1,60 +0,0 @@ -#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 new file mode 100644 index 000000000..f329a1285 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/Refs/InfoCard.graphql.ts @@ -0,0 +1,76 @@ +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 deleted file mode 100644 index 10a40340d..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/Refs/LoyaltyCard.graphql +++ /dev/null @@ -1,39 +0,0 @@ -#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 new file mode 100644 index 000000000..b6313a366 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/Refs/LoyaltyCard.graphql.ts @@ -0,0 +1,57 @@ +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 deleted file mode 100644 index 13b56b4a6..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/Refs/TeaserCard.graphql +++ /dev/null @@ -1,125 +0,0 @@ -#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 new file mode 100644 index 000000000..c1e15fc49 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/Refs/TeaserCard.graphql.ts @@ -0,0 +1,141 @@ +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 deleted file mode 100644 index 4fe5e62d3..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/Shortcuts.graphql +++ /dev/null @@ -1,131 +0,0 @@ -#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 new file mode 100644 index 000000000..6cf58aa8a --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/Shortcuts.graphql.ts @@ -0,0 +1,184 @@ +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 b/packages/trpc/lib/graphql/Fragments/Blocks/Table.graphql deleted file mode 100644 index 66736296b..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/Table.graphql +++ /dev/null @@ -1,9 +0,0 @@ -fragment Table_ContentPage on ContentPageBlocksTable { - __typename - table { - heading - preamble - column_widths - table - } -} diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/Table.graphql.ts b/packages/trpc/lib/graphql/Fragments/Blocks/Table.graphql.ts new file mode 100644 index 000000000..f81980407 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/Table.graphql.ts @@ -0,0 +1,13 @@ +import { gql } from "graphql-tag" + +export const Table_ContentPage = gql` + fragment Table_ContentPage on ContentPageBlocksTable { + __typename + table { + heading + preamble + column_widths + table + } + } +` diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/TeaserCard.graphql b/packages/trpc/lib/graphql/Fragments/Blocks/TeaserCard.graphql deleted file mode 100644 index 585663838..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/TeaserCard.graphql +++ /dev/null @@ -1,169 +0,0 @@ -#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 new file mode 100644 index 000000000..bc7c15815 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/TeaserCard.graphql.ts @@ -0,0 +1,185 @@ +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 b/packages/trpc/lib/graphql/Fragments/Blocks/Text.graphql deleted file mode 100644 index 5172145b8..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/Text.graphql +++ /dev/null @@ -1,18 +0,0 @@ -#import "../SysAsset.graphql" - -fragment TextBlock on CurrentBlocksPageBlocksText { - text { - content { - embedded_itemsConnection { - totalCount - edges { - node { - __typename - ...SysAsset - } - } - } - json - } - } -} diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/Text.graphql.ts b/packages/trpc/lib/graphql/Fragments/Blocks/Text.graphql.ts new file mode 100644 index 000000000..9e8c05200 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/Text.graphql.ts @@ -0,0 +1,23 @@ +import { gql } from "graphql-tag" + +import { SysAsset } from "../SysAsset.graphql" + +export const TextBlock = gql` + fragment TextBlock on CurrentBlocksPageBlocksText { + text { + content { + embedded_itemsConnection { + totalCount + edges { + node { + __typename + ...SysAsset + } + } + } + json + } + } + } + ${SysAsset} +` diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/TextCols.graphql b/packages/trpc/lib/graphql/Fragments/Blocks/TextCols.graphql deleted file mode 100644 index c4ddb3491..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/TextCols.graphql +++ /dev/null @@ -1,85 +0,0 @@ -#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 new file mode 100644 index 000000000..e3ec81c54 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/TextCols.graphql.ts @@ -0,0 +1,114 @@ +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 b/packages/trpc/lib/graphql/Fragments/Blocks/TextContent.graphql deleted file mode 100644 index 5da55815b..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/TextContent.graphql +++ /dev/null @@ -1,18 +0,0 @@ -#import "../SysAsset.graphql" - -fragment TextContent_AccountPage on AccountPageContentTextContent { - text_content { - content { - json - embedded_itemsConnection { - totalCount - edges { - node { - __typename - ...SysAsset - } - } - } - } - } -} diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/TextContent.graphql.ts b/packages/trpc/lib/graphql/Fragments/Blocks/TextContent.graphql.ts new file mode 100644 index 000000000..238eb245c --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/TextContent.graphql.ts @@ -0,0 +1,23 @@ +import { gql } from "graphql-tag" + +import { SysAsset } from "../SysAsset.graphql" + +export const TextContent_AccountPage = gql` + fragment TextContent_AccountPage on AccountPageContentTextContent { + text_content { + content { + json + embedded_itemsConnection { + totalCount + edges { + node { + __typename + ...SysAsset + } + } + } + } + } + } + ${SysAsset} +` diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/UspGrid.graphql b/packages/trpc/lib/graphql/Fragments/Blocks/UspGrid.graphql deleted file mode 100644 index e0dc5b6ce..000000000 --- a/packages/trpc/lib/graphql/Fragments/Blocks/UspGrid.graphql +++ /dev/null @@ -1,177 +0,0 @@ -#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 new file mode 100644 index 000000000..79d82f72d --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Blocks/UspGrid.graphql.ts @@ -0,0 +1,234 @@ +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 b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/AccountPage.graphql deleted file mode 100644 index 74bfd6096..000000000 --- a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/AccountPage.graphql +++ /dev/null @@ -1,24 +0,0 @@ -#import "../System.graphql" - -fragment AccountPageBreadcrumb on AccountPage { - web { - breadcrumbs { - title - } - } - system { - ...System - } - url -} - -fragment AccountPageBreadcrumbRef on AccountPage { - web { - breadcrumbs { - title - } - } - system { - ...System - } -} diff --git a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/AccountPage.graphql.ts b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/AccountPage.graphql.ts new file mode 100644 index 000000000..a2deca746 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/AccountPage.graphql.ts @@ -0,0 +1,32 @@ +import { gql } from "graphql-tag" + +import { System } from "../System.graphql" + +export const AccountPageBreadcrumb = gql` + fragment AccountPageBreadcrumb on AccountPage { + web { + breadcrumbs { + title + } + } + system { + ...System + } + url + } + ${System} +` + +export const AccountPageBreadcrumbRef = gql` + fragment AccountPageBreadcrumbRef on AccountPage { + web { + breadcrumbs { + title + } + } + system { + ...System + } + } + ${System} +` diff --git a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/Breadcrumbs.graphql b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/Breadcrumbs.graphql deleted file mode 100644 index 49ad15196..000000000 --- a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/Breadcrumbs.graphql +++ /dev/null @@ -1,52 +0,0 @@ -#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 new file mode 100644 index 000000000..b11fb87d9 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/Breadcrumbs.graphql.ts @@ -0,0 +1,108 @@ +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 b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/CampaignOverviewPage.graphql deleted file mode 100644 index 1f5e652b6..000000000 --- a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/CampaignOverviewPage.graphql +++ /dev/null @@ -1,24 +0,0 @@ -#import "../System.graphql" - -fragment CampaignOverviewPageBreadcrumb on CampaignOverviewPage { - web { - breadcrumbs { - title - } - } - system { - ...System - } - url -} - -fragment CampaignOverviewPageBreadcrumbRef on CampaignOverviewPage { - web { - breadcrumbs { - title - } - } - system { - ...System - } -} diff --git a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/CampaignOverviewPage.graphql.ts b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/CampaignOverviewPage.graphql.ts new file mode 100644 index 000000000..c351c0fc1 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/CampaignOverviewPage.graphql.ts @@ -0,0 +1,32 @@ +import { gql } from "graphql-tag" + +import { System } from "../System.graphql" + +export const CampaignOverviewPageBreadcrumb = gql` + fragment CampaignOverviewPageBreadcrumb on CampaignOverviewPage { + web { + breadcrumbs { + title + } + } + system { + ...System + } + url + } + ${System} +` + +export const CampaignOverviewPageBreadcrumbRef = gql` + fragment CampaignOverviewPageBreadcrumbRef on CampaignOverviewPage { + web { + breadcrumbs { + title + } + } + system { + ...System + } + } + ${System} +` diff --git a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/CampaignPage.graphql b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/CampaignPage.graphql deleted file mode 100644 index 2d4d3c312..000000000 --- a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/CampaignPage.graphql +++ /dev/null @@ -1,24 +0,0 @@ -#import "../System.graphql" - -fragment CampaignPageBreadcrumb on CampaignPage { - web { - breadcrumbs { - title - } - } - system { - ...System - } - url -} - -fragment CampaignPageBreadcrumbRef on CampaignPage { - web { - breadcrumbs { - title - } - } - system { - ...System - } -} diff --git a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/CampaignPage.graphql.ts b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/CampaignPage.graphql.ts new file mode 100644 index 000000000..02f763287 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/CampaignPage.graphql.ts @@ -0,0 +1,32 @@ +import { gql } from "graphql-tag" + +import { System } from "../System.graphql" + +export const CampaignPageBreadcrumb = gql` + fragment CampaignPageBreadcrumb on CampaignPage { + web { + breadcrumbs { + title + } + } + system { + ...System + } + url + } + ${System} +` + +export const CampaignPageBreadcrumbRef = gql` + fragment CampaignPageBreadcrumbRef on CampaignPage { + web { + breadcrumbs { + title + } + } + system { + ...System + } + } + ${System} +` diff --git a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/CollectionPage.graphql b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/CollectionPage.graphql deleted file mode 100644 index debb6b1e8..000000000 --- a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/CollectionPage.graphql +++ /dev/null @@ -1,24 +0,0 @@ -#import "../System.graphql" - -fragment CollectionPageBreadcrumb on CollectionPage { - web { - breadcrumbs { - title - } - } - system { - ...System - } - url -} - -fragment CollectionPageBreadcrumbRef on CollectionPage { - web { - breadcrumbs { - title - } - } - system { - ...System - } -} diff --git a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/CollectionPage.graphql.ts b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/CollectionPage.graphql.ts new file mode 100644 index 000000000..fc8e15953 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/CollectionPage.graphql.ts @@ -0,0 +1,32 @@ +import { gql } from "graphql-tag" + +import { System } from "../System.graphql" + +export const CollectionPageBreadcrumb = gql` + fragment CollectionPageBreadcrumb on CollectionPage { + web { + breadcrumbs { + title + } + } + system { + ...System + } + url + } + ${System} +` + +export const CollectionPageBreadcrumbRef = gql` + fragment CollectionPageBreadcrumbRef on CollectionPage { + web { + breadcrumbs { + title + } + } + system { + ...System + } + } + ${System} +` diff --git a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/ContentPage.graphql b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/ContentPage.graphql deleted file mode 100644 index 4e2e88da7..000000000 --- a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/ContentPage.graphql +++ /dev/null @@ -1,24 +0,0 @@ -#import "../System.graphql" - -fragment ContentPageBreadcrumb on ContentPage { - web { - breadcrumbs { - title - } - } - system { - ...System - } - url -} - -fragment ContentPageBreadcrumbRef on ContentPage { - web { - breadcrumbs { - title - } - } - system { - ...System - } -} diff --git a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/ContentPage.graphql.ts b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/ContentPage.graphql.ts new file mode 100644 index 000000000..58e33de3a --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/ContentPage.graphql.ts @@ -0,0 +1,32 @@ +import { gql } from "graphql-tag" + +import { System } from "../System.graphql" + +export const ContentPageBreadcrumb = gql` + fragment ContentPageBreadcrumb on ContentPage { + web { + breadcrumbs { + title + } + } + system { + ...System + } + url + } + ${System} +` + +export const ContentPageBreadcrumbRef = gql` + fragment ContentPageBreadcrumbRef on ContentPage { + web { + breadcrumbs { + title + } + } + system { + ...System + } + } + ${System} +` diff --git a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/CurrentBlocksPage.graphql b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/CurrentBlocksPage.graphql deleted file mode 100644 index 765eddb3f..000000000 --- a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/CurrentBlocksPage.graphql +++ /dev/null @@ -1,9 +0,0 @@ -fragment CurrentBlocksPageBreadcrumbs on CurrentBlocksPage { - breadcrumbs { - parents { - href - title - } - title - } -} diff --git a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/CurrentBlocksPage.graphql.ts b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/CurrentBlocksPage.graphql.ts new file mode 100644 index 000000000..926076f18 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/CurrentBlocksPage.graphql.ts @@ -0,0 +1,13 @@ +import { gql } from "graphql-tag" + +export const CurrentBlocksPageBreadcrumbs = gql` + fragment CurrentBlocksPageBreadcrumbs on CurrentBlocksPage { + breadcrumbs { + parents { + href + title + } + title + } + } +` diff --git a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/DestinationCityPage.graphql b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/DestinationCityPage.graphql deleted file mode 100644 index 67cd5d764..000000000 --- a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/DestinationCityPage.graphql +++ /dev/null @@ -1,24 +0,0 @@ -#import "../System.graphql" - -fragment DestinationCityPageBreadcrumb on DestinationCityPage { - web { - breadcrumbs { - title - } - } - system { - ...System - } - url -} - -fragment DestinationCityPageBreadcrumbRef on DestinationCityPage { - web { - breadcrumbs { - title - } - } - system { - ...System - } -} diff --git a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/DestinationCityPage.graphql.ts b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/DestinationCityPage.graphql.ts new file mode 100644 index 000000000..1fbd91f26 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/DestinationCityPage.graphql.ts @@ -0,0 +1,32 @@ +import { gql } from "graphql-tag" + +import { System } from "../System.graphql" + +export const DestinationCityPageBreadcrumb = gql` + fragment DestinationCityPageBreadcrumb on DestinationCityPage { + web { + breadcrumbs { + title + } + } + system { + ...System + } + url + } + ${System} +` + +export const DestinationCityPageBreadcrumbRef = gql` + fragment DestinationCityPageBreadcrumbRef on DestinationCityPage { + web { + breadcrumbs { + title + } + } + system { + ...System + } + } + ${System} +` diff --git a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/DestinationCountryPage.graphql b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/DestinationCountryPage.graphql deleted file mode 100644 index 1a856cf09..000000000 --- a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/DestinationCountryPage.graphql +++ /dev/null @@ -1,24 +0,0 @@ -#import "../System.graphql" - -fragment DestinationCountryPageBreadcrumb on DestinationCountryPage { - web { - breadcrumbs { - title - } - } - system { - ...System - } - url -} - -fragment DestinationCountryPageBreadcrumbRef on DestinationCountryPage { - web { - breadcrumbs { - title - } - } - system { - ...System - } -} diff --git a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/DestinationCountryPage.graphql.ts b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/DestinationCountryPage.graphql.ts new file mode 100644 index 000000000..ee83ef99b --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/DestinationCountryPage.graphql.ts @@ -0,0 +1,32 @@ +import { gql } from "graphql-tag" + +import { System } from "../System.graphql" + +export const DestinationCountryPageBreadcrumb = gql` + fragment DestinationCountryPageBreadcrumb on DestinationCountryPage { + web { + breadcrumbs { + title + } + } + system { + ...System + } + url + } + ${System} +` + +export const DestinationCountryPageBreadcrumbRef = gql` + fragment DestinationCountryPageBreadcrumbRef on DestinationCountryPage { + web { + breadcrumbs { + title + } + } + system { + ...System + } + } + ${System} +` diff --git a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/DestinationOverviewPage.graphql b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/DestinationOverviewPage.graphql deleted file mode 100644 index 21dd61dbb..000000000 --- a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/DestinationOverviewPage.graphql +++ /dev/null @@ -1,24 +0,0 @@ -#import "../System.graphql" - -fragment DestinationOverviewPageBreadcrumb on DestinationOverviewPage { - web { - breadcrumbs { - title - } - } - system { - ...System - } - url -} - -fragment DestinationOverviewPageBreadcrumbRef on DestinationOverviewPage { - web { - breadcrumbs { - title - } - } - system { - ...System - } -} diff --git a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/DestinationOverviewPage.graphql.ts b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/DestinationOverviewPage.graphql.ts new file mode 100644 index 000000000..bda43e2c3 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/DestinationOverviewPage.graphql.ts @@ -0,0 +1,32 @@ +import { gql } from "graphql-tag" + +import { System } from "../System.graphql" + +export const DestinationOverviewPageBreadcrumb = gql` + fragment DestinationOverviewPageBreadcrumb on DestinationOverviewPage { + web { + breadcrumbs { + title + } + } + system { + ...System + } + url + } + ${System} +` + +export const DestinationOverviewPageBreadcrumbRef = gql` + fragment DestinationOverviewPageBreadcrumbRef on DestinationOverviewPage { + web { + breadcrumbs { + title + } + } + system { + ...System + } + } + ${System} +` diff --git a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/HotelPage.graphql b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/HotelPage.graphql deleted file mode 100644 index 1e20f3513..000000000 --- a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/HotelPage.graphql +++ /dev/null @@ -1,24 +0,0 @@ -#import "../System.graphql" - -fragment HotelPageBreadcrumb on HotelPage { - web { - breadcrumbs { - title - } - } - system { - ...System - } - url -} - -fragment HotelPageBreadcrumbRef on HotelPage { - web { - breadcrumbs { - title - } - } - system { - ...System - } -} diff --git a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/HotelPage.graphql.ts b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/HotelPage.graphql.ts new file mode 100644 index 000000000..c7e1764cf --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/HotelPage.graphql.ts @@ -0,0 +1,32 @@ +import { gql } from "graphql-tag" + +import { System } from "../System.graphql" + +export const HotelPageBreadcrumb = gql` + fragment HotelPageBreadcrumb on HotelPage { + web { + breadcrumbs { + title + } + } + system { + ...System + } + url + } + ${System} +` + +export const HotelPageBreadcrumbRef = gql` + fragment HotelPageBreadcrumbRef on HotelPage { + web { + breadcrumbs { + title + } + } + system { + ...System + } + } + ${System} +` diff --git a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/LoyaltyPage.graphql b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/LoyaltyPage.graphql deleted file mode 100644 index 5386bc7ef..000000000 --- a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/LoyaltyPage.graphql +++ /dev/null @@ -1,24 +0,0 @@ -#import "../System.graphql" - -fragment LoyaltyPageBreadcrumb on LoyaltyPage { - web { - breadcrumbs { - title - } - } - system { - ...System - } - url -} - -fragment LoyaltyPageBreadcrumbRef on LoyaltyPage { - web { - breadcrumbs { - title - } - } - system { - ...System - } -} diff --git a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/LoyaltyPage.graphql.ts b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/LoyaltyPage.graphql.ts new file mode 100644 index 000000000..1903e6a02 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/LoyaltyPage.graphql.ts @@ -0,0 +1,32 @@ +import { gql } from "graphql-tag" + +import { System } from "../System.graphql" + +export const LoyaltyPageBreadcrumb = gql` + fragment LoyaltyPageBreadcrumb on LoyaltyPage { + web { + breadcrumbs { + title + } + } + system { + ...System + } + url + } + ${System} +` + +export const LoyaltyPageBreadcrumbRef = gql` + fragment LoyaltyPageBreadcrumbRef on LoyaltyPage { + web { + breadcrumbs { + title + } + } + system { + ...System + } + } + ${System} +` diff --git a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/PromoCampaignPage.graphql b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/PromoCampaignPage.graphql deleted file mode 100644 index e8b4af0b2..000000000 --- a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/PromoCampaignPage.graphql +++ /dev/null @@ -1,24 +0,0 @@ -#import "../System.graphql" - -fragment PromoCampaignPageBreadcrumb on PromoCampaignPage { - web { - breadcrumbs { - title - } - } - system { - ...System - } - url -} - -fragment PromoCampaignPageBreadcrumbRef on PromoCampaignPage { - web { - breadcrumbs { - title - } - } - system { - ...System - } -} diff --git a/packages/trpc/lib/graphql/Fragments/Breadcrumbs/PromoCampaignPage.graphql.ts b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/PromoCampaignPage.graphql.ts new file mode 100644 index 000000000..0983b9d1d --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Breadcrumbs/PromoCampaignPage.graphql.ts @@ -0,0 +1,32 @@ +import { gql } from "graphql-tag" + +import { System } from "../System.graphql" + +export const PromoCampaignPageBreadcrumb = gql` + fragment PromoCampaignPageBreadcrumb on PromoCampaignPage { + web { + breadcrumbs { + title + } + } + system { + ...System + } + url + } + ${System} +` + +export const PromoCampaignPageBreadcrumbRef = gql` + fragment PromoCampaignPageBreadcrumbRef on PromoCampaignPage { + web { + breadcrumbs { + title + } + } + system { + ...System + } + } + ${System} +` diff --git a/packages/trpc/lib/graphql/Fragments/CampaignOverviewPage/NavigationLinks.graphql b/packages/trpc/lib/graphql/Fragments/CampaignOverviewPage/NavigationLinks.graphql deleted file mode 100644 index f204a781a..000000000 --- a/packages/trpc/lib/graphql/Fragments/CampaignOverviewPage/NavigationLinks.graphql +++ /dev/null @@ -1,74 +0,0 @@ -#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 new file mode 100644 index 000000000..890925293 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/CampaignOverviewPage/NavigationLinks.graphql.ts @@ -0,0 +1,103 @@ +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 deleted file mode 100644 index d35af3917..000000000 --- a/packages/trpc/lib/graphql/Fragments/CampaignOverviewPage/Ref.graphql +++ /dev/null @@ -1,7 +0,0 @@ -#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 new file mode 100644 index 000000000..8f7296b02 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/CampaignOverviewPage/Ref.graphql.ts @@ -0,0 +1,12 @@ +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 deleted file mode 100644 index ea60f5142..000000000 --- a/packages/trpc/lib/graphql/Fragments/CampaignOverviewPage/TopCampaign.graphql +++ /dev/null @@ -1,23 +0,0 @@ -#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 new file mode 100644 index 000000000..66a6164eb --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/CampaignOverviewPage/TopCampaign.graphql.ts @@ -0,0 +1,32 @@ +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 deleted file mode 100644 index f63ea3f55..000000000 --- a/packages/trpc/lib/graphql/Fragments/CampaignPage/Hero.graphql +++ /dev/null @@ -1,90 +0,0 @@ -#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 new file mode 100644 index 000000000..7063c987f --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/CampaignPage/Hero.graphql.ts @@ -0,0 +1,119 @@ +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 deleted file mode 100644 index 9360bd956..000000000 --- a/packages/trpc/lib/graphql/Fragments/CampaignPage/IncludedHotels.graphql +++ /dev/null @@ -1,45 +0,0 @@ -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 new file mode 100644 index 000000000..a7c13d162 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/CampaignPage/IncludedHotels.graphql.ts @@ -0,0 +1,54 @@ +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 deleted file mode 100644 index 9e3294634..000000000 --- a/packages/trpc/lib/graphql/Fragments/CampaignPage/Ref.graphql +++ /dev/null @@ -1,7 +0,0 @@ -#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 new file mode 100644 index 000000000..3f3a7dd30 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/CampaignPage/Ref.graphql.ts @@ -0,0 +1,12 @@ +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 deleted file mode 100644 index fba25dad8..000000000 --- a/packages/trpc/lib/graphql/Fragments/CollectionPage/NavigationLinks.graphql +++ /dev/null @@ -1,74 +0,0 @@ -#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 new file mode 100644 index 000000000..18ba56d20 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/CollectionPage/NavigationLinks.graphql.ts @@ -0,0 +1,103 @@ +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 deleted file mode 100644 index dd746f5f4..000000000 --- a/packages/trpc/lib/graphql/Fragments/CollectionPage/Ref.graphql +++ /dev/null @@ -1,7 +0,0 @@ -#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 new file mode 100644 index 000000000..9c736ceaa --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/CollectionPage/Ref.graphql.ts @@ -0,0 +1,12 @@ +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 deleted file mode 100644 index 47dad81cc..000000000 --- a/packages/trpc/lib/graphql/Fragments/CollectionPage/TopPrimaryButton.graphql +++ /dev/null @@ -1,79 +0,0 @@ -#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 new file mode 100644 index 000000000..9a0d18d78 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/CollectionPage/TopPrimaryButton.graphql.ts @@ -0,0 +1,108 @@ +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 deleted file mode 100644 index bd2068829..000000000 --- a/packages/trpc/lib/graphql/Fragments/Contact.graphql +++ /dev/null @@ -1,52 +0,0 @@ -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 new file mode 100644 index 000000000..92f393a37 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Contact.graphql.ts @@ -0,0 +1,71 @@ +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 deleted file mode 100644 index 0a69bd7bb..000000000 --- a/packages/trpc/lib/graphql/Fragments/ContentPage/NavigationLinks.graphql +++ /dev/null @@ -1,74 +0,0 @@ -#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 new file mode 100644 index 000000000..098b84a3a --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/ContentPage/NavigationLinks.graphql.ts @@ -0,0 +1,103 @@ +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 deleted file mode 100644 index 80edfcbca..000000000 --- a/packages/trpc/lib/graphql/Fragments/ContentPage/Ref.graphql +++ /dev/null @@ -1,7 +0,0 @@ -#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 new file mode 100644 index 000000000..411120c2e --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/ContentPage/Ref.graphql.ts @@ -0,0 +1,12 @@ +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 deleted file mode 100644 index 76206d02f..000000000 --- a/packages/trpc/lib/graphql/Fragments/ContentPage/TopPrimaryButton.graphql +++ /dev/null @@ -1,79 +0,0 @@ -#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 new file mode 100644 index 000000000..0a0be9a08 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/ContentPage/TopPrimaryButton.graphql.ts @@ -0,0 +1,108 @@ +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 b/packages/trpc/lib/graphql/Fragments/CurrentFooter/AppDownloads.graphql deleted file mode 100644 index 745f68728..000000000 --- a/packages/trpc/lib/graphql/Fragments/CurrentFooter/AppDownloads.graphql +++ /dev/null @@ -1,27 +0,0 @@ -#import "../SysAsset.graphql" - -fragment CurrentFooterAppDownloads on CurrentFooter { - app_downloads { - title - app_store { - href - imageConnection { - edges { - node { - ...SysAsset - } - } - } - } - google_play { - href - imageConnection { - edges { - node { - ...SysAsset - } - } - } - } - } -} diff --git a/packages/trpc/lib/graphql/Fragments/CurrentFooter/AppDownloads.graphql.ts b/packages/trpc/lib/graphql/Fragments/CurrentFooter/AppDownloads.graphql.ts new file mode 100644 index 000000000..ed6c8bc86 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/CurrentFooter/AppDownloads.graphql.ts @@ -0,0 +1,32 @@ +import { gql } from "graphql-tag" + +import { SysAsset } from "../SysAsset.graphql" + +export const CurrentFooterAppDownloads = gql` + fragment CurrentFooterAppDownloads on CurrentFooter { + app_downloads { + title + app_store { + href + imageConnection { + edges { + node { + ...SysAsset + } + } + } + } + google_play { + href + imageConnection { + edges { + node { + ...SysAsset + } + } + } + } + } + } + ${SysAsset} +` diff --git a/packages/trpc/lib/graphql/Fragments/CurrentFooter/Logo.graphql b/packages/trpc/lib/graphql/Fragments/CurrentFooter/Logo.graphql deleted file mode 100644 index e4781cd60..000000000 --- a/packages/trpc/lib/graphql/Fragments/CurrentFooter/Logo.graphql +++ /dev/null @@ -1,11 +0,0 @@ -#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 new file mode 100644 index 000000000..1fb4c6f33 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/CurrentFooter/Logo.graphql.ts @@ -0,0 +1,16 @@ +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 b/packages/trpc/lib/graphql/Fragments/CurrentFooter/MainLinks.graphql deleted file mode 100644 index 62abc0eb1..000000000 --- a/packages/trpc/lib/graphql/Fragments/CurrentFooter/MainLinks.graphql +++ /dev/null @@ -1,29 +0,0 @@ -fragment MainLinks on Footer { - main_links { - title - open_in_new_tab - link { - href - title - } - pageConnection { - edges { - node { - __typename - ... on AccountPage { - title - url - } - ... on LoyaltyPage { - title - url - } - ... on ContentPage { - title - url - } - } - } - } - } -} diff --git a/packages/trpc/lib/graphql/Fragments/CurrentFooter/MainLinks.graphql.ts b/packages/trpc/lib/graphql/Fragments/CurrentFooter/MainLinks.graphql.ts new file mode 100644 index 000000000..c9f62ef33 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/CurrentFooter/MainLinks.graphql.ts @@ -0,0 +1,33 @@ +import { gql } from "graphql-tag" + +export const MainLinks = gql` + fragment MainLinks on Footer { + main_links { + title + open_in_new_tab + link { + href + title + } + pageConnection { + edges { + node { + __typename + ... on AccountPage { + title + url + } + ... on LoyaltyPage { + title + url + } + ... on ContentPage { + title + url + } + } + } + } + } + } +` diff --git a/packages/trpc/lib/graphql/Fragments/CurrentFooter/Navigation.graphql b/packages/trpc/lib/graphql/Fragments/CurrentFooter/Navigation.graphql deleted file mode 100644 index 1439cf885..000000000 --- a/packages/trpc/lib/graphql/Fragments/CurrentFooter/Navigation.graphql +++ /dev/null @@ -1,9 +0,0 @@ -fragment Navigation on CurrentFooter { - navigation { - links { - href - title - } - title - } -} diff --git a/packages/trpc/lib/graphql/Fragments/CurrentFooter/Navigation.graphql.ts b/packages/trpc/lib/graphql/Fragments/CurrentFooter/Navigation.graphql.ts new file mode 100644 index 000000000..c5cd472eb --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/CurrentFooter/Navigation.graphql.ts @@ -0,0 +1,13 @@ +import { gql } from "graphql-tag" + +export const Navigation = gql` + fragment Navigation on CurrentFooter { + navigation { + links { + href + title + } + title + } + } +` diff --git a/packages/trpc/lib/graphql/Fragments/CurrentFooter/Refs/MainLinks.graphql b/packages/trpc/lib/graphql/Fragments/CurrentFooter/Refs/MainLinks.graphql deleted file mode 100644 index cea5340f4..000000000 --- a/packages/trpc/lib/graphql/Fragments/CurrentFooter/Refs/MainLinks.graphql +++ /dev/null @@ -1,18 +0,0 @@ -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 new file mode 100644 index 000000000..695c79edc --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/CurrentFooter/Refs/MainLinks.graphql.ts @@ -0,0 +1,31 @@ +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 deleted file mode 100644 index d324e40b1..000000000 --- a/packages/trpc/lib/graphql/Fragments/CurrentFooter/Refs/SecondaryLinks.graphql +++ /dev/null @@ -1,20 +0,0 @@ -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 new file mode 100644 index 000000000..12c2402c1 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/CurrentFooter/Refs/SecondaryLinks.graphql.ts @@ -0,0 +1,33 @@ +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 deleted file mode 100644 index e6724cd7f..000000000 --- a/packages/trpc/lib/graphql/Fragments/CurrentFooter/SecondaryLinks.graphql +++ /dev/null @@ -1,24 +0,0 @@ -#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 new file mode 100644 index 000000000..694cd33a8 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/CurrentFooter/SecondaryLinks.graphql.ts @@ -0,0 +1,24 @@ +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 b/packages/trpc/lib/graphql/Fragments/CurrentFooter/SocialMedia.graphql deleted file mode 100644 index aef07bd76..000000000 --- a/packages/trpc/lib/graphql/Fragments/CurrentFooter/SocialMedia.graphql +++ /dev/null @@ -1,17 +0,0 @@ -fragment CurrentFooterSocialMedia on CurrentFooter { - social_media { - title - facebook { - href - title - } - instagram { - href - title - } - twitter { - href - title - } - } -} diff --git a/packages/trpc/lib/graphql/Fragments/CurrentFooter/SocialMedia.graphql.ts b/packages/trpc/lib/graphql/Fragments/CurrentFooter/SocialMedia.graphql.ts new file mode 100644 index 000000000..c1013ea06 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/CurrentFooter/SocialMedia.graphql.ts @@ -0,0 +1,21 @@ +import { gql } from "graphql-tag" + +export const CurrentFooterSocialMedia = gql` + fragment CurrentFooterSocialMedia on CurrentFooter { + social_media { + title + facebook { + href + title + } + instagram { + href + title + } + twitter { + href + title + } + } + } +` diff --git a/packages/trpc/lib/graphql/Fragments/CurrentFooter/TripAdvisor.graphql b/packages/trpc/lib/graphql/Fragments/CurrentFooter/TripAdvisor.graphql deleted file mode 100644 index bee84de7e..000000000 --- a/packages/trpc/lib/graphql/Fragments/CurrentFooter/TripAdvisor.graphql +++ /dev/null @@ -1,14 +0,0 @@ -#import "../SysAsset.graphql" - -fragment TripAdvisor on CurrentFooter { - trip_advisor { - logoConnection { - edges { - node { - ...SysAsset - } - } - } - title - } -} diff --git a/packages/trpc/lib/graphql/Fragments/CurrentFooter/TripAdvisor.graphql.ts b/packages/trpc/lib/graphql/Fragments/CurrentFooter/TripAdvisor.graphql.ts new file mode 100644 index 000000000..e6d129033 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/CurrentFooter/TripAdvisor.graphql.ts @@ -0,0 +1,19 @@ +import { gql } from "graphql-tag" + +import { SysAsset } from "../SysAsset.graphql" + +export const TripAdvisor = gql` + fragment TripAdvisor on CurrentFooter { + trip_advisor { + logoConnection { + edges { + node { + ...SysAsset + } + } + } + title + } + } + ${SysAsset} +` diff --git a/packages/trpc/lib/graphql/Fragments/DestinationCityPage/Ref.graphql b/packages/trpc/lib/graphql/Fragments/DestinationCityPage/Ref.graphql deleted file mode 100644 index 44330d446..000000000 --- a/packages/trpc/lib/graphql/Fragments/DestinationCityPage/Ref.graphql +++ /dev/null @@ -1,7 +0,0 @@ -#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 new file mode 100644 index 000000000..e8cd0d504 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/DestinationCityPage/Ref.graphql.ts @@ -0,0 +1,12 @@ +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 deleted file mode 100644 index 05804f48c..000000000 --- a/packages/trpc/lib/graphql/Fragments/DestinationCountryPage/Ref.graphql +++ /dev/null @@ -1,7 +0,0 @@ -#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 new file mode 100644 index 000000000..0a76a7337 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/DestinationCountryPage/Ref.graphql.ts @@ -0,0 +1,12 @@ +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 deleted file mode 100644 index 603f211cc..000000000 --- a/packages/trpc/lib/graphql/Fragments/DestinationFilter.graphql +++ /dev/null @@ -1,38 +0,0 @@ -#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 new file mode 100644 index 000000000..ca1293111 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/DestinationFilter.graphql.ts @@ -0,0 +1,53 @@ +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 deleted file mode 100644 index 0b93b06fb..000000000 --- a/packages/trpc/lib/graphql/Fragments/DestinationOverviewPage/Ref.graphql +++ /dev/null @@ -1,7 +0,0 @@ -#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 new file mode 100644 index 000000000..a49b1a964 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/DestinationOverviewPage/Ref.graphql.ts @@ -0,0 +1,12 @@ +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 b/packages/trpc/lib/graphql/Fragments/Footer/AppDownloads.graphql deleted file mode 100644 index f9e2f7d40..000000000 --- a/packages/trpc/lib/graphql/Fragments/Footer/AppDownloads.graphql +++ /dev/null @@ -1,12 +0,0 @@ -fragment AppDownloads on Footer { - app_downloads { - title - links { - type - href { - href - title - } - } - } -} diff --git a/packages/trpc/lib/graphql/Fragments/Footer/AppDownloads.graphql.ts b/packages/trpc/lib/graphql/Fragments/Footer/AppDownloads.graphql.ts new file mode 100644 index 000000000..ad82ce5c4 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Footer/AppDownloads.graphql.ts @@ -0,0 +1,16 @@ +import { gql } from "graphql-tag" + +export const AppDownloads = gql` + fragment AppDownloads on Footer { + app_downloads { + title + links { + type + href { + href + title + } + } + } + } +` diff --git a/packages/trpc/lib/graphql/Fragments/Footer/Refs/TertiaryLinks.graphql b/packages/trpc/lib/graphql/Fragments/Footer/Refs/TertiaryLinks.graphql deleted file mode 100644 index d1fd47864..000000000 --- a/packages/trpc/lib/graphql/Fragments/Footer/Refs/TertiaryLinks.graphql +++ /dev/null @@ -1,22 +0,0 @@ -#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 new file mode 100644 index 000000000..3e118fdaf --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Footer/Refs/TertiaryLinks.graphql.ts @@ -0,0 +1,29 @@ +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 b/packages/trpc/lib/graphql/Fragments/Footer/SocialMedia.graphql deleted file mode 100644 index 02947ae5d..000000000 --- a/packages/trpc/lib/graphql/Fragments/Footer/SocialMedia.graphql +++ /dev/null @@ -1,11 +0,0 @@ -fragment SocialMedia on Footer { - social_media { - links { - href { - href - title - } - type - } - } -} diff --git a/packages/trpc/lib/graphql/Fragments/Footer/SocialMedia.graphql.ts b/packages/trpc/lib/graphql/Fragments/Footer/SocialMedia.graphql.ts new file mode 100644 index 000000000..c488454cf --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Footer/SocialMedia.graphql.ts @@ -0,0 +1,15 @@ +import { gql } from "graphql-tag" + +export const SocialMedia = gql` + fragment SocialMedia on Footer { + social_media { + links { + href { + href + title + } + type + } + } + } +` diff --git a/packages/trpc/lib/graphql/Fragments/Grid.graphql b/packages/trpc/lib/graphql/Fragments/Grid.graphql deleted file mode 100644 index 7cde03700..000000000 --- a/packages/trpc/lib/graphql/Fragments/Grid.graphql +++ /dev/null @@ -1,17 +0,0 @@ -fragment Grid on Grid { - columns { - span - rows { - rowConnection { - edges { - node { - __typename - ... on Card { - title - } - } - } - } - } - } -} diff --git a/packages/trpc/lib/graphql/Fragments/Grid.graphql.ts b/packages/trpc/lib/graphql/Fragments/Grid.graphql.ts new file mode 100644 index 000000000..db75a97b7 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Grid.graphql.ts @@ -0,0 +1,21 @@ +import { gql } from "graphql-tag" + +export const Grid = gql` + fragment Grid on Grid { + columns { + span + rows { + rowConnection { + edges { + node { + __typename + ... on Card { + title + } + } + } + } + } + } + } +` diff --git a/packages/trpc/lib/graphql/Fragments/Hero.graphql b/packages/trpc/lib/graphql/Fragments/Hero.graphql deleted file mode 100644 index 5424b6ce2..000000000 --- a/packages/trpc/lib/graphql/Fragments/Hero.graphql +++ /dev/null @@ -1,12 +0,0 @@ -#import "./SysAsset.graphql" - -fragment Hero on Hero { - imagesConnection { - totalCount - edges { - node { - ...SysAsset - } - } - } -} diff --git a/packages/trpc/lib/graphql/Fragments/Hero.graphql.ts b/packages/trpc/lib/graphql/Fragments/Hero.graphql.ts new file mode 100644 index 000000000..f8af34678 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Hero.graphql.ts @@ -0,0 +1,17 @@ +import { gql } from "graphql-tag" + +import { SysAsset } from "./SysAsset.graphql" + +export const Hero = gql` + fragment Hero on Hero { + imagesConnection { + totalCount + edges { + node { + ...SysAsset + } + } + } + } + ${SysAsset} +` diff --git a/packages/trpc/lib/graphql/Fragments/HotelFilter.graphql b/packages/trpc/lib/graphql/Fragments/HotelFilter.graphql deleted file mode 100644 index 5054159a1..000000000 --- a/packages/trpc/lib/graphql/Fragments/HotelFilter.graphql +++ /dev/null @@ -1,14 +0,0 @@ -#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 new file mode 100644 index 000000000..2af30abca --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/HotelFilter.graphql.ts @@ -0,0 +1,22 @@ +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 deleted file mode 100644 index d0dbdf6b3..000000000 --- a/packages/trpc/lib/graphql/Fragments/HotelPage/Ref.graphql +++ /dev/null @@ -1,7 +0,0 @@ -#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 new file mode 100644 index 000000000..b19b54990 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/HotelPage/Ref.graphql.ts @@ -0,0 +1,12 @@ +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 b/packages/trpc/lib/graphql/Fragments/ImageContainer.graphql deleted file mode 100644 index 1b04a993f..000000000 --- a/packages/trpc/lib/graphql/Fragments/ImageContainer.graphql +++ /dev/null @@ -1,16 +0,0 @@ -#import "./System.graphql" - -fragment ImageContainer on ImageContainer { - image_left - image_right - title - system { - ...System - } -} - -fragment ImageContainerRef on ImageContainer { - system { - ...System - } -} diff --git a/packages/trpc/lib/graphql/Fragments/ImageContainer.graphql.ts b/packages/trpc/lib/graphql/Fragments/ImageContainer.graphql.ts new file mode 100644 index 000000000..44955d51d --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/ImageContainer.graphql.ts @@ -0,0 +1,24 @@ +import { gql } from "graphql-tag" + +import { System } from "./System.graphql" + +export const ImageContainer = gql` + fragment ImageContainer on ImageContainer { + image_left + image_right + title + system { + ...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 deleted file mode 100644 index 70cba0639..000000000 --- a/packages/trpc/lib/graphql/Fragments/LoyaltyPage/Ref.graphql +++ /dev/null @@ -1,7 +0,0 @@ -#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 new file mode 100644 index 000000000..fcd5a4d17 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/LoyaltyPage/Ref.graphql.ts @@ -0,0 +1,12 @@ +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 b/packages/trpc/lib/graphql/Fragments/Metadata.graphql deleted file mode 100644 index b649e213a..000000000 --- a/packages/trpc/lib/graphql/Fragments/Metadata.graphql +++ /dev/null @@ -1,6 +0,0 @@ -fragment Metadata on SeoMetadata { - noindex - description - title - seo_image -} diff --git a/packages/trpc/lib/graphql/Fragments/Metadata.graphql.ts b/packages/trpc/lib/graphql/Fragments/Metadata.graphql.ts new file mode 100644 index 000000000..b82be21a3 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Metadata.graphql.ts @@ -0,0 +1,10 @@ +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 deleted file mode 100644 index ba7f64e49..000000000 --- a/packages/trpc/lib/graphql/Fragments/PageLink/AccountPageLink.graphql +++ /dev/null @@ -1,9 +0,0 @@ -#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 new file mode 100644 index 000000000..b3b430892 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/PageLink/AccountPageLink.graphql.ts @@ -0,0 +1,14 @@ +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 deleted file mode 100644 index 8ec9faa4a..000000000 --- a/packages/trpc/lib/graphql/Fragments/PageLink/CampaignOverviewPageLink.graphql +++ /dev/null @@ -1,9 +0,0 @@ -#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 new file mode 100644 index 000000000..b5de6d30c --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/PageLink/CampaignOverviewPageLink.graphql.ts @@ -0,0 +1,14 @@ +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 deleted file mode 100644 index 0555d08b9..000000000 --- a/packages/trpc/lib/graphql/Fragments/PageLink/CampaignPageLink.graphql +++ /dev/null @@ -1,9 +0,0 @@ -#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 new file mode 100644 index 000000000..1e7467fd5 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/PageLink/CampaignPageLink.graphql.ts @@ -0,0 +1,14 @@ +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 deleted file mode 100644 index 9ebbb4f11..000000000 --- a/packages/trpc/lib/graphql/Fragments/PageLink/CollectionPageLink.graphql +++ /dev/null @@ -1,12 +0,0 @@ -#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 new file mode 100644 index 000000000..a57fdfb7d --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/PageLink/CollectionPageLink.graphql.ts @@ -0,0 +1,17 @@ +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 deleted file mode 100644 index 2965d3b22..000000000 --- a/packages/trpc/lib/graphql/Fragments/PageLink/ContentPageLink.graphql +++ /dev/null @@ -1,12 +0,0 @@ -#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 new file mode 100644 index 000000000..ab2d551a0 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/PageLink/ContentPageLink.graphql.ts @@ -0,0 +1,17 @@ +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 deleted file mode 100644 index 4b8a7eab2..000000000 --- a/packages/trpc/lib/graphql/Fragments/PageLink/CurrentBlocksPageLink.graphql +++ /dev/null @@ -1,9 +0,0 @@ -#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 new file mode 100644 index 000000000..9edeec416 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/PageLink/CurrentBlocksPageLink.graphql.ts @@ -0,0 +1,14 @@ +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 deleted file mode 100644 index 4b8a7eab2..000000000 --- a/packages/trpc/lib/graphql/Fragments/PageLink/CurrentContentPageLink.graphql +++ /dev/null @@ -1,9 +0,0 @@ -#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 new file mode 100644 index 000000000..9edeec416 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/PageLink/CurrentContentPageLink.graphql.ts @@ -0,0 +1,14 @@ +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 deleted file mode 100644 index 092328afa..000000000 --- a/packages/trpc/lib/graphql/Fragments/PageLink/DestinationCityPageLink.graphql +++ /dev/null @@ -1,9 +0,0 @@ -#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 new file mode 100644 index 000000000..c8d212fc1 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/PageLink/DestinationCityPageLink.graphql.ts @@ -0,0 +1,14 @@ +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 deleted file mode 100644 index ef36d64bb..000000000 --- a/packages/trpc/lib/graphql/Fragments/PageLink/DestinationCountryPageLink.graphql +++ /dev/null @@ -1,9 +0,0 @@ -#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 new file mode 100644 index 000000000..94d7980dd --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/PageLink/DestinationCountryPageLink.graphql.ts @@ -0,0 +1,14 @@ +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 deleted file mode 100644 index d0a3bba20..000000000 --- a/packages/trpc/lib/graphql/Fragments/PageLink/DestinationOverviewPageLink.graphql +++ /dev/null @@ -1,9 +0,0 @@ -#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 new file mode 100644 index 000000000..2209a025f --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/PageLink/DestinationOverviewPageLink.graphql.ts @@ -0,0 +1,14 @@ +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 deleted file mode 100644 index 23b7d2fd9..000000000 --- a/packages/trpc/lib/graphql/Fragments/PageLink/HotelPageLink.graphql +++ /dev/null @@ -1,9 +0,0 @@ -#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 new file mode 100644 index 000000000..e2cf9d05f --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/PageLink/HotelPageLink.graphql.ts @@ -0,0 +1,14 @@ +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 deleted file mode 100644 index fa4d7ee90..000000000 --- a/packages/trpc/lib/graphql/Fragments/PageLink/LoyaltyPageLink.graphql +++ /dev/null @@ -1,12 +0,0 @@ -#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 new file mode 100644 index 000000000..216c5c50c --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/PageLink/LoyaltyPageLink.graphql.ts @@ -0,0 +1,17 @@ +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 deleted file mode 100644 index 155471960..000000000 --- a/packages/trpc/lib/graphql/Fragments/PageLink/PromoCampaignPageLink.graphql +++ /dev/null @@ -1,9 +0,0 @@ -#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 new file mode 100644 index 000000000..7294bf45d --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/PageLink/PromoCampaignPageLink.graphql.ts @@ -0,0 +1,14 @@ +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 deleted file mode 100644 index bf1c29f0d..000000000 --- a/packages/trpc/lib/graphql/Fragments/PageLink/StartPageLink.graphql +++ /dev/null @@ -1,9 +0,0 @@ -#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 new file mode 100644 index 000000000..5ed0c650f --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/PageLink/StartPageLink.graphql.ts @@ -0,0 +1,14 @@ +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 b/packages/trpc/lib/graphql/Fragments/PageSettings.graphql deleted file mode 100644 index 9f8c06df8..000000000 --- a/packages/trpc/lib/graphql/Fragments/PageSettings.graphql +++ /dev/null @@ -1,4 +0,0 @@ -fragment PageSettings on PageSettings { - hide_booking_widget - booking_code -} diff --git a/packages/trpc/lib/graphql/Fragments/PageSettings.graphql.ts b/packages/trpc/lib/graphql/Fragments/PageSettings.graphql.ts new file mode 100644 index 000000000..2dfc6d301 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/PageSettings.graphql.ts @@ -0,0 +1,8 @@ +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 b/packages/trpc/lib/graphql/Fragments/Preamble.graphql deleted file mode 100644 index 215919ff5..000000000 --- a/packages/trpc/lib/graphql/Fragments/Preamble.graphql +++ /dev/null @@ -1,17 +0,0 @@ -#import "./SysAsset.graphql" - -fragment Preamble on CurrentBlocksPage { - preamble { - text { - json - embedded_itemsConnection(limit: 30) { - edges { - node { - __typename - ...SysAsset - } - } - } - } - } -} diff --git a/packages/trpc/lib/graphql/Fragments/Preamble.graphql.ts b/packages/trpc/lib/graphql/Fragments/Preamble.graphql.ts new file mode 100644 index 000000000..f4ee592e2 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Preamble.graphql.ts @@ -0,0 +1,22 @@ +import { gql } from "graphql-tag" + +import { SysAsset } from "./SysAsset.graphql" + +export const Preamble = gql` + fragment Preamble on CurrentBlocksPage { + preamble { + text { + json + embedded_itemsConnection(limit: 30) { + edges { + node { + __typename + ...SysAsset + } + } + } + } + } + } + ${SysAsset} +` diff --git a/packages/trpc/lib/graphql/Fragments/PromoCampaignPage/Ref.graphql b/packages/trpc/lib/graphql/Fragments/PromoCampaignPage/Ref.graphql deleted file mode 100644 index dfda0e620..000000000 --- a/packages/trpc/lib/graphql/Fragments/PromoCampaignPage/Ref.graphql +++ /dev/null @@ -1,7 +0,0 @@ -#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 new file mode 100644 index 000000000..14015d8e7 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/PromoCampaignPage/Ref.graphql.ts @@ -0,0 +1,12 @@ +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 b/packages/trpc/lib/graphql/Fragments/Puff.graphql deleted file mode 100644 index 05276c051..000000000 --- a/packages/trpc/lib/graphql/Fragments/Puff.graphql +++ /dev/null @@ -1,20 +0,0 @@ -#import "./SysAsset.graphql" - -fragment Puff on Puff { - imageConnection { - edges { - node { - ...SysAsset - } - } - } - puff_style - link { - href - title - } - text { - json - } - title -} diff --git a/packages/trpc/lib/graphql/Fragments/Puff.graphql.ts b/packages/trpc/lib/graphql/Fragments/Puff.graphql.ts new file mode 100644 index 000000000..5c9d80f93 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Puff.graphql.ts @@ -0,0 +1,25 @@ +import { gql } from "graphql-tag" + +import { SysAsset } from "./SysAsset.graphql" + +export const Puff = gql` + fragment Puff on Puff { + imageConnection { + edges { + node { + ...SysAsset + } + } + } + puff_style + link { + href + title + } + text { + json + } + title + } + ${SysAsset} +` diff --git a/packages/trpc/lib/graphql/Fragments/Sidebar/Content.graphql b/packages/trpc/lib/graphql/Fragments/Sidebar/Content.graphql deleted file mode 100644 index 7615c183a..000000000 --- a/packages/trpc/lib/graphql/Fragments/Sidebar/Content.graphql +++ /dev/null @@ -1,140 +0,0 @@ -#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 new file mode 100644 index 000000000..e4fc52010 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Sidebar/Content.graphql.ts @@ -0,0 +1,202 @@ +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 b/packages/trpc/lib/graphql/Fragments/Sidebar/DynamicContent.graphql deleted file mode 100644 index 9d9da6e58..000000000 --- a/packages/trpc/lib/graphql/Fragments/Sidebar/DynamicContent.graphql +++ /dev/null @@ -1,11 +0,0 @@ -fragment DynamicContentSidebar_ContentPage on ContentPageSidebarDynamicContent { - dynamic_content { - component - } -} - -fragment DynamicContentSidebar_LoyaltyPage on LoyaltyPageSidebarDynamicContent { - dynamic_content { - component - } -} diff --git a/packages/trpc/lib/graphql/Fragments/Sidebar/DynamicContent.graphql.ts b/packages/trpc/lib/graphql/Fragments/Sidebar/DynamicContent.graphql.ts new file mode 100644 index 000000000..547a4b9aa --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Sidebar/DynamicContent.graphql.ts @@ -0,0 +1,17 @@ +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 deleted file mode 100644 index a765b6faf..000000000 --- a/packages/trpc/lib/graphql/Fragments/Sidebar/JoinLoyaltyContact.graphql +++ /dev/null @@ -1,167 +0,0 @@ -#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 new file mode 100644 index 000000000..ea33ef7d6 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Sidebar/JoinLoyaltyContact.graphql.ts @@ -0,0 +1,228 @@ +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 deleted file mode 100644 index c471b0151..000000000 --- a/packages/trpc/lib/graphql/Fragments/Sidebar/QuickLinks.graphql +++ /dev/null @@ -1,23 +0,0 @@ -#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 new file mode 100644 index 000000000..7e377718f --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Sidebar/QuickLinks.graphql.ts @@ -0,0 +1,23 @@ +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 deleted file mode 100644 index 8da37a196..000000000 --- a/packages/trpc/lib/graphql/Fragments/Sidebar/ScriptedCard.graphql +++ /dev/null @@ -1,38 +0,0 @@ -#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 new file mode 100644 index 000000000..318b86f8e --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Sidebar/ScriptedCard.graphql.ts @@ -0,0 +1,38 @@ +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 deleted file mode 100644 index 446c7e6d7..000000000 --- a/packages/trpc/lib/graphql/Fragments/Sidebar/TeaserCard.graphql +++ /dev/null @@ -1,38 +0,0 @@ -#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 new file mode 100644 index 000000000..aa7840b80 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/Sidebar/TeaserCard.graphql.ts @@ -0,0 +1,38 @@ +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 deleted file mode 100644 index 29c980264..000000000 --- a/packages/trpc/lib/graphql/Fragments/StartPage/Ref.graphql +++ /dev/null @@ -1,7 +0,0 @@ -#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 new file mode 100644 index 000000000..91810c68e --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/StartPage/Ref.graphql.ts @@ -0,0 +1,12 @@ +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 b/packages/trpc/lib/graphql/Fragments/SysAsset.graphql deleted file mode 100644 index 499e05778..000000000 --- a/packages/trpc/lib/graphql/Fragments/SysAsset.graphql +++ /dev/null @@ -1,14 +0,0 @@ -fragment SysAsset on SysAsset { - content_type - description - dimension { - height - width - } - metadata - system { - uid - } - title - url -} diff --git a/packages/trpc/lib/graphql/Fragments/SysAsset.graphql.ts b/packages/trpc/lib/graphql/Fragments/SysAsset.graphql.ts new file mode 100644 index 000000000..c059602c5 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/SysAsset.graphql.ts @@ -0,0 +1,18 @@ +import { gql } from "graphql-tag" + +export const SysAsset = gql` + fragment SysAsset on SysAsset { + content_type + description + dimension { + height + width + } + metadata + system { + uid + } + title + url + } +` diff --git a/packages/trpc/lib/graphql/Fragments/System.graphql b/packages/trpc/lib/graphql/Fragments/System.graphql deleted file mode 100644 index 2706540ce..000000000 --- a/packages/trpc/lib/graphql/Fragments/System.graphql +++ /dev/null @@ -1,5 +0,0 @@ -fragment System on EntrySystemField { - content_type_uid - locale - uid -} diff --git a/packages/trpc/lib/graphql/Fragments/System.graphql.ts b/packages/trpc/lib/graphql/Fragments/System.graphql.ts new file mode 100644 index 000000000..3b2861b60 --- /dev/null +++ b/packages/trpc/lib/graphql/Fragments/System.graphql.ts @@ -0,0 +1,9 @@ +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/Query/AccountPage/AccountPage.graphql b/packages/trpc/lib/graphql/Query/AccountPage/AccountPage.graphql deleted file mode 100644 index 489848c1a..000000000 --- a/packages/trpc/lib/graphql/Query/AccountPage/AccountPage.graphql +++ /dev/null @@ -1,70 +0,0 @@ -#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 new file mode 100644 index 000000000..e4a5ac122 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/AccountPage/AccountPage.graphql.ts @@ -0,0 +1,97 @@ +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 b/packages/trpc/lib/graphql/Query/AccountPage/Metadata.graphql deleted file mode 100644 index 94073ac91..000000000 --- a/packages/trpc/lib/graphql/Query/AccountPage/Metadata.graphql +++ /dev/null @@ -1,18 +0,0 @@ -#import "../../Fragments/Metadata.graphql" -#import "../../Fragments/System.graphql" - -query GetAccountPageMetadata($locale: String!, $uid: String!) { - account_page(locale: $locale, uid: $uid) { - web { - breadcrumbs { - title - } - seo_metadata { - ...Metadata - } - } - system { - ...System - } - } -} diff --git a/packages/trpc/lib/graphql/Query/AccountPage/Metadata.graphql.ts b/packages/trpc/lib/graphql/Query/AccountPage/Metadata.graphql.ts new file mode 100644 index 000000000..9c3ba9b4d --- /dev/null +++ b/packages/trpc/lib/graphql/Query/AccountPage/Metadata.graphql.ts @@ -0,0 +1,24 @@ +import { gql } from "graphql-tag" + +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 { + breadcrumbs { + title + } + seo_metadata { + ...Metadata + } + } + system { + ...System + } + } + } + ${Metadata} + ${System} +` diff --git a/packages/trpc/lib/graphql/Query/AccountPage/Navigation.graphql b/packages/trpc/lib/graphql/Query/AccountPage/Navigation.graphql deleted file mode 100644 index 6a175117d..000000000 --- a/packages/trpc/lib/graphql/Query/AccountPage/Navigation.graphql +++ /dev/null @@ -1,93 +0,0 @@ -#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 new file mode 100644 index 000000000..4a1d5edd5 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/AccountPage/Navigation.graphql.ts @@ -0,0 +1,123 @@ +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 deleted file mode 100644 index 1c316e60b..000000000 --- a/packages/trpc/lib/graphql/Query/Breadcrumbs/AccountPage.graphql +++ /dev/null @@ -1,29 +0,0 @@ -#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 new file mode 100644 index 000000000..680fbd1fc --- /dev/null +++ b/packages/trpc/lib/graphql/Query/Breadcrumbs/AccountPage.graphql.ts @@ -0,0 +1,42 @@ +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 deleted file mode 100644 index 144cb64b1..000000000 --- a/packages/trpc/lib/graphql/Query/Breadcrumbs/CampaignOverviewPage.graphql +++ /dev/null @@ -1,29 +0,0 @@ -#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 new file mode 100644 index 000000000..619c5bf0b --- /dev/null +++ b/packages/trpc/lib/graphql/Query/Breadcrumbs/CampaignOverviewPage.graphql.ts @@ -0,0 +1,45 @@ +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 deleted file mode 100644 index 1e0944f72..000000000 --- a/packages/trpc/lib/graphql/Query/Breadcrumbs/CampaignPage.graphql +++ /dev/null @@ -1,29 +0,0 @@ -#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 new file mode 100644 index 000000000..fea9fa560 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/Breadcrumbs/CampaignPage.graphql.ts @@ -0,0 +1,42 @@ +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 deleted file mode 100644 index 5b5ce91a6..000000000 --- a/packages/trpc/lib/graphql/Query/Breadcrumbs/CollectionPage.graphql +++ /dev/null @@ -1,29 +0,0 @@ -#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 new file mode 100644 index 000000000..4da03602d --- /dev/null +++ b/packages/trpc/lib/graphql/Query/Breadcrumbs/CollectionPage.graphql.ts @@ -0,0 +1,42 @@ +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 deleted file mode 100644 index 6ecdb68d1..000000000 --- a/packages/trpc/lib/graphql/Query/Breadcrumbs/ContentPage.graphql +++ /dev/null @@ -1,29 +0,0 @@ -#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 new file mode 100644 index 000000000..94d11e032 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/Breadcrumbs/ContentPage.graphql.ts @@ -0,0 +1,42 @@ +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 deleted file mode 100644 index 626f18542..000000000 --- a/packages/trpc/lib/graphql/Query/Breadcrumbs/DestinationCityPage.graphql +++ /dev/null @@ -1,29 +0,0 @@ -#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 new file mode 100644 index 000000000..4afe57426 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/Breadcrumbs/DestinationCityPage.graphql.ts @@ -0,0 +1,42 @@ +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 deleted file mode 100644 index 879a3255e..000000000 --- a/packages/trpc/lib/graphql/Query/Breadcrumbs/DestinationCountryPage.graphql +++ /dev/null @@ -1,32 +0,0 @@ -#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 new file mode 100644 index 000000000..8594d75f6 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/Breadcrumbs/DestinationCountryPage.graphql.ts @@ -0,0 +1,45 @@ +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 deleted file mode 100644 index cc024ec4f..000000000 --- a/packages/trpc/lib/graphql/Query/Breadcrumbs/DestinationOverviewPage.graphql +++ /dev/null @@ -1,32 +0,0 @@ -#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 new file mode 100644 index 000000000..ca0c4fcaf --- /dev/null +++ b/packages/trpc/lib/graphql/Query/Breadcrumbs/DestinationOverviewPage.graphql.ts @@ -0,0 +1,45 @@ +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 deleted file mode 100644 index 6d57b84c5..000000000 --- a/packages/trpc/lib/graphql/Query/Breadcrumbs/HotelPage.graphql +++ /dev/null @@ -1,29 +0,0 @@ -#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 new file mode 100644 index 000000000..ae2ff3e53 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/Breadcrumbs/HotelPage.graphql.ts @@ -0,0 +1,42 @@ +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 deleted file mode 100644 index 6369e1c5f..000000000 --- a/packages/trpc/lib/graphql/Query/Breadcrumbs/LoyaltyPage.graphql +++ /dev/null @@ -1,29 +0,0 @@ -#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 new file mode 100644 index 000000000..6656bf118 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/Breadcrumbs/LoyaltyPage.graphql.ts @@ -0,0 +1,42 @@ +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 deleted file mode 100644 index a0ccdc597..000000000 --- a/packages/trpc/lib/graphql/Query/Breadcrumbs/PromoCampaignPage.graphql +++ /dev/null @@ -1,29 +0,0 @@ -#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 new file mode 100644 index 000000000..2abc78531 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/Breadcrumbs/PromoCampaignPage.graphql.ts @@ -0,0 +1,42 @@ +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 deleted file mode 100644 index 37fecbdfc..000000000 --- a/packages/trpc/lib/graphql/Query/CampaignOverviewPage/CampaignOverviewPage.graphql +++ /dev/null @@ -1,92 +0,0 @@ -#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 new file mode 100644 index 000000000..820493142 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/CampaignOverviewPage/CampaignOverviewPage.graphql.ts @@ -0,0 +1,123 @@ +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 b/packages/trpc/lib/graphql/Query/CampaignOverviewPage/Metadata.graphql deleted file mode 100644 index e0ce37000..000000000 --- a/packages/trpc/lib/graphql/Query/CampaignOverviewPage/Metadata.graphql +++ /dev/null @@ -1,22 +0,0 @@ -#import "../../Fragments/Metadata.graphql" -#import "../../Fragments/System.graphql" - -query GetCampaignOverviewPageMetadata($locale: String!, $uid: String!) { - campaign_overview_page(locale: $locale, uid: $uid) { - web { - breadcrumbs { - title - } - seo_metadata { - ...Metadata - } - } - header { - heading - preamble - } - system { - ...System - } - } -} diff --git a/packages/trpc/lib/graphql/Query/CampaignOverviewPage/Metadata.graphql.ts b/packages/trpc/lib/graphql/Query/CampaignOverviewPage/Metadata.graphql.ts new file mode 100644 index 000000000..b0a2db130 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/CampaignOverviewPage/Metadata.graphql.ts @@ -0,0 +1,28 @@ +import { gql } from "graphql-tag" + +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 { + breadcrumbs { + title + } + seo_metadata { + ...Metadata + } + } + header { + heading + preamble + } + system { + ...System + } + } + } + ${Metadata} + ${System} +` diff --git a/packages/trpc/lib/graphql/Query/CampaignPage/CampaignPage.graphql b/packages/trpc/lib/graphql/Query/CampaignPage/CampaignPage.graphql deleted file mode 100644 index c4a6a8e87..000000000 --- a/packages/trpc/lib/graphql/Query/CampaignPage/CampaignPage.graphql +++ /dev/null @@ -1,82 +0,0 @@ -#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 new file mode 100644 index 000000000..38c1ce4ed --- /dev/null +++ b/packages/trpc/lib/graphql/Query/CampaignPage/CampaignPage.graphql.ts @@ -0,0 +1,110 @@ +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 deleted file mode 100644 index 1cebbd641..000000000 --- a/packages/trpc/lib/graphql/Query/CampaignPage/CampaignPagesByHotelUid.graphql +++ /dev/null @@ -1,64 +0,0 @@ -#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 new file mode 100644 index 000000000..ebe6222ee --- /dev/null +++ b/packages/trpc/lib/graphql/Query/CampaignPage/CampaignPagesByHotelUid.graphql.ts @@ -0,0 +1,81 @@ +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 b/packages/trpc/lib/graphql/Query/CampaignPage/Metadata.graphql deleted file mode 100644 index c7b3a51d5..000000000 --- a/packages/trpc/lib/graphql/Query/CampaignPage/Metadata.graphql +++ /dev/null @@ -1,22 +0,0 @@ -#import "../../Fragments/Metadata.graphql" -#import "../../Fragments/System.graphql" - -query GetCampaignPageMetadata($locale: String!, $uid: String!) { - campaign_page(locale: $locale, uid: $uid) { - web { - breadcrumbs { - title - } - seo_metadata { - ...Metadata - } - } - heading - preamble { - first_column - } - system { - ...System - } - } -} diff --git a/packages/trpc/lib/graphql/Query/CampaignPage/Metadata.graphql.ts b/packages/trpc/lib/graphql/Query/CampaignPage/Metadata.graphql.ts new file mode 100644 index 000000000..0b255dbda --- /dev/null +++ b/packages/trpc/lib/graphql/Query/CampaignPage/Metadata.graphql.ts @@ -0,0 +1,28 @@ +import { gql } from "graphql-tag" + +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 { + breadcrumbs { + title + } + seo_metadata { + ...Metadata + } + } + heading + preamble { + first_column + } + system { + ...System + } + } + } + ${Metadata} + ${System} +` diff --git a/packages/trpc/lib/graphql/Query/CollectionPage/CollectionPage.graphql b/packages/trpc/lib/graphql/Query/CollectionPage/CollectionPage.graphql deleted file mode 100644 index 3e620ced7..000000000 --- a/packages/trpc/lib/graphql/Query/CollectionPage/CollectionPage.graphql +++ /dev/null @@ -1,84 +0,0 @@ -#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 new file mode 100644 index 000000000..4dbf45b23 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/CollectionPage/CollectionPage.graphql.ts @@ -0,0 +1,123 @@ +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 b/packages/trpc/lib/graphql/Query/CollectionPage/Metadata.graphql deleted file mode 100644 index e404ee230..000000000 --- a/packages/trpc/lib/graphql/Query/CollectionPage/Metadata.graphql +++ /dev/null @@ -1,23 +0,0 @@ -#import "../../Fragments/Metadata.graphql" -#import "../../Fragments/System.graphql" - -query GetCollectionPageMetadata($locale: String!, $uid: String!) { - collection_page(locale: $locale, uid: $uid) { - web { - breadcrumbs { - title - } - seo_metadata { - ...Metadata - } - } - header { - heading - preamble - } - hero_image - system { - ...System - } - } -} diff --git a/packages/trpc/lib/graphql/Query/CollectionPage/Metadata.graphql.ts b/packages/trpc/lib/graphql/Query/CollectionPage/Metadata.graphql.ts new file mode 100644 index 000000000..02a898da2 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/CollectionPage/Metadata.graphql.ts @@ -0,0 +1,29 @@ +import { gql } from "graphql-tag" + +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 { + breadcrumbs { + title + } + seo_metadata { + ...Metadata + } + } + header { + heading + preamble + } + hero_image + system { + ...System + } + } + } + ${Metadata} + ${System} +` diff --git a/packages/trpc/lib/graphql/Query/ContactConfig.graphql b/packages/trpc/lib/graphql/Query/ContactConfig.graphql deleted file mode 100644 index 0a17e9568..000000000 --- a/packages/trpc/lib/graphql/Query/ContactConfig.graphql +++ /dev/null @@ -1,39 +0,0 @@ -query GetContactConfig($locale: String!) { - all_contact_config(locale: $locale) { - items { - email { - address - name - } - email_loyalty { - address - name - } - mailing_address { - name - street - zip - country - city - } - phone { - number - name - footnote - } - phone_loyalty { - name - number - footnote - } - title - visiting_address { - country - city - street - zip - } - } - total - } -} diff --git a/packages/trpc/lib/graphql/Query/ContactConfig.graphql.ts b/packages/trpc/lib/graphql/Query/ContactConfig.graphql.ts new file mode 100644 index 000000000..bb9404a5c --- /dev/null +++ b/packages/trpc/lib/graphql/Query/ContactConfig.graphql.ts @@ -0,0 +1,43 @@ +import { gql } from "graphql-tag" + +export const GetContactConfig = gql` + query GetContactConfig($locale: String!) { + all_contact_config(locale: $locale) { + items { + email { + address + name + } + email_loyalty { + address + name + } + mailing_address { + name + street + zip + country + city + } + phone { + number + name + footnote + } + phone_loyalty { + name + number + footnote + } + title + visiting_address { + country + city + street + zip + } + } + total + } + } +` diff --git a/packages/trpc/lib/graphql/Query/ContentPage/ContentPage.graphql b/packages/trpc/lib/graphql/Query/ContentPage/ContentPage.graphql deleted file mode 100644 index 3efa50899..000000000 --- a/packages/trpc/lib/graphql/Query/ContentPage/ContentPage.graphql +++ /dev/null @@ -1,147 +0,0 @@ -#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 new file mode 100644 index 000000000..c3cfcf155 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/ContentPage/ContentPage.graphql.ts @@ -0,0 +1,236 @@ +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 b/packages/trpc/lib/graphql/Query/ContentPage/Metadata.graphql deleted file mode 100644 index c156c8cad..000000000 --- a/packages/trpc/lib/graphql/Query/ContentPage/Metadata.graphql +++ /dev/null @@ -1,32 +0,0 @@ -#import "../../Fragments/Metadata.graphql" -#import "../../Fragments/System.graphql" - -query GetContentPageMetadata($locale: String!, $uid: String!) { - content_page(locale: $locale, uid: $uid) { - web { - breadcrumbs { - title - } - seo_metadata { - ...Metadata - } - } - header { - heading - preamble - } - hero_image - blocks { - ... on ContentPageBlocksContent { - content { - content { - json - } - } - } - } - system { - ...System - } - } -} diff --git a/packages/trpc/lib/graphql/Query/ContentPage/Metadata.graphql.ts b/packages/trpc/lib/graphql/Query/ContentPage/Metadata.graphql.ts new file mode 100644 index 000000000..9ecd1ef61 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/ContentPage/Metadata.graphql.ts @@ -0,0 +1,38 @@ +import { gql } from "graphql-tag" + +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 { + breadcrumbs { + title + } + seo_metadata { + ...Metadata + } + } + header { + heading + preamble + } + hero_image + blocks { + ... on ContentPageBlocksContent { + content { + content { + json + } + } + } + } + system { + ...System + } + } + } + ${Metadata} + ${System} +` diff --git a/packages/trpc/lib/graphql/Query/DestinationCityPage/DestinationCityListData.graphql b/packages/trpc/lib/graphql/Query/DestinationCityPage/DestinationCityListData.graphql deleted file mode 100644 index 66fbb3a7d..000000000 --- a/packages/trpc/lib/graphql/Query/DestinationCityPage/DestinationCityListData.graphql +++ /dev/null @@ -1,45 +0,0 @@ -#import "../../Fragments/System.graphql" - -query GetDestinationCityListData($locale: String!, $cityIdentifier: String!) { - all_destination_city_page( - where: { - OR: [ - { destination_settings: { city_denmark: $cityIdentifier } } - { destination_settings: { city_finland: $cityIdentifier } } - { destination_settings: { city_germany: $cityIdentifier } } - { destination_settings: { city_norway: $cityIdentifier } } - { destination_settings: { city_poland: $cityIdentifier } } - { destination_settings: { city_sweden: $cityIdentifier } } - ] - } - locale: $locale - ) { - items { - heading - destination_settings { - city_denmark - city_finland - city_germany - city_norway - city_poland - city_sweden - location { - longitude - latitude - } - } - sort_order - preamble - images { - image - } - experiences { - destination_experiences - } - url - system { - ...System - } - } - } -} diff --git a/packages/trpc/lib/graphql/Query/DestinationCityPage/DestinationCityListData.graphql.ts b/packages/trpc/lib/graphql/Query/DestinationCityPage/DestinationCityListData.graphql.ts new file mode 100644 index 000000000..78bf838ed --- /dev/null +++ b/packages/trpc/lib/graphql/Query/DestinationCityPage/DestinationCityListData.graphql.ts @@ -0,0 +1,50 @@ +import { gql } from "graphql-tag" + +import { System } from "../../Fragments/System.graphql" + +export const GetDestinationCityListData = gql` + query GetDestinationCityListData($locale: String!, $cityIdentifier: String!) { + all_destination_city_page( + where: { + OR: [ + { destination_settings: { city_denmark: $cityIdentifier } } + { destination_settings: { city_finland: $cityIdentifier } } + { destination_settings: { city_germany: $cityIdentifier } } + { destination_settings: { city_norway: $cityIdentifier } } + { destination_settings: { city_poland: $cityIdentifier } } + { destination_settings: { city_sweden: $cityIdentifier } } + ] + } + locale: $locale + ) { + items { + heading + destination_settings { + city_denmark + city_finland + city_germany + city_norway + city_poland + city_sweden + location { + longitude + latitude + } + } + sort_order + preamble + images { + image + } + experiences { + destination_experiences + } + url + system { + ...System + } + } + } + } + ${System} +` diff --git a/packages/trpc/lib/graphql/Query/DestinationCityPage/DestinationCityPage.graphql b/packages/trpc/lib/graphql/Query/DestinationCityPage/DestinationCityPage.graphql deleted file mode 100644 index 91df55d21..000000000 --- a/packages/trpc/lib/graphql/Query/DestinationCityPage/DestinationCityPage.graphql +++ /dev/null @@ -1,178 +0,0 @@ -#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 new file mode 100644 index 000000000..abba3613c --- /dev/null +++ b/packages/trpc/lib/graphql/Query/DestinationCityPage/DestinationCityPage.graphql.ts @@ -0,0 +1,225 @@ +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 deleted file mode 100644 index 0084e58a4..000000000 --- a/packages/trpc/lib/graphql/Query/DestinationCityPage/DestinationCityPageCount.graphql +++ /dev/null @@ -1,7 +0,0 @@ -#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 new file mode 100644 index 000000000..072020329 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/DestinationCityPage/DestinationCityPageCount.graphql.ts @@ -0,0 +1,9 @@ +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 b/packages/trpc/lib/graphql/Query/DestinationCityPage/DestinationCityPageUrl.graphql deleted file mode 100644 index 342f6e83c..000000000 --- a/packages/trpc/lib/graphql/Query/DestinationCityPage/DestinationCityPageUrl.graphql +++ /dev/null @@ -1,20 +0,0 @@ -#import "../../Fragments/System.graphql" - -query GetCityPageUrls($locale: String!, $skip: Int) { - all_destination_city_page(locale: $locale, limit: 100, skip: $skip) { - items { - url - destination_settings { - city_denmark - city_finland - city_germany - city_norway - city_poland - city_sweden - } - system { - ...System - } - } - } -} diff --git a/packages/trpc/lib/graphql/Query/DestinationCityPage/DestinationCityPageUrl.graphql.ts b/packages/trpc/lib/graphql/Query/DestinationCityPage/DestinationCityPageUrl.graphql.ts new file mode 100644 index 000000000..6743a9118 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/DestinationCityPage/DestinationCityPageUrl.graphql.ts @@ -0,0 +1,25 @@ +import { gql } from "graphql-tag" + +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 { + url + destination_settings { + city_denmark + city_finland + city_germany + city_norway + city_poland + city_sweden + } + system { + ...System + } + } + } + } + ${System} +` diff --git a/packages/trpc/lib/graphql/Query/DestinationCityPage/Metadata.graphql b/packages/trpc/lib/graphql/Query/DestinationCityPage/Metadata.graphql deleted file mode 100644 index 64e3cd808..000000000 --- a/packages/trpc/lib/graphql/Query/DestinationCityPage/Metadata.graphql +++ /dev/null @@ -1,44 +0,0 @@ -#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 new file mode 100644 index 000000000..f880e098a --- /dev/null +++ b/packages/trpc/lib/graphql/Query/DestinationCityPage/Metadata.graphql.ts @@ -0,0 +1,51 @@ +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 deleted file mode 100644 index 4c9109fbc..000000000 --- a/packages/trpc/lib/graphql/Query/DestinationCountryPage/DestinationCountryPage.graphql +++ /dev/null @@ -1,160 +0,0 @@ -#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 new file mode 100644 index 000000000..9ca52fec2 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/DestinationCountryPage/DestinationCountryPage.graphql.ts @@ -0,0 +1,207 @@ +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 b/packages/trpc/lib/graphql/Query/DestinationCountryPage/DestinationCountryPageUrl.graphql deleted file mode 100644 index 4c21f5bdc..000000000 --- a/packages/trpc/lib/graphql/Query/DestinationCountryPage/DestinationCountryPageUrl.graphql +++ /dev/null @@ -1,15 +0,0 @@ -#import "../../Fragments/System.graphql" - -query GetCountryPageUrls($locale: String!) { - all_destination_country_page(locale: $locale) { - items { - url - destination_settings { - country - } - system { - ...System - } - } - } -} diff --git a/packages/trpc/lib/graphql/Query/DestinationCountryPage/DestinationCountryPageUrl.graphql.ts b/packages/trpc/lib/graphql/Query/DestinationCountryPage/DestinationCountryPageUrl.graphql.ts new file mode 100644 index 000000000..0e0b4d001 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/DestinationCountryPage/DestinationCountryPageUrl.graphql.ts @@ -0,0 +1,20 @@ +import { gql } from "graphql-tag" + +import { System } from "../../Fragments/System.graphql" + +export const GetCountryPageUrls = gql` + query GetCountryPageUrls($locale: String!) { + all_destination_country_page(locale: $locale) { + items { + url + destination_settings { + country + } + system { + ...System + } + } + } + } + ${System} +` diff --git a/packages/trpc/lib/graphql/Query/DestinationCountryPage/Metadata.graphql b/packages/trpc/lib/graphql/Query/DestinationCountryPage/Metadata.graphql deleted file mode 100644 index 0c12482a4..000000000 --- a/packages/trpc/lib/graphql/Query/DestinationCountryPage/Metadata.graphql +++ /dev/null @@ -1,39 +0,0 @@ -#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 new file mode 100644 index 000000000..336f5d06f --- /dev/null +++ b/packages/trpc/lib/graphql/Query/DestinationCountryPage/Metadata.graphql.ts @@ -0,0 +1,46 @@ +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 deleted file mode 100644 index c0f15dd8d..000000000 --- a/packages/trpc/lib/graphql/Query/DestinationOverviewPage/DestinationOverviewPage.graphql +++ /dev/null @@ -1,63 +0,0 @@ -#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 new file mode 100644 index 000000000..2a450b42f --- /dev/null +++ b/packages/trpc/lib/graphql/Query/DestinationOverviewPage/DestinationOverviewPage.graphql.ts @@ -0,0 +1,79 @@ +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 b/packages/trpc/lib/graphql/Query/DestinationOverviewPage/Metadata.graphql deleted file mode 100644 index 5c6f8bf83..000000000 --- a/packages/trpc/lib/graphql/Query/DestinationOverviewPage/Metadata.graphql +++ /dev/null @@ -1,18 +0,0 @@ -#import "../../Fragments/Metadata.graphql" -#import "../../Fragments/System.graphql" - -query GetDestinationOverviewPageMetadata($locale: String!, $uid: String!) { - destination_overview_page(locale: $locale, uid: $uid) { - web { - breadcrumbs { - title - } - seo_metadata { - ...Metadata - } - } - system { - ...System - } - } -} diff --git a/packages/trpc/lib/graphql/Query/DestinationOverviewPage/Metadata.graphql.ts b/packages/trpc/lib/graphql/Query/DestinationOverviewPage/Metadata.graphql.ts new file mode 100644 index 000000000..ac0898e86 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/DestinationOverviewPage/Metadata.graphql.ts @@ -0,0 +1,24 @@ +import { gql } from "graphql-tag" + +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 { + breadcrumbs { + title + } + seo_metadata { + ...Metadata + } + } + system { + ...System + } + } + } + ${Metadata} + ${System} +` diff --git a/packages/trpc/lib/graphql/Query/Footer.graphql b/packages/trpc/lib/graphql/Query/Footer.graphql deleted file mode 100644 index 4e63b4043..000000000 --- a/packages/trpc/lib/graphql/Query/Footer.graphql +++ /dev/null @@ -1,192 +0,0 @@ -#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 new file mode 100644 index 000000000..c1b268891 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/Footer.graphql.ts @@ -0,0 +1,222 @@ +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 deleted file mode 100644 index 60fbe959a..000000000 --- a/packages/trpc/lib/graphql/Query/Header.graphql +++ /dev/null @@ -1,314 +0,0 @@ -#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 new file mode 100644 index 000000000..d9c6f1f6f --- /dev/null +++ b/packages/trpc/lib/graphql/Query/Header.graphql.ts @@ -0,0 +1,344 @@ +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 deleted file mode 100644 index a163b0082..000000000 --- a/packages/trpc/lib/graphql/Query/HotelPage/HotelPage.graphql +++ /dev/null @@ -1,172 +0,0 @@ -#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 new file mode 100644 index 000000000..879d3a883 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/HotelPage/HotelPage.graphql.ts @@ -0,0 +1,196 @@ +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 deleted file mode 100644 index 6c83af553..000000000 --- a/packages/trpc/lib/graphql/Query/HotelPage/HotelPageCount.graphql +++ /dev/null @@ -1,7 +0,0 @@ -#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 new file mode 100644 index 000000000..237bfbdc3 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/HotelPage/HotelPageCount.graphql.ts @@ -0,0 +1,9 @@ +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 b/packages/trpc/lib/graphql/Query/HotelPage/HotelPageUrl.graphql deleted file mode 100644 index 6d2856641..000000000 --- a/packages/trpc/lib/graphql/Query/HotelPage/HotelPageUrl.graphql +++ /dev/null @@ -1,13 +0,0 @@ -#import "../../Fragments/System.graphql" - -query GetHotelPageUrls($locale: String!, $skip: Int) { - all_hotel_page(locale: $locale, limit: 100, skip: $skip) { - items { - url - hotel_page_id - system { - ...System - } - } - } -} diff --git a/packages/trpc/lib/graphql/Query/HotelPage/HotelPageUrl.graphql.ts b/packages/trpc/lib/graphql/Query/HotelPage/HotelPageUrl.graphql.ts new file mode 100644 index 000000000..3caa0142e --- /dev/null +++ b/packages/trpc/lib/graphql/Query/HotelPage/HotelPageUrl.graphql.ts @@ -0,0 +1,18 @@ +import { gql } from "graphql-tag" + +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 { + url + hotel_page_id + system { + ...System + } + } + } + } + ${System} +` diff --git a/packages/trpc/lib/graphql/Query/HotelPage/Metadata.graphql b/packages/trpc/lib/graphql/Query/HotelPage/Metadata.graphql deleted file mode 100644 index 6daed5c86..000000000 --- a/packages/trpc/lib/graphql/Query/HotelPage/Metadata.graphql +++ /dev/null @@ -1,19 +0,0 @@ -#import "../../Fragments/Metadata.graphql" -#import "../../Fragments/System.graphql" - -query GetHotelPageMetadata($locale: String!, $uid: String!) { - hotel_page(locale: $locale, uid: $uid) { - hotel_page_id - web { - breadcrumbs { - title - } - seo_metadata { - ...Metadata - } - } - system { - ...System - } - } -} diff --git a/packages/trpc/lib/graphql/Query/HotelPage/Metadata.graphql.ts b/packages/trpc/lib/graphql/Query/HotelPage/Metadata.graphql.ts new file mode 100644 index 000000000..1e2b25e1b --- /dev/null +++ b/packages/trpc/lib/graphql/Query/HotelPage/Metadata.graphql.ts @@ -0,0 +1,25 @@ +import { gql } from "graphql-tag" + +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 + web { + breadcrumbs { + title + } + seo_metadata { + ...Metadata + } + } + system { + ...System + } + } + } + ${Metadata} + ${System} +` diff --git a/packages/trpc/lib/graphql/Query/LoyaltyLevels.graphql b/packages/trpc/lib/graphql/Query/LoyaltyLevels.graphql deleted file mode 100644 index 652d096d7..000000000 --- a/packages/trpc/lib/graphql/Query/LoyaltyLevels.graphql +++ /dev/null @@ -1,25 +0,0 @@ -query GetAllLoyaltyLevels($lang: String!, $level_ids: [String]!) { - all_loyalty_level(where: { level_id_in: $level_ids }, locale: $lang) { - items { - description - level_id - name - required_points - required_nights - user_facing_tag - } - } -} - -query GetLoyaltyLevel($lang: String!, $level_id: String!) { - all_loyalty_level(where: { level_id: $level_id }, locale: $lang) { - items { - description - level_id - name - required_points - required_nights - user_facing_tag - } - } -} diff --git a/packages/trpc/lib/graphql/Query/LoyaltyLevels.graphql.ts b/packages/trpc/lib/graphql/Query/LoyaltyLevels.graphql.ts new file mode 100644 index 000000000..e8971d338 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/LoyaltyLevels.graphql.ts @@ -0,0 +1,31 @@ +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 { + description + level_id + name + required_points + required_nights + user_facing_tag + } + } + } +` + +export const GetLoyaltyLevel = gql` + query GetLoyaltyLevel($lang: String!, $level_id: String!) { + all_loyalty_level(where: { level_id: $level_id }, locale: $lang) { + items { + description + level_id + name + required_points + required_nights + user_facing_tag + } + } + } +` diff --git a/packages/trpc/lib/graphql/Query/LoyaltyPage/LoyaltyPage.graphql b/packages/trpc/lib/graphql/Query/LoyaltyPage/LoyaltyPage.graphql deleted file mode 100644 index cae4e97dd..000000000 --- a/packages/trpc/lib/graphql/Query/LoyaltyPage/LoyaltyPage.graphql +++ /dev/null @@ -1,102 +0,0 @@ -#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 new file mode 100644 index 000000000..9a99a1f07 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/LoyaltyPage/LoyaltyPage.graphql.ts @@ -0,0 +1,143 @@ +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 b/packages/trpc/lib/graphql/Query/LoyaltyPage/Metadata.graphql deleted file mode 100644 index b084d8738..000000000 --- a/packages/trpc/lib/graphql/Query/LoyaltyPage/Metadata.graphql +++ /dev/null @@ -1,31 +0,0 @@ -#import "../../Fragments/Metadata.graphql" -#import "../../Fragments/System.graphql" - -query GetLoyaltyPageMetadata($locale: String!, $uid: String!) { - loyalty_page(locale: $locale, uid: $uid) { - web { - breadcrumbs { - title - } - seo_metadata { - ...Metadata - } - } - heading - preamble - hero_image - blocks { - ... on LoyaltyPageBlocksContent { - __typename - content { - content { - json - } - } - } - } - system { - ...System - } - } -} diff --git a/packages/trpc/lib/graphql/Query/LoyaltyPage/Metadata.graphql.ts b/packages/trpc/lib/graphql/Query/LoyaltyPage/Metadata.graphql.ts new file mode 100644 index 000000000..d0b4b6ee9 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/LoyaltyPage/Metadata.graphql.ts @@ -0,0 +1,37 @@ +import { gql } from "graphql-tag" + +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 { + breadcrumbs { + title + } + seo_metadata { + ...Metadata + } + } + heading + preamble + hero_image + blocks { + ... on LoyaltyPageBlocksContent { + __typename + content { + content { + json + } + } + } + } + system { + ...System + } + } + } + ${Metadata} + ${System} +` diff --git a/packages/trpc/lib/graphql/Query/PageSettings.graphql b/packages/trpc/lib/graphql/Query/PageSettings.graphql deleted file mode 100644 index 627ee5b69..000000000 --- a/packages/trpc/lib/graphql/Query/PageSettings.graphql +++ /dev/null @@ -1,105 +0,0 @@ -#import "../Fragments/PageSettings.graphql" - -query GetAccountPageSettings($uid: String!, $locale: String!) { - page: account_page(uid: $uid, locale: $locale) { - settings: page_settings { - ...PageSettings - } - } -} - -query GetCampaignOverviewPageSettings($uid: String!, $locale: String!) { - page: campaign_overview_page(uid: $uid, locale: $locale) { - settings: page_settings { - ...PageSettings - } - } -} - -query GetCampaignPageSettings($uid: String!, $locale: String!) { - page: campaign_page(uid: $uid, locale: $locale) { - settings: page_settings { - ...PageSettings - } - } -} - -query GetCollectionPageSettings($uid: String!, $locale: String!) { - page: collection_page(uid: $uid, locale: $locale) { - settings: page_settings { - ...PageSettings - } - } -} - -query GetContentPageSettings($uid: String!, $locale: String!) { - page: content_page(uid: $uid, locale: $locale) { - settings: page_settings { - ...PageSettings - } - } -} - -query GetCurrentBlocksPageSettings($uid: String!, $locale: String!) { - page: current_blocks_page(uid: $uid, locale: $locale) { - settings: page_settings { - ...PageSettings - } - } -} - -query GetDestinationCityPageSettings($uid: String!, $locale: String!) { - page: destination_city_page(uid: $uid, locale: $locale) { - settings: page_settings { - ...PageSettings - } - } -} - -query GetDestinationCountryPageSettings($uid: String!, $locale: String!) { - page: destination_country_page(uid: $uid, locale: $locale) { - settings: page_settings { - ...PageSettings - } - } -} - -query GetDestinationOverviewPageSettings($uid: String!, $locale: String!) { - page: destination_overview_page(uid: $uid, locale: $locale) { - settings: page_settings { - ...PageSettings - } - } -} - -query GetHotelPageSettings($uid: String!, $locale: String!) { - page: hotel_page(uid: $uid, locale: $locale) { - settings: page_settings { - ...PageSettings - } - } -} - -query GetLoyaltyPageSettings($uid: String!, $locale: String!) { - page: loyalty_page(uid: $uid, locale: $locale) { - settings: page_settings { - ...PageSettings - } - } -} - -query GetStartPageSettings($uid: String!, $locale: String!) { - page: start_page(uid: $uid, locale: $locale) { - settings: page_settings { - ...PageSettings - } - } -} - -query GetPromoCampaignPageSettings($uid: String!, $locale: String!) { - page: promo_campaign_page(uid: $uid, locale: $locale) { - settings: page_settings { - ...PageSettings - } - } -} diff --git a/packages/trpc/lib/graphql/Query/PageSettings.graphql.ts b/packages/trpc/lib/graphql/Query/PageSettings.graphql.ts new file mode 100644 index 000000000..232eb1f8d --- /dev/null +++ b/packages/trpc/lib/graphql/Query/PageSettings.graphql.ts @@ -0,0 +1,146 @@ +import { gql } from "graphql-tag" + +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 { + ...PageSettings + } + } + } + ${PageSettings} +` + +export const GetCampaignOverviewPageSettings = gql` + query GetCampaignOverviewPageSettings($uid: String!, $locale: String!) { + page: campaign_overview_page(uid: $uid, locale: $locale) { + settings: page_settings { + ...PageSettings + } + } + } + ${PageSettings} +` + +export const GetCampaignPageSettings = gql` + query GetCampaignPageSettings($uid: String!, $locale: String!) { + page: campaign_page(uid: $uid, locale: $locale) { + settings: page_settings { + ...PageSettings + } + } + } + ${PageSettings} +` + +export const GetCollectionPageSettings = gql` + query GetCollectionPageSettings($uid: String!, $locale: String!) { + page: collection_page(uid: $uid, locale: $locale) { + settings: page_settings { + ...PageSettings + } + } + } + ${PageSettings} +` + +export const GetContentPageSettings = gql` + query GetContentPageSettings($uid: String!, $locale: String!) { + page: content_page(uid: $uid, locale: $locale) { + settings: page_settings { + ...PageSettings + } + } + } + ${PageSettings} +` + +export const GetCurrentBlocksPageSettings = gql` + query GetCurrentBlocksPageSettings($uid: String!, $locale: String!) { + page: current_blocks_page(uid: $uid, locale: $locale) { + settings: page_settings { + ...PageSettings + } + } + } + ${PageSettings} +` + +export const GetDestinationCityPageSettings = gql` + query GetDestinationCityPageSettings($uid: String!, $locale: String!) { + page: destination_city_page(uid: $uid, locale: $locale) { + settings: page_settings { + ...PageSettings + } + } + } + ${PageSettings} +` + +export const GetDestinationCountryPageSettings = gql` + query GetDestinationCountryPageSettings($uid: String!, $locale: String!) { + page: destination_country_page(uid: $uid, locale: $locale) { + settings: page_settings { + ...PageSettings + } + } + } + ${PageSettings} +` + +export const GetDestinationOverviewPageSettings = gql` + query GetDestinationOverviewPageSettings($uid: String!, $locale: String!) { + page: destination_overview_page(uid: $uid, locale: $locale) { + settings: page_settings { + ...PageSettings + } + } + } + ${PageSettings} +` + +export const GetHotelPageSettings = gql` + query GetHotelPageSettings($uid: String!, $locale: String!) { + page: hotel_page(uid: $uid, locale: $locale) { + settings: page_settings { + ...PageSettings + } + } + } + ${PageSettings} +` + +export const GetLoyaltyPageSettings = gql` + query GetLoyaltyPageSettings($uid: String!, $locale: String!) { + page: loyalty_page(uid: $uid, locale: $locale) { + settings: page_settings { + ...PageSettings + } + } + } + ${PageSettings} +` + +export const GetStartPageSettings = gql` + query GetStartPageSettings($uid: String!, $locale: String!) { + page: start_page(uid: $uid, locale: $locale) { + settings: page_settings { + ...PageSettings + } + } + } + ${PageSettings} +` + +export const GetPromoCampaignPageSettings = gql` + query GetPromoCampaignPageSettings($uid: String!, $locale: String!) { + page: promo_campaign_page(uid: $uid, locale: $locale) { + settings: page_settings { + ...PageSettings + } + } + } + ${PageSettings} +` diff --git a/packages/trpc/lib/graphql/Query/PromoCampaignPage/Metadata.graphql b/packages/trpc/lib/graphql/Query/PromoCampaignPage/Metadata.graphql deleted file mode 100644 index 10d10fcda..000000000 --- a/packages/trpc/lib/graphql/Query/PromoCampaignPage/Metadata.graphql +++ /dev/null @@ -1,19 +0,0 @@ -#import "../../Fragments/Metadata.graphql" -#import "../../Fragments/System.graphql" - -query GetPromoCampaignPageMetadata($locale: String!, $uid: String!) { - promo_campaign_page(locale: $locale, uid: $uid) { - web { - breadcrumbs { - title - } - seo_metadata { - ...Metadata - } - } - heading - system { - ...System - } - } -} diff --git a/packages/trpc/lib/graphql/Query/PromoCampaignPage/Metadata.graphql.ts b/packages/trpc/lib/graphql/Query/PromoCampaignPage/Metadata.graphql.ts new file mode 100644 index 000000000..b7d945f5d --- /dev/null +++ b/packages/trpc/lib/graphql/Query/PromoCampaignPage/Metadata.graphql.ts @@ -0,0 +1,25 @@ +import { gql } from "graphql-tag" + +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 { + breadcrumbs { + title + } + seo_metadata { + ...Metadata + } + } + heading + system { + ...System + } + } + } + ${Metadata} + ${System} +` diff --git a/packages/trpc/lib/graphql/Query/PromoCampaignPage/PromoCampaignPage.graphql b/packages/trpc/lib/graphql/Query/PromoCampaignPage/PromoCampaignPage.graphql deleted file mode 100644 index 4619b37df..000000000 --- a/packages/trpc/lib/graphql/Query/PromoCampaignPage/PromoCampaignPage.graphql +++ /dev/null @@ -1,75 +0,0 @@ -#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 new file mode 100644 index 000000000..36bf48471 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/PromoCampaignPage/PromoCampaignPage.graphql.ts @@ -0,0 +1,96 @@ +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 deleted file mode 100644 index 5141e9f5c..000000000 --- a/packages/trpc/lib/graphql/Query/ResolveEntry.graphql +++ /dev/null @@ -1,114 +0,0 @@ -#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 new file mode 100644 index 000000000..e5bf1f377 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/ResolveEntry.graphql.ts @@ -0,0 +1,128 @@ +import { gql } from "graphql-tag" + +import { System } from "../Fragments/System.graphql" + +export const EntryByUrlBatch1 = gql` + 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 + } + } + + ${System} +` + +export const EntryByUrlBatch2 = gql` + 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 + } + } + + ${System} +` + +export const EntryByUrlBatch3 = gql` + query EntryByUrlBatch3($locale: String!, $url: String!) { + all_promo_campaign_page(where: { url: $url }, locale: $locale) { + items { + system { + ...System + } + } + total + } + } + + ${System} +` diff --git a/packages/trpc/lib/graphql/Query/Rewards.graphql b/packages/trpc/lib/graphql/Query/Rewards.graphql deleted file mode 100644 index 58915640f..000000000 --- a/packages/trpc/lib/graphql/Query/Rewards.graphql +++ /dev/null @@ -1,15 +0,0 @@ -query GetRewards($locale: String!, $rewardIds: [String!]) { - all_reward(locale: $locale, where: { reward_id_in: $rewardIds }) { - items { - taxonomies { - term_uid - } - label - grouped_label - description - grouped_description - value - reward_id - } - } -} diff --git a/packages/trpc/lib/graphql/Query/Rewards.graphql.ts b/packages/trpc/lib/graphql/Query/Rewards.graphql.ts new file mode 100644 index 000000000..0046f4990 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/Rewards.graphql.ts @@ -0,0 +1,19 @@ +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 { + taxonomies { + term_uid + } + label + grouped_label + description + grouped_description + value + reward_id + } + } + } +` diff --git a/packages/trpc/lib/graphql/Query/RewardsWithRedeem.graphql b/packages/trpc/lib/graphql/Query/RewardsWithRedeem.graphql deleted file mode 100644 index dd33e2c37..000000000 --- a/packages/trpc/lib/graphql/Query/RewardsWithRedeem.graphql +++ /dev/null @@ -1,96 +0,0 @@ -#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 new file mode 100644 index 000000000..98d8abb16 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/RewardsWithRedeem.graphql.ts @@ -0,0 +1,125 @@ +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 deleted file mode 100644 index 7041c8444..000000000 --- a/packages/trpc/lib/graphql/Query/SASTierComparison.graphql +++ /dev/null @@ -1,55 +0,0 @@ -#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 new file mode 100644 index 000000000..9ffdb42ea --- /dev/null +++ b/packages/trpc/lib/graphql/Query/SASTierComparison.graphql.ts @@ -0,0 +1,71 @@ +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 deleted file mode 100644 index cd0760dbe..000000000 --- a/packages/trpc/lib/graphql/Query/SiteConfig.graphql +++ /dev/null @@ -1,43 +0,0 @@ -#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 new file mode 100644 index 000000000..3f74aab97 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/SiteConfig.graphql.ts @@ -0,0 +1,51 @@ +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 deleted file mode 100644 index 2a8c7f2f3..000000000 --- a/packages/trpc/lib/graphql/Query/SitewideCampaignBanner.graphql +++ /dev/null @@ -1,34 +0,0 @@ -#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 new file mode 100644 index 000000000..f17b3cdd7 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/SitewideCampaignBanner.graphql.ts @@ -0,0 +1,42 @@ +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 b/packages/trpc/lib/graphql/Query/StartPage/Metadata.graphql deleted file mode 100644 index 68d03fbe1..000000000 --- a/packages/trpc/lib/graphql/Query/StartPage/Metadata.graphql +++ /dev/null @@ -1,19 +0,0 @@ -#import "../../Fragments/Metadata.graphql" -#import "../../Fragments/System.graphql" - -query GetStartPageMetadata($locale: String!, $uid: String!) { - start_page(locale: $locale, uid: $uid) { - web { - seo_metadata { - ...Metadata - } - } - header { - heading - hero_image - } - system { - ...System - } - } -} diff --git a/packages/trpc/lib/graphql/Query/StartPage/Metadata.graphql.ts b/packages/trpc/lib/graphql/Query/StartPage/Metadata.graphql.ts new file mode 100644 index 000000000..5ed11a798 --- /dev/null +++ b/packages/trpc/lib/graphql/Query/StartPage/Metadata.graphql.ts @@ -0,0 +1,25 @@ +import { gql } from "graphql-tag" + +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 { + seo_metadata { + ...Metadata + } + } + header { + heading + hero_image + } + system { + ...System + } + } + } + ${Metadata} + ${System} +` diff --git a/packages/trpc/lib/graphql/Query/StartPage/StartPage.graphql b/packages/trpc/lib/graphql/Query/StartPage/StartPage.graphql deleted file mode 100644 index 6ba478994..000000000 --- a/packages/trpc/lib/graphql/Query/StartPage/StartPage.graphql +++ /dev/null @@ -1,90 +0,0 @@ -#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 new file mode 100644 index 000000000..e7070cdad --- /dev/null +++ b/packages/trpc/lib/graphql/Query/StartPage/StartPage.graphql.ts @@ -0,0 +1,123 @@ +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 ad7dd7c69..ef55cbd68 100644 --- a/packages/trpc/lib/graphql/_request.ts +++ b/packages/trpc/lib/graphql/_request.ts @@ -29,31 +29,6 @@ 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( @@ -140,6 +115,7 @@ export async function request( `[gql] Error sending graphql request to ${env.CMS_URL}`, error ) - throw new Error("Something went wrong") + + throw new Error("Failed to fetch data from CMS", { cause: { error } }) } } diff --git a/packages/trpc/lib/graphql/request.ts b/packages/trpc/lib/graphql/request.ts index 8b09b1f95..ced20e25f 100644 --- a/packages/trpc/lib/graphql/request.ts +++ b/packages/trpc/lib/graphql/request.ts @@ -1,4 +1,5 @@ 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" @@ -14,8 +15,6 @@ 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( @@ -45,7 +44,7 @@ export async function request( return doCall() } - const queryString = typeof query === "string" ? query : stringify(query) + const queryString = typeof query === "string" ? query : print(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 new file mode 100644 index 000000000..ae68bd915 --- /dev/null +++ b/packages/trpc/lib/graphql/validate.test.ts @@ -0,0 +1,332 @@ +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 aa1a8349e..e42161eb1 100644 --- a/packages/trpc/lib/routers/contentstack/breadcrumbs/query.ts +++ b/packages/trpc/lib/routers/contentstack/breadcrumbs/query.ts @@ -1,3 +1,4 @@ +import { type DocumentNode } from "graphql" import { cache } from "react" import { createCounter } from "@scandic-hotels/common/telemetry" @@ -64,8 +65,8 @@ import type { interface BreadcrumbsPageData { dataKey: keyof T - refQuery: string - query: string + refQuery: string | DocumentNode + query: string | DocumentNode } 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 db3131459..c17fa5de9 100644 --- a/packages/trpc/lib/routers/contentstack/metadata/query.ts +++ b/packages/trpc/lib/routers/contentstack/metadata/query.ts @@ -28,11 +28,12 @@ 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, + query: string | DocumentNode, { uid, lang }: { uid: string; lang: Lang } ) { const getMetadataCounter = createCounter("trpc.contentstack", "metadata.get") diff --git a/packages/trpc/lib/serverClient.ts b/packages/trpc/lib/serverClient.ts index c69ebc99a..f30d052a9 100644 --- a/packages/trpc/lib/serverClient.ts +++ b/packages/trpc/lib/serverClient.ts @@ -28,10 +28,16 @@ export function appServerClient( return createCaller(context, { onError: (args) => { const { ctx, error, input, path, type } = args - serverClientLogger.error(`error for ${type}: ${path}`, error) - if (input) { - serverClientLogger.error(`received input:`, input) - } + serverClientLogger.error(`error for ${type}: ${path}`, { + error: { + message: error.message, + stack: error.stack, + name: error.name, + code: error.code, + cause: error.cause, + }, + input, + }) options.onError?.(args) diff --git a/packages/trpc/types.d.ts b/packages/trpc/types.d.ts index bd437a815..e69de29bb 100644 --- a/packages/trpc/types.d.ts +++ b/packages/trpc/types.d.ts @@ -1 +0,0 @@ -declare module "*.graphql" diff --git a/scripts/README-convert-graphql-to-ts.md b/scripts/README-convert-graphql-to-ts.md new file mode 100644 index 000000000..26a4831b0 --- /dev/null +++ b/scripts/README-convert-graphql-to-ts.md @@ -0,0 +1,150 @@ +# 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 new file mode 100644 index 000000000..ab23c5bfc --- /dev/null +++ b/scripts/convert-graphql-to-ts.ts @@ -0,0 +1,373 @@ +#!/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); +} diff --git a/yarn.lock b/yarn.lock index fa7d8cef2..5cfe7398b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10349,27 +10349,15 @@ __metadata: languageName: node linkType: hard -"import-in-the-middle@npm:^1.13.0, import-in-the-middle@npm:^1.8.1": - version: 1.13.1 - resolution: "import-in-the-middle@npm:1.13.1" - dependencies: - acorn: "npm:^8.14.0" - acorn-import-attributes: "npm:^1.9.5" - cjs-module-lexer: "npm:^1.2.2" - module-details-from-path: "npm:^1.0.3" - checksum: 10c0/4ef05a924c37ff718dd08654927c90d470d92fd9425d646b0d423aaddc89655848debd14761bcb6efa4f57870d63ff38109bab31ca8a1d9d5df2e7d84d2649cf - languageName: node - linkType: hard - "import-in-the-middle@npm:^1.14.2": - version: 1.14.2 - resolution: "import-in-the-middle@npm:1.14.2" + version: 1.15.0 + resolution: "import-in-the-middle@npm:1.15.0" dependencies: acorn: "npm:^8.14.0" acorn-import-attributes: "npm:^1.9.5" cjs-module-lexer: "npm:^1.2.2" module-details-from-path: "npm:^1.0.3" - checksum: 10c0/ee614a09d3772ad39f8005d798458e541cbfb897b8f97623f4bac527eecc51984586cfbf8f195715df5c463ec0b7fce8086489dc12f758ffe5ea485b8a29da01 + checksum: 10c0/43d4efbe75a89c04343fd052ca5d2193adc0e2df93325e50d8b32c31403b2f089a5e2b6e47f4e5413bc4058b9781aaaf61bfe3f0e5e6d7f9487eb112fd095e0d languageName: node linkType: hard