Files
web/lib/graphql/Query/LoyaltyPage.graphql
2024-07-15 13:35:36 +02:00

366 lines
8.2 KiB
GraphQL

#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/LoyaltyPage/Breadcrumbs.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.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
...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
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
}
}
}
}
}
...LoyaltyPageBreadcrumbs
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 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
}
}
}