feat(SW-66, SW-348): search functionality and ui

This commit is contained in:
Simon Emanuelsson
2024-08-28 10:47:57 +02:00
parent b9dbcf7d90
commit af850c90e7
437 changed files with 7663 additions and 9881 deletions

View File

@@ -1,107 +0,0 @@
#import "../Fragments/MyPages/AccountPage/AccountPageContentDynamicContent.graphql"
#import "../Fragments/MyPages/AccountPage/AccountPageContentShortcuts.graphql"
#import "../Fragments/MyPages/AccountPage/AccountPageContentTextContent.graphql"
#import "../Fragments/Refs/MyPages/AccountPage.graphql"
#import "../Fragments/Refs/ContentPage/ContentPage.graphql"
#import "../Fragments/Refs/LoyaltyPage/LoyaltyPage.graphql"
#import "../Fragments/Refs/System.graphql"
query GetAccountPage($locale: String!, $uid: String!) {
account_page(locale: $locale, uid: $uid) {
heading
url
title
content {
__typename
...AccountPageContentDynamicContent
...AccountPageContentShortcuts
...AccountPageContentTextContent
}
system {
uid
created_at
updated_at
locale
}
}
}
query GetAccountPageRefs($locale: String!, $uid: String!) {
account_page(locale: $locale, uid: $uid) {
content {
... on AccountPageContentDynamicContent {
__typename
dynamic_content {
link {
linkConnection {
edges {
node {
__typename
...AccountPageRef
...LoyaltyPageRef
}
}
}
}
}
}
... on AccountPageContentShortcuts {
__typename
shortcuts {
shortcuts {
linkConnection {
edges {
node {
__typename
...AccountPageRef
...ContentPageRef
...LoyaltyPageRef
}
}
}
}
}
}
}
system {
...System
}
}
}
query GetDaDeEnUrlsAccountPage($uid: String!) {
de: all_account_page(where: { uid: $uid }, locale: "de") {
items {
url
}
}
en: all_account_page(where: { uid: $uid }, locale: "en") {
items {
url
}
}
da: all_account_page(where: { uid: $uid }, locale: "da") {
items {
url
}
}
}
query GetFiNoSvUrlsAccountPage($uid: String!) {
fi: all_account_page(where: { uid: $uid }, locale: "fi") {
items {
url
}
}
no: all_account_page(where: { uid: $uid }, locale: "no") {
items {
url
}
}
sv: all_account_page(where: { uid: $uid }, locale: "sv") {
items {
url
}
}
}

View File

