feat(WEB-205, WEB-206): get breadcrumbs for my pages from contentstack
This commit is contained in:
@@ -11,6 +11,7 @@ import type { Endpoint } from "./endpoints"
|
||||
export { endpoints } from "./endpoints"
|
||||
|
||||
const defaultOptions: RequestInit = {
|
||||
cache: "no-store",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
|
||||
20
lib/graphql/Fragments/MyPages/Breadcrumbs.graphql
Normal file
20
lib/graphql/Fragments/MyPages/Breadcrumbs.graphql
Normal file
@@ -0,0 +1,20 @@
|
||||
fragment Breadcrumbs on AccountPage {
|
||||
breadcrumbs {
|
||||
title
|
||||
parents: parentsConnection {
|
||||
edges {
|
||||
node {
|
||||
... on AccountPage {
|
||||
breadcrumbs {
|
||||
title
|
||||
}
|
||||
system {
|
||||
uid
|
||||
}
|
||||
url
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
13
lib/graphql/Query/BreadcrumbsMyPages.graphql
Normal file
13
lib/graphql/Query/BreadcrumbsMyPages.graphql
Normal 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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user