feat(SW-186): Added refs and some extra querys

This commit is contained in:
Erik Tiekstra
2024-09-05 09:25:21 +02:00
parent 52fdc1daac
commit 55fdbc527b
11 changed files with 388 additions and 303 deletions

View File

@@ -1,22 +0,0 @@
#import "../PageLink/ContentPageLink.graphql"
#import "../PageLink/LoyaltyPageLink.graphql"
fragment InternalOrExternalLink on InternalOrExternalLink {
is_external_link
open_in_new_tab
external_link {
href
title
}
page_link {
linkConnection {
edges {
node {
...ContentPageLink
...LoyaltyPageLink
}
}
}
link_title
}
}

View File

@@ -5,4 +5,8 @@ fragment HotelPageLink on HotelPage {
}
title
url
# TODO: Might need to add this if this is needed for hotel pages.
# web {
# original_url
# }
}

View File

@@ -0,0 +1,48 @@
#import "../System.graphql"
fragment HotelPageBreadcrumbsRefs on HotelPage {
web {
breadcrumbs {
title
parentsConnection {
edges {
node {
... on ContentPage {
web {
breadcrumbs {
title
}
}
system {
...System
}
}
... on HotelPage {
web {
breadcrumbs {
title
}
}
system {
...System
}
}
... on LoyaltyPage {
web {
breadcrumbs {
title
}
}
system {
...System
}
}
}
}
}
}
}
system {
...System
}
}

View File

@@ -0,0 +1,7 @@
#import "../System.graphql"
fragment HotelPageRef on HotelPage {
system {
...System
}
}

View File

@@ -1,11 +1,17 @@
#import "../Fragments/Refs/System.graphql"
#import "../Fragments/Header/InternalOrExternalLink.graphql"
#import "../Fragments/PageLink/ContentPageLink.graphql"
#import "../Fragments/PageLink/LoyaltyPageLink.graphql"
#import "../Fragments/PageLink/AccountPageLink.graphql"
#import "../Fragments/PageLink/ContentPageLink.graphql"
#import "../Fragments/PageLink/HotelPageLink.graphql"
#import "../Fragments/PageLink/LoyaltyPageLink.graphql"
#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"
query GetHeader($locale: String!) {
all_header(limit: 1, locale: $locale) {
items {
@@ -15,6 +21,7 @@ query GetHeader($locale: String!) {
edges {
node {
...ContentPageLink
...HotelPageLink
...LoyaltyPageLink
}
}
@@ -26,6 +33,7 @@ query GetHeader($locale: String!) {
edges {
node {
...ContentPageLink
...HotelPageLink
...LoyaltyPageLink
}
}
@@ -36,6 +44,7 @@ query GetHeader($locale: String!) {
edges {
node {
...ContentPageLink
...HotelPageLink
...LoyaltyPageLink
}
}
@@ -49,6 +58,7 @@ query GetHeader($locale: String!) {
edges {
node {
...ContentPageLink
...HotelPageLink
...LoyaltyPageLink
}
}
@@ -70,6 +80,59 @@ query GetHeader($locale: String!) {
query GetHeaderRef($locale: String!) {
all_header(limit: 1, locale: $locale) {
items {
top_link {
linkConnection {
edges {
node {
...ContentPageRef
...HotelPageRef
...LoyaltyPageRef
}
}
}
}
menu_items {
linkConnection {
edges {
node {
...ContentPageRef
...HotelPageRef
...LoyaltyPageRef
}
}
}
see_all_link {
linkConnection {
edges {
node {
...ContentPageRef
...HotelPageRef
...LoyaltyPageRef
}
}
}
}
submenu {
links {
linkConnection {
edges {
node {
...ContentPageRef
...HotelPageRef
...LoyaltyPageRef
}
}
}
}
}
cardConnection {
edges {
node {
...CardBlockRef
}
}
}
}
system {
...System
}