feat(SW-285): Ship support for ContentPageBlocksContent

This commit is contained in:
Chuma McPhoy
2024-08-30 08:10:57 +02:00
parent b806824fde
commit 9a51cc6cb5
9 changed files with 198 additions and 13 deletions

View File

@@ -1,5 +1,40 @@
#import "../Fragments/PageLink/AccountPageLink.graphql"
#import "../Fragments/PageLink/ContentPageLink.graphql"
#import "../Fragments/PageLink/LoyaltyPageLink.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
# TODO: Link HotelPage
# ...Image
# ... on ImageContainer {
# title
# image_left
# image_right
# system {
# uid
# }
# }
}
}
totalCount
}
json
}
}
}
}
title
header {
heading
@@ -15,6 +50,48 @@ query GetContentPage($locale: String!, $uid: String!) {
}
}
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
}
}
}
}
}
}
}
}
}
system {
...System
}
}
}
query GetDaDeEnUrlsContentPage($uid: String!) {
de: all_content_page(where: { uid: $uid }, locale: "de") {
items {