feat(SW-497): added link and refs to site config

This commit is contained in:
Erik Tiekstra
2024-10-18 09:02:23 +02:00
parent c8d4f6c47c
commit 62b9a66569
7 changed files with 227 additions and 12 deletions

View File

@@ -3,6 +3,11 @@
#import "./PageLink/HotelPageLink.graphql"
#import "./PageLink/LoyaltyPageLink.graphql"
#import "./AccountPage/Ref.graphql"
#import "./ContentPage/Ref.graphql"
#import "./HotelPage/Ref.graphql"
#import "./LoyaltyPage/Ref.graphql"
fragment Alert on Alert {
type
heading
@@ -12,6 +17,21 @@ fragment Alert on Alert {
phone_number
footnote
}
has_link
link {
title
linkConnection {
edges {
node {
__typename
...AccountPageLink
...ContentPageLink
...HotelPageLink
...LoyaltyPageLink
}
}
}
}
has_sidepeek_button
sidepeek_button {
cta_text
@@ -34,3 +54,35 @@ fragment Alert on Alert {
}
}
}
fragment AlertRef on Alert {
link {
linkConnection {
edges {
node {
__typename
...AccountPageRef
...ContentPageRef
...HotelPageRef
...LoyaltyPageRef
}
}
}
}
sidepeek_content {
content {
embedded_itemsConnection {
edges {
node {
__typename
...AccountPageRef
...ContentPageRef
...HotelPageRef
...LoyaltyPageRef
}
}
}
json
}
}
}

View File

@@ -1,3 +1,5 @@
#import "../Fragments/System.graphql"
#import "../Fragments/Alert.graphql"
query GetSiteConfig($locale: String!) {
@@ -16,3 +18,22 @@ query GetSiteConfig($locale: String!) {
}
}
}
query GetSiteConfigRef($locale: String!) {
all_site_config(limit: 1, locale: $locale) {
items {
sitewide_alert {
alertConnection {
edges {
node {
...AlertRef
}
}
}
}
system {
...System
}
}
}
}