feat: add Account Page query
This commit is contained in:
4
lib/graphql/Fragments/MyPages/AccountPage.graphql
Normal file
4
lib/graphql/Fragments/MyPages/AccountPage.graphql
Normal file
@@ -0,0 +1,4 @@
|
||||
fragment AccountPage on AccountPage {
|
||||
title
|
||||
url
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
#import "./AccountPage.graphql"
|
||||
#import "./LoyaltyPage.graphql"
|
||||
|
||||
fragment AccountPageContentDynamicContent on AccountPageContentDynamicContent {
|
||||
dynamic_content {
|
||||
component
|
||||
title
|
||||
link {
|
||||
link_text
|
||||
linkConnection {
|
||||
edges {
|
||||
node {
|
||||
...LoyaltyPage
|
||||
...AccountPage
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
fragment AccountPageContentShortcuts on AccountPageContentShortcuts {
|
||||
shortcuts {
|
||||
title
|
||||
}
|
||||
}
|
||||
4
lib/graphql/Fragments/MyPages/LoyaltyPage.graphql
Normal file
4
lib/graphql/Fragments/MyPages/LoyaltyPage.graphql
Normal file
@@ -0,0 +1,4 @@
|
||||
fragment LoyaltyPage on LoyaltyPage {
|
||||
title
|
||||
url
|
||||
}
|
||||
16
lib/graphql/Query/AccountPage.graphql
Normal file
16
lib/graphql/Query/AccountPage.graphql
Normal file
@@ -0,0 +1,16 @@
|
||||
#import "../Fragments/MyPages/AccountPageContentDynamicContent.graphql"
|
||||
#import "../Fragments/MyPages/AccountPageContentShortcuts.graphql"
|
||||
|
||||
query GetAccountPage($locale: String!, $url: String!) {
|
||||
all_account_page(limit: 1, locale: $locale, where: { url: $url }) {
|
||||
items {
|
||||
url
|
||||
title
|
||||
content {
|
||||
__typename
|
||||
...AccountPageContentDynamicContent
|
||||
...AccountPageContentShortcuts
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user