@@ -0,0 +1,61 @@
#import "../../Fragments/System.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
title
url
content {
__typename
...DynamicContent_AccountPage
...Shortcuts_AccountPage
...TextContent_AccountPage
}
system {
...System
created_at
updated_at
}
}
}
query GetAccountPageRefs($locale: String!, $uid: String!) {
account_page(locale: $locale, uid: $uid) {
content {
__typename
...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
}
}

View File

@@ -1,9 +1,10 @@
#import "../Fragments/Image.graphql"
#import "../../Fragments/Image.graphql"
#import "../../Fragments/System.graphql"
query GetMyPagesMetaData($locale: String!, $uid: String!) {
account_page(locale: $locale, uid: $uid) {
system {
uid
...System
}
web {
breadcrumbs {

View File

@@ -1,10 +1,10 @@
#import "../Fragments/PageLink/AccountPageLink.graphql"
#import "../Fragments/PageLink/ContentPageLink.graphql"
#import "../Fragments/PageLink/LoyaltyPageLink.graphql"
#import "../Fragments/Refs/MyPages/AccountPage.graphql"
#import "../Fragments/Refs/ContentPage/ContentPage.graphql"
#import "../Fragments/Refs/LoyaltyPage/LoyaltyPage.graphql"
#import "../Fragments/Refs/System.graphql"
#import "../../Fragments/PageLink/AccountPageLink.graphql"
#import "../../Fragments/PageLink/ContentPageLink.graphql"
#import "../../Fragments/PageLink/LoyaltyPageLink.graphql"
#import "../../Fragments/AccountPage/Ref.graphql"
#import "../../Fragments/ContentPage/Ref.graphql"
#import "../../Fragments/LoyaltyPage/Ref.graphql"
#import "../../Fragments/System.graphql"
query GetNavigationMyPages($locale: String!) {
all_navigation_my_pages(locale: $locale, limit: 1) {

View File

@@ -0,0 +1,28 @@
#import "../../Fragments/Breadcrumbs/Breadcrumbs.graphql"
#import "../../Fragments/System.graphql"
query GetMyPagesBreadcrumbs($locale: String!, $uid: String!) {
account_page(locale: $locale, uid: $uid) {
web {
breadcrumbs {
...Breadcrumbs
}
}
system {
...System
}
}
}
query GetMyPagesBreadcrumbsRefs($locale: String!, $uid: String!) {
account_page(locale: $locale, uid: $uid) {
web {
breadcrumbs {
...BreadcrumbsRefs
}
}
system {
...System
}
}
}

View File

@@ -0,0 +1,28 @@
#import "../../Fragments/Breadcrumbs/Breadcrumbs.graphql"
#import "../../Fragments/System.graphql"
query GetContentPageBreadcrumbs($locale: String!, $uid: String!) {
content_page(locale: $locale, uid: $uid) {
web {
breadcrumbs {
...Breadcrumbs
}
}
system {
...System
}
}
}
query GetContentPageBreadcrumbsRefs($locale: String!, $uid: String!) {
content_page(locale: $locale, uid: $uid) {
web {
breadcrumbs {
...BreadcrumbsRefs
}
}
system {
...System
}
}
}

View File

@@ -0,0 +1,28 @@
#import "../../Fragments/Breadcrumbs/Breadcrumbs.graphql"
#import "../../Fragments/System.graphql"
query GetLoyaltyPageBreadcrumbs($locale: String!, $uid: String!) {
loyalty_page(locale: $locale, uid: $uid) {
web {
breadcrumbs {
...Breadcrumbs
}
}
system {
...System
}
}
}
query GetLoyaltyPageBreadcrumbsRefs($locale: String!, $uid: String!) {
loyalty_page(locale: $locale, uid: $uid) {
web {
breadcrumbs {
...BreadcrumbsRefs
}
}
system {
...System
}
}
}

View File

@@ -1,21 +0,0 @@
#import "../Fragments/ContentPage/Breadcrumbs.graphql"
#import "../Fragments/Refs/ContentPage/Breadcrumbs.graphql"
query GetContentPageBreadcrumbs($locale: String!, $url: String!) {
all_content_page(locale: $locale, where: { url: $url }) {
items {
...ContentPageBreadcrumbs
system {
uid
}
}
}
}
query GetContentPageBreadcrumbsRefs($locale: String!, $url: String!) {
all_content_page(locale: $locale, where: { url: $url }) {
items {
...ContentPageBreadcrumbsRefs
}
}
}

View File

@@ -1,21 +0,0 @@
#import "../Fragments/LoyaltyPage/Breadcrumbs.graphql"
#import "../Fragments/Refs/LoyaltyPage/Breadcrumbs.graphql"
query GetLoyaltyPageBreadcrumbs($locale: String!, $url: String!) {
all_loyalty_page(locale: $locale, where: { url: $url }) {
items {
...LoyaltyPageBreadcrumbs
system {
uid
}
}
}
}
query GetLoyaltyPageBreadcrumbsRefs($locale: String!, $url: String!) {
all_loyalty_page(locale: $locale, where: { url: $url }) {
items {
...LoyaltyPageBreadcrumbsRefs
}
}
}

View File

@@ -1,21 +0,0 @@
#import "../Fragments/MyPages/Breadcrumbs.graphql"
#import "../Fragments/Refs/MyPages/Breadcrumbs.graphql"
query GetMyPagesBreadcrumbs($locale: String!, $url: String!) {
all_account_page(locale: $locale, where: { url: $url }) {
items {
...MyPagesBreadcrumbs
system {
uid
}
}
}
}
query GetMyPagesBreadcrumbsRefs($locale: String!, $url: String!) {
all_account_page(locale: $locale, where: { url: $url }) {
items {
...MyPagesBreadcrumbsRefs
}
}
}

View File

@@ -1,384 +0,0 @@
#import "../Fragments/Image.graphql"
#import "../Fragments/Blocks/Card.graphql"
#import "../Fragments/Blocks/LoyaltyCard.graphql"
#import "../Fragments/Blocks/Refs/Card.graphql"
#import "../Fragments/Blocks/Refs/LoyaltyCard.graphql"
#import "../Fragments/PageLink/AccountPageLink.graphql"
#import "../Fragments/PageLink/ContentPageLink.graphql"
#import "../Fragments/PageLink/HotelPageLink.graphql"
#import "../Fragments/PageLink/LoyaltyPageLink.graphql"
#import "../Fragments/Refs/MyPages/AccountPage.graphql"
#import "../Fragments/Refs/ContentPage/ContentPage.graphql"
#import "../Fragments/Refs/LoyaltyPage/LoyaltyPage.graphql"
#import "../Fragments/Refs/System.graphql"
query GetContentPage($locale: String!, $uid: String!) {
content_page(uid: $uid, locale: $locale) {
blocks {
... on ContentPageBlocksContent {
__typename
content {
content {
embedded_itemsConnection {
edges {
node {
__typename
...LoyaltyPageLink
...ContentPageLink
...AccountPageLink
...HotelPageLink
}
}
totalCount
}
json
}
}
}
... on ContentPageBlocksShortcuts {
__typename
shortcuts {
title
preamble
shortcuts {
open_in_new_tab
text
linkConnection {
totalCount
edges {
node {
...LoyaltyPageLink
...ContentPageLink
...AccountPageLink
}
}
}
}
}
}
... on ContentPageBlocksCardsGrid {
__typename
cards_grid {
title
preamble
layout
theme
cardConnection(limit: 10) {
edges {
node {
__typename
...CardBlock
...LoyaltyCardBlock
}
}
}
}
}
... on ContentPageBlocksDynamicContent {
__typename
dynamic_content {
title
subtitle
component
link {
text
pageConnection {
edges {
node {
...ContentPageLink
...LoyaltyPageLink
...HotelPageLink
}
}
totalCount
}
}
}
}
... on ContentPageBlocksTextCols {
__typename
text_cols {
columns {
title
text {
json
embedded_itemsConnection {
edges {
node {
__typename
...LoyaltyPageLink
...ContentPageLink
...HotelPageLink
}
}
totalCount
}
}
}
}
}
}
title
header {
heading
preamble
}
hero_image
sidebar {
__typename
... on ContentPageSidebarDynamicContent {
dynamic_content {
component
}
}
... on ContentPageSidebarJoinLoyaltyContact {
join_loyalty_contact {
title
preamble
button {
cta_text
external_link {
title
href
}
open_in_new_tab
linkConnection {
edges {
node {
__typename
...AccountPageLink
...ContentPageLink
...LoyaltyPageLink
}
}
}
}
contact {
... on ContentPageSidebarJoinLoyaltyContactBlockContactContact {
__typename
contact {
display_text
contact_field
footnote
}
}
}
}
}
... on ContentPageSidebarContent {
content {
content {
json
embedded_itemsConnection {
edges {
node {
__typename
...Image
...LoyaltyPageLink
...ContentPageLink
}
}
totalCount
}
}
}
}
}
system {
uid
created_at
updated_at
locale
}
}
}
query GetContentPageRefs($locale: String!, $uid: String!) {
content_page(locale: $locale, uid: $uid) {
blocks {
... on ContentPageBlocksContent {
__typename
content {
content {
embedded_itemsConnection {
edges {
node {
# No fragments used since we want to include __typename for each type to avoid fetching SystemAsset
... on ContentPage {
__typename
system {
...System
}
}
... on LoyaltyPage {
__typename
system {
...System
}
}
... on AccountPage {
__typename
system {
...System
}
}
}
}
}
}
}
}
... on ContentPageBlocksShortcuts {
__typename
shortcuts {
shortcuts {
linkConnection {
edges {
node {
__typename
...AccountPageRef
...ContentPageRef
...LoyaltyPageRef
}
}
}
}
}
}
... on ContentPageBlocksCardsGrid {
__typename
cards_grid {
cardConnection(limit: 10) {
edges {
node {
...CardBlockRef
...LoyaltyCardBlockRef
}
}
}
}
}
... on ContentPageBlocksDynamicContent {
__typename
dynamic_content {
link {
pageConnection {
edges {
node {
__typename
...ContentPageRef
...LoyaltyPageRef
}
}
}
}
}
}
}
sidebar {
... on ContentPageSidebarContent {
__typename
content {
content {
embedded_itemsConnection {
edges {
node {
# No fragments used since we want to include __typename for each type to avoid fetching SystemAsset
... on ContentPage {
__typename
system {
...System
}
}
... on LoyaltyPage {
__typename
system {
...System
}
}
}
}
}
}
}
}
... on ContentPageSidebarJoinLoyaltyContact {
__typename
join_loyalty_contact {
button {
linkConnection {
edges {
node {
__typename
...AccountPageRef
...ContentPageRef
...LoyaltyPageRef
}
}
}
}
}
}
}
system {
...System
}
}
}
query GetDaDeEnUrlsContentPage($uid: String!) {
de: all_content_page(where: { uid: $uid }, locale: "de") {
items {
web {
original_url
}
url
}
}
en: all_content_page(where: { uid: $uid }, locale: "en") {
items {
web {
original_url
}
url
}
}
da: all_content_page(where: { uid: $uid }, locale: "da") {
items {
web {
original_url
}
url
}
}
}
query GetFiNoSvUrlsContentPage($uid: String!) {
fi: all_content_page(where: { uid: $uid }, locale: "fi") {
items {
web {
original_url
}
url
}
}
no: all_content_page(where: { uid: $uid }, locale: "no") {
items {
web {
original_url
}
url
}
}
sv: all_content_page(where: { uid: $uid }, locale: "sv") {
items {
web {
original_url
}
url
}
}
}

View File

@@ -0,0 +1,86 @@
#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/Blocks/TextCols.graphql"
#import "../../Fragments/Sidebar/Content.graphql"
#import "../../Fragments/Sidebar/DynamicContent.graphql"
#import "../../Fragments/Sidebar/JoinLoyaltyContact.graphql"
query GetContentPage($locale: String!, $uid: String!) {
content_page(uid: $uid, locale: $locale) {
hero_image
title
header {
heading
preamble
}
blocks {
__typename
...CardsGrid_ContentPage
...Content_ContentPage
...DynamicContent_ContentPage
...Shortcuts_ContentPage
...TextCols_ContentPage
}
sidebar {
__typename
...ContentSidebar_ContentPage
...DynamicContentSidebar_ContentPage
...JoinLoyaltyContactSidebar_ContentPage
}
system {
...System
created_at
updated_at
}
}
}
query GetContentPageRefs($locale: String!, $uid: String!) {
content_page(locale: $locale, uid: $uid) {
blocks {
__typename
...CardsGrid_ContentPageRefs
...Content_ContentPageRefs
...DynamicContent_ContentPageRefs
...Shortcuts_ContentPageRefs
...TextCols_ContentPageRef
}
sidebar {
__typename
...ContentSidebar_ContentPageRefs
...JoinLoyaltyContactSidebar_ContentPageRefs
}
system {
...System
}
}
}
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
}
}

View File

@@ -1,11 +1,11 @@
#import "../Fragments/Aside/Contact.graphql"
#import "../Fragments/Aside/Puff.graphql"
#import "../Fragments/Blocks/List.graphql"
#import "../Fragments/Blocks/Puff.graphql"
#import "../Fragments/Blocks/Text.graphql"
#import "../Fragments/Breadcrumbs.graphql"
#import "../Fragments/Hero.graphql"
#import "../Fragments/Preamble.graphql"
#import "../../Fragments/Aside/Contact.graphql"
#import "../../Fragments/Aside/Puff.graphql"
#import "../../Fragments/Blocks/List.graphql"
#import "../../Fragments/Blocks/Puff.graphql"
#import "../../Fragments/Blocks/Text.graphql"
#import "../../Fragments/Breadcrumbs/CurrentBlocksPage.graphql"
#import "../../Fragments/Hero.graphql"
#import "../../Fragments/Preamble.graphql"
query GetCurrentBlockPage($locale: String!, $url: String!) {
all_current_blocks_page(limit: 1, locale: $locale, where: { url: $url }) {
@@ -21,7 +21,7 @@ query GetCurrentBlockPage($locale: String!, $url: String!) {
...PuffBlock
...TextBlock
}
...Breadcrumbs
...CurrentBlocksPageBreadcrumbs
hero {
...Hero
}

View File

@@ -0,0 +1,36 @@
#import "../../Fragments/CurrentFooter/AppDownloads.graphql"
#import "../../Fragments/CurrentFooter/Logo.graphql"
#import "../../Fragments/CurrentFooter/Navigation.graphql"
#import "../../Fragments/CurrentFooter/SocialMedia.graphql"
#import "../../Fragments/CurrentFooter/TripAdvisor.graphql"
#import "../../Fragments/System.graphql"
query GetCurrentFooter($locale: String!) {
all_current_footer(limit: 1, locale: $locale) {
items {
...CurrentFooterAppDownloads
...CurrentFooterSocialMedia
...Logo
...Navigation
...TripAdvisor
title
about {
text
title
}
system {
...System
}
}
}
}
query GetCurrentFooterRef($locale: String!) {
all_current_footer(limit: 1, locale: $locale) {
items {
system {
...System
}
}
}
}

View File

@@ -1,5 +1,5 @@
#import "../Fragments/Image.graphql"
#import "../Fragments/Refs/System.graphql"
#import "../../Fragments/Image.graphql"
#import "../../Fragments/System.graphql"
query GetCurrentHeader($locale: String!) {
all_current_header(limit: 1, locale: $locale) {

View File

@@ -1,37 +0,0 @@
#import "../Fragments/CurrentFooter/AppDownloads.graphql"
#import "../Fragments/CurrentFooter/Logo.graphql"
#import "../Fragments/CurrentFooter/Navigation.graphql"
#import "../Fragments/CurrentFooter/SocialMedia.graphql"
#import "../Fragments/CurrentFooter/TripAdvisor.graphql"
#import "../Fragments/Refs/System.graphql"
query GetCurrentFooter($locale: String!) {
all_current_footer(limit: 1, locale: $locale) {
items {
title
system {
locale
uid
}
about {
text
title
}
...AppDownloads
...Logo
...Navigation
...SocialMedia
...TripAdvisor
}
}
}
query GetCurrentFooterRef($locale: String!) {
all_current_footer(limit: 1, locale: $locale) {
items {
system {
...System
}
}
}
}

View File

@@ -1,14 +1,14 @@
#import "../Fragments/Refs/System.graphql"
#import "../Fragments/System.graphql"
#import "../Fragments/PageLink/AccountPageLink.graphql"
#import "../Fragments/PageLink/ContentPageLink.graphql"
#import "../Fragments/PageLink/HotelPageLink.graphql"
#import "../Fragments/PageLink/LoyaltyPageLink.graphql"
#import "../Fragments/Refs/ContentPage/ContentPage.graphql"
#import "../Fragments/Refs/HotelPage/HotelPage.graphql"
#import "../Fragments/Refs/LoyaltyPage/LoyaltyPage.graphql"
#import "../Fragments/Refs/MyPages/AccountPage.graphql"
#import "../Fragments/AccountPage/Ref.graphql"
#import "../Fragments/ContentPage/Ref.graphql"
#import "../Fragments/HotelPage/Ref.graphql"
#import "../Fragments/LoyaltyPage/Ref.graphql"
#import "../Fragments/Footer/AppDownloads.graphql"
#import "../Fragments/Footer/SocialMedia.graphql"

View File

@@ -1,4 +1,4 @@
#import "../Fragments/Refs/System.graphql"
#import "../Fragments/System.graphql"
#import "../Fragments/PageLink/AccountPageLink.graphql"
#import "../Fragments/PageLink/ContentPageLink.graphql"
@@ -7,10 +7,10 @@
#import "../Fragments/Blocks/Card.graphql"
#import "../Fragments/Blocks/Refs/Card.graphql"
#import "../Fragments/Refs/ContentPage/ContentPage.graphql"
#import "../Fragments/Refs/HotelPage/HotelPage.graphql"
#import "../Fragments/Refs/LoyaltyPage/LoyaltyPage.graphql"
#import "../Fragments/Refs/MyPages/AccountPage.graphql"
#import "../Fragments/AccountPage/Ref.graphql"
#import "../Fragments/ContentPage/Ref.graphql"
#import "../Fragments/HotelPage/Ref.graphql"
#import "../Fragments/LoyaltyPage/Ref.graphql"
query GetHeader($locale: String!) {
all_header(limit: 1, locale: $locale) {

View File

@@ -1,8 +1,8 @@
query GetHotelPage($locale: String!, $uid: String!) {
hotel_page(locale: $locale, uid: $uid) {
hotel_page_id
url
title
url
content {
... on HotelPageContentUpcomingActivitiesCard {
__typename
@@ -35,37 +35,25 @@ query GetHotelPage($locale: String!, $uid: String!) {
}
query GetDaDeEnUrlsHotelPage($uid: String!) {
de: all_hotel_page(where: { uid: $uid }, locale: "de") {
items {
url
}
de: hotel_page(locale: "de", uid: $uid) {
url
}
en: all_hotel_page(where: { uid: $uid }, locale: "en") {
items {
url
}
en: hotel_page(locale: "en", uid: $uid) {
url
}
da: all_hotel_page(where: { uid: $uid }, locale: "da") {
items {
url
}
da: hotel_page(locale: "da", uid: $uid) {
url
}
}
query GetFiNoSvUrlsHotelPage($uid: String!) {
fi: all_hotel_page(where: { uid: $uid }, locale: "fi") {
items {
url
}
fi: hotel_page(locale: "fi", uid: $uid) {
url
}
no: all_hotel_page(where: { uid: $uid }, locale: "no") {
items {
url
}
no: hotel_page(locale: "no", uid: $uid) {
url
}
sv: all_hotel_page(where: { uid: $uid }, locale: "sv") {
items {
url
}
sv: hotel_page(locale: "sv", uid: $uid) {
url
}
}

View File

@@ -1,372 +0,0 @@
#import "../Fragments/Image.graphql"
#import "../Fragments/Blocks/Card.graphql"
#import "../Fragments/Blocks/LoyaltyCard.graphql"
#import "../Fragments/Blocks/Refs/Card.graphql"
#import "../Fragments/Blocks/Refs/LoyaltyCard.graphql"
#import "../Fragments/PageLink/AccountPageLink.graphql"
#import "../Fragments/PageLink/ContentPageLink.graphql"
#import "../Fragments/PageLink/LoyaltyPageLink.graphql"
#import "../Fragments/Refs/MyPages/AccountPage.graphql"
#import "../Fragments/Refs/ContentPage/ContentPage.graphql"
#import "../Fragments/Refs/LoyaltyPage/LoyaltyPage.graphql"
#import "../Fragments/Refs/System.graphql"
query GetLoyaltyPage($locale: String!, $uid: String!) {
loyalty_page(uid: $uid, locale: $locale) {
blocks {
... on LoyaltyPageBlocksShortcuts {
__typename
shortcuts {
title
preamble
shortcuts {
text
open_in_new_tab
linkConnection {
edges {
node {
...LoyaltyPageLink
...ContentPageLink
...AccountPageLink
}
}
totalCount
}
}
}
}
... on LoyaltyPageBlocksDynamicContent {
__typename
dynamic_content {
title
subtitle
component
link {
text
pageConnection {
edges {
node {
...ContentPageLink
...LoyaltyPageLink
}
}
totalCount
}
}
}
}
... on LoyaltyPageBlocksContent {
__typename
content {
content {
json
embedded_itemsConnection {
edges {
node {
__typename
...LoyaltyPageLink
...ContentPageLink
...AccountPageLink
...Image
... on ImageContainer {
title
image_left
image_right
system {
uid
}
}
}
}
totalCount
}
}
}
}
... on LoyaltyPageBlocksCardsGrid {
__typename
cards_grid {
title
preamble
layout
theme
cardConnection(limit: 10) {
edges {
node {
__typename
...CardBlock
...LoyaltyCardBlock
}
}
}
}
}
}
title
heading
preamble
hero_image
sidebar {
__typename
... on LoyaltyPageSidebarDynamicContent {
dynamic_content {
component
}
}
... on LoyaltyPageSidebarJoinLoyaltyContact {
join_loyalty_contact {
title
preamble
button {
cta_text
external_link {
title
href
}
open_in_new_tab
linkConnection {
edges {
node {
__typename
...AccountPageLink
...ContentPageLink
...LoyaltyPageLink
}
}
}
}
contact {
... on LoyaltyPageSidebarJoinLoyaltyContactBlockContactContact {
__typename
contact {
display_text
contact_field
footnote
}
}
}
}
}
... on LoyaltyPageSidebarContent {
content {
content {
json
embedded_itemsConnection {
edges {
node {
__typename
...Image
...LoyaltyPageLink
...ContentPageLink
}
}
totalCount
}
}
}
}
}
system {
uid
created_at
updated_at
locale
}
}
}
query GetLoyaltyPageRefs($locale: String!, $uid: String!) {
loyalty_page(locale: $locale, uid: $uid) {
blocks {
... on LoyaltyPageBlocksShortcuts {
__typename
shortcuts {
shortcuts {
linkConnection {
edges {
node {
__typename
...AccountPageRef
...ContentPageRef
...LoyaltyPageRef
}
}
}
}
}
}
... on LoyaltyPageBlocksDynamicContent {
__typename
dynamic_content {
link {
pageConnection {
edges {
node {
__typename
...ContentPageRef
...LoyaltyPageRef
}
}
}
}
}
}
... on LoyaltyPageBlocksContent {
__typename
content {
content {
embedded_itemsConnection {
edges {
node {
# No fragments used since we want to include __typename for each type to avoid fetching SystemAsset
... on ContentPage {
__typename
system {
...System
}
}
... on LoyaltyPage {
__typename
system {
...System
}
}
... on AccountPage {
__typename
system {
...System
}
}
... on ImageContainer {
__typename
system {
...System
}
}
}
}
}
}
}
}
... on LoyaltyPageBlocksCardsGrid {
__typename
cards_grid {
cardConnection(limit: 10) {
edges {
node {
...CardBlockRef
...LoyaltyCardBlockRef
}
}
}
}
}
}
sidebar {
... on LoyaltyPageSidebarContent {
__typename
content {
content {
embedded_itemsConnection {
edges {
node {
# No fragments used since we want to include __typename for each type to avoid fetching SystemAsset
... on ContentPage {
__typename
system {
...System
}
}
... on LoyaltyPage {
__typename
system {
...System
}
}
}
}
}
}
}
}
... on LoyaltyPageSidebarJoinLoyaltyContact {
__typename
join_loyalty_contact {
button {
linkConnection {
edges {
node {
__typename
...AccountPageRef
...ContentPageRef
...LoyaltyPageRef
}
}
}
}
}
}
}
system {
...System
}
}
}
query GetDaDeEnUrlsLoyaltyPage($uid: String!) {
de: all_loyalty_page(where: { uid: $uid }, locale: "de") {
items {
web {
original_url
}
url
}
}
en: all_loyalty_page(where: { uid: $uid }, locale: "en") {
items {
web {
original_url
}
url
}
}
da: all_loyalty_page(where: { uid: $uid }, locale: "da") {
items {
web {
original_url
}
url
}
}
}
query GetFiNoSvUrlsLoyaltyPage($uid: String!) {
sv: all_loyalty_page(where: { uid: $uid }, locale: "sv") {
items {
web {
original_url
}
url
}
}
no: all_loyalty_page(where: { uid: $uid }, locale: "no") {
items {
web {
original_url
}
url
}
}
fi: all_loyalty_page(where: { uid: $uid }, locale: "fi") {
items {
web {
original_url
}
url
}
}
}

View File

@@ -0,0 +1,99 @@
#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
}
}
}
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
}
}

View File

@@ -1,9 +1,10 @@
#import "../Fragments/Image.graphql"
#import "../../Fragments/Image.graphql"
#import "../../Fragments/System.graphql"
query GetLoyaltyPageMetaData($locale: String!, $uid: String!) {
loyalty_page(locale: $locale, uid: $uid) {
system {
uid
...System
}
web {
seo_metadata {

View File

@@ -1,4 +1,4 @@
#import "../Fragments/Refs/System.graphql"
#import "../Fragments/System.graphql"
query ResolveEntryByUrl($locale: String!, $url: String!) {
all_account_page(where: { url: $url }, locale: $locale) {