feat: graphql client with fetches for initial pages
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
#import "../PageLinks.graphql"
|
||||
|
||||
fragment ListItem on CurrentBlocksPageBlocksListBlockListItemsListItem {
|
||||
list_item {
|
||||
list_item_style
|
||||
subtitle
|
||||
title
|
||||
}
|
||||
}
|
||||
|
||||
fragment ListItemExternalLink on CurrentBlocksPageBlocksListBlockListItemsListItemExternalLink {
|
||||
list_item_external_link {
|
||||
link {
|
||||
href
|
||||
title
|
||||
}
|
||||
list_item_style
|
||||
subtitle
|
||||
}
|
||||
}
|
||||
|
||||
fragment ListItemInternalLink on CurrentBlocksPageBlocksListBlockListItemsListItemInternalLink {
|
||||
list_item_internal_link {
|
||||
link_text
|
||||
list_item_style
|
||||
subtitle
|
||||
pageConnection {
|
||||
totalCount
|
||||
edges {
|
||||
node {
|
||||
...CurrentBlocksPageLink
|
||||
...TempPageLink
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fragment ListBlock on CurrentBlocksPageBlocksList {
|
||||
list {
|
||||
list_items {
|
||||
__typename
|
||||
...ListItem
|
||||
...ListItemExternalLink
|
||||
...ListItemInternalLink
|
||||
}
|
||||
title
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
#import "../PageLinks.graphql"
|
||||
|
||||
fragment PreambleBlock on CurrentBlocksPageBlocksPreamble {
|
||||
preamble {
|
||||
text {
|
||||
json
|
||||
embedded_itemsConnection(limit: 30) {
|
||||
edges {
|
||||
node {
|
||||
...CurrentBlocksPageLink
|
||||
...TempPageLink
|
||||
... on SysAsset {
|
||||
title
|
||||
url
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
#import "../Puff.graphql"
|
||||
|
||||
fragment PuffBlock on CurrentBlocksPageBlocksPuffs {
|
||||
puffs {
|
||||
# We have to manually add a limit since Contentstack handles its complexity calculation in a certain way
|
||||
puffsConnection(limit: 9) {
|
||||
totalCount
|
||||
edges {
|
||||
node {
|
||||
...Puff
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
#import "../PageLinks.graphql"
|
||||
|
||||
fragment TextBlock on CurrentBlocksPageBlocksText {
|
||||
text {
|
||||
content {
|
||||
embedded_itemsConnection {
|
||||
totalCount
|
||||
edges {
|
||||
node {
|
||||
...CurrentBlocksPageLink
|
||||
...TempPageLink
|
||||
... on SysAsset {
|
||||
title
|
||||
url
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
json
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user