refactor: reuse query code for both loyalty and account pages

This commit is contained in:
Matilda Landström
2024-05-27 16:13:44 +02:00
parent 0b694f6a74
commit fb4fbb1cbd
9 changed files with 150 additions and 271 deletions

View File

@@ -2,7 +2,7 @@
#import "../Fragments/Refs/Breadcrumbs.graphql"
query GetAccountPageBreadcrumbs($locale: String!, $url: String!) {
all_account_page(locale: $locale, where: { url: $url }) {
all_page: all_account_page(locale: $locale, where: { url: $url }) {
items {
...AccountPageBreadcrumbs
system {
@@ -13,7 +13,7 @@ query GetAccountPageBreadcrumbs($locale: String!, $url: String!) {
}
query GetAccountPageBreadcrumbsRefs($locale: String!, $url: String!) {
all_account_page(locale: $locale, where: { url: $url }) {
all_page: all_account_page(locale: $locale, where: { url: $url }) {
items {
...AccountPageBreadcrumbsRefs
}

View File

@@ -2,7 +2,7 @@
#import "../Fragments/Refs/Breadcrumbs.graphql"
query GetLoyaltyPageBreadcrumbs($locale: String!, $url: String!) {
all_loyalty_page(locale: $locale, where: { url: $url }) {
all_page: all_loyalty_page(locale: $locale, where: { url: $url }) {
items {
...LoyaltyPageBreadcrumbs
system {
@@ -13,7 +13,7 @@ query GetLoyaltyPageBreadcrumbs($locale: String!, $url: String!) {
}
query GetLoyaltyPageBreadcrumbsRefs($locale: String!, $url: String!) {
all_loyalty_page(locale: $locale, where: { url: $url }) {
all_page: all_loyalty_page(locale: $locale, where: { url: $url }) {
items {
...LoyaltyPageBreadcrumbsRefs
}