feat(WEB-205, WEB-206): get breadcrumbs for my pages from contentstack

This commit is contained in:
Simon Emanuelsson
2024-04-16 12:42:44 +02:00
parent b60f5c3858
commit b2e992c69a
31 changed files with 291 additions and 139 deletions

View File

@@ -11,6 +11,7 @@ import type { Endpoint } from "./endpoints"
export { endpoints } from "./endpoints"
const defaultOptions: RequestInit = {
cache: "no-store",
headers: {
"Content-Type": "application/json",
},

View File

@@ -0,0 +1,20 @@
fragment Breadcrumbs on AccountPage {
breadcrumbs {
title
parents: parentsConnection {
edges {
node {
... on AccountPage {
breadcrumbs {
title
}
system {
uid
}
url
}
}
}
}
}
}

View File

@@ -0,0 +1,13 @@
#import "../Fragments/MyPages/Breadcrumbs.graphql"
query GetMyPagesBreadcrumbs($locale: String!, $url: String!) {
all_account_page(locale: $locale, where: { url: $url }) {
items {
...Breadcrumbs
system {
uid
}
}
total
}
}