feat: create blocks component for loyalty

This commit is contained in:
Christel Westerberg
2024-04-22 09:54:24 +02:00
parent 3a0c8610dc
commit fc0e5aed02
17 changed files with 193 additions and 149 deletions

View File

@@ -1,57 +1,71 @@
#import "../Fragments/Image.graphql"
#import "../Fragments/PageLink/AccountPageLink.graphql"
#import "../Fragments/PageLink/ContentPageLink.graphql"
#import "../Fragments/PageLink/LoyaltyPageLink.graphql"
query GetLoyaltyPage($locale: String!, $url: String!) {
all_loyalty_page(where: { url: $url, locale: $locale }) {
items {
content {
... on LoyaltyPageContentLoyaltyLevels {
blocks {
... on LoyaltyPageBlocksDynamicContent {
__typename
loyalty_levels {
heading
sub_heading
level_card {
loyalty_level
dynamic_content {
title
preamble
component
link {
text
pageConnection {
edges {
node {
...ContentPageLink
...LoyaltyPageLink
}
}
}
}
}
}
... on LoyaltyPageContentCardGrid {
... on LoyaltyPageBlocksCardGrid {
__typename
card_grid {
heading
subheading
preamble
cards {
referenceConnection {
edges {
node {
... on LoyaltyPage {
system {
locale
uid
}
url
title
}
... on ContentPage {
system {
locale
uid
}
url
title
}
... on AccountPage {
system {
locale
uid
}
url
title
}
__typename
...LoyaltyPageLink
...ContentPageLink
...AccountPageLink
}
}
}
heading
subheading
preamble
}
}
}
... on LoyaltyPageBlocksContent {
__typename
content {
content {
json
embedded_itemsConnection {
edges {
node {
... on SysAsset {
title
url
dimension {
width
height
}
}
}
}
}
}
}
}
@@ -62,6 +76,7 @@ query GetLoyaltyPage($locale: String!, $url: String!) {
__typename
join_loyalty_contact {
title
preamble
contact {
... on LoyaltyPageSidebarJoinLoyaltyContactBlockContactContact {
__typename
@@ -71,17 +86,6 @@ query GetLoyaltyPage($locale: String!, $url: String!) {
}
}
login_button_text
body {
json
embedded_itemsConnection(limit: 30) {
edges {
node {
__typename
...Image
}
}
}
}
}
}
... on LoyaltyPageSidebarContent {
@@ -92,6 +96,7 @@ query GetLoyaltyPage($locale: String!, $url: String!) {
embedded_itemsConnection {
edges {
node {
__typename
...Image
}
}
@@ -108,24 +113,6 @@ query GetLoyaltyPage($locale: String!, $url: String!) {
title
}
}
seo_metadata {
description
title
imageConnection {
edges {
node {
file_size
filename
dimension {
height
width
}
url
title
}
}
}
}
}
system {
uid