fix(SW-194): add accordion graphql request
This commit is contained in:
122
lib/graphql/Fragments/Blocks/Accordion.graphql
Normal file
122
lib/graphql/Fragments/Blocks/Accordion.graphql
Normal file
@@ -0,0 +1,122 @@
|
||||
#import "../PageLink/AccountPageLink.graphql"
|
||||
#import "../PageLink/ContentPageLink.graphql"
|
||||
#import "../PageLink/HotelPageLink.graphql"
|
||||
#import "../PageLink/LoyaltyPageLink.graphql"
|
||||
|
||||
#import "../AccountPage/Ref.graphql"
|
||||
#import "../ContentPage/Ref.graphql"
|
||||
#import "../HotelPage/Ref.graphql"
|
||||
#import "../LoyaltyPage/Ref.graphql"
|
||||
|
||||
fragment Accordion_ContentPage on ContentPageBlocksAccordion {
|
||||
__typename
|
||||
accordion {
|
||||
title
|
||||
faq {
|
||||
__typename
|
||||
...GlobalFaq
|
||||
...SpecificFaq
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fragment GlobalFaq on ContentPageBlocksAccordionBlockFaqGlobalFaq {
|
||||
__typename
|
||||
global_faq {
|
||||
global_faqConnection {
|
||||
edges {
|
||||
node {
|
||||
... on Accordion {
|
||||
__typename
|
||||
title
|
||||
questions {
|
||||
question
|
||||
answer {
|
||||
json
|
||||
embedded_itemsConnection {
|
||||
edges {
|
||||
node {
|
||||
__typename
|
||||
...ContentPageLink
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fragment SpecificFaq on ContentPageBlocksAccordionBlockFaqSpecificFaq {
|
||||
__typename
|
||||
specific_faq {
|
||||
questions {
|
||||
question
|
||||
answer {
|
||||
json
|
||||
embedded_itemsConnection {
|
||||
edges {
|
||||
node {
|
||||
__typename
|
||||
...ContentPageLink
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fragment Accordion_ContentPageRefs on ContentPageBlocksAccordion {
|
||||
accordion {
|
||||
faq {
|
||||
...GlobalFaqRefs
|
||||
...SpecificFaqRefs
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fragment GlobalFaqRefs on ContentPageBlocksAccordionBlockFaqGlobalFaq {
|
||||
global_faq {
|
||||
global_faqConnection {
|
||||
edges {
|
||||
node {
|
||||
... on Accordion {
|
||||
questions {
|
||||
answer {
|
||||
embedded_itemsConnection {
|
||||
edges {
|
||||
node {
|
||||
__typename
|
||||
...ContentPageRef
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fragment SpecificFaqRefs on ContentPageBlocksAccordionBlockFaqSpecificFaq {
|
||||
specific_faq {
|
||||
questions {
|
||||
answer {
|
||||
embedded_itemsConnection {
|
||||
edges {
|
||||
node {
|
||||
__typename
|
||||
...ContentPageRef
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
#import "../../Fragments/System.graphql"
|
||||
|
||||
#import "../../Fragments/Blocks/Accordion.graphql"
|
||||
#import "../../Fragments/Blocks/CardsGrid.graphql"
|
||||
#import "../../Fragments/Blocks/Content.graphql"
|
||||
#import "../../Fragments/Blocks/DynamicContent.graphql"
|
||||
@@ -23,6 +24,17 @@ query GetContentPage($locale: String!, $uid: String!) {
|
||||
preamble
|
||||
...NavigationLinks
|
||||
}
|
||||
blocks {
|
||||
__typename
|
||||
...CardsGrid_ContentPage
|
||||
...Content_ContentPage
|
||||
...DynamicContent_ContentPage
|
||||
...Shortcuts_ContentPage
|
||||
...Table_ContentPage
|
||||
...TextCols_ContentPage
|
||||
...UspGrid_ContentPage
|
||||
...Accordion_ContentPage
|
||||
}
|
||||
sidebar {
|
||||
__typename
|
||||
...ContentSidebar_ContentPage
|
||||
@@ -70,6 +82,7 @@ query GetContentPageRefs($locale: String!, $uid: String!) {
|
||||
}
|
||||
blocks {
|
||||
__typename
|
||||
...Accordion_ContentPageRefs
|
||||
...CardsGrid_ContentPageRefs
|
||||
...Content_ContentPageRefs
|
||||
...DynamicContent_ContentPageRefs
|
||||
|
||||
@@ -130,6 +130,7 @@ export async function request<T>(
|
||||
* version for one language, it throws an error which we have to recover
|
||||
* from here since it isn't an error.
|
||||
*/
|
||||
|
||||
return { data: error.response.data as T }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
export namespace ContentPageEnum {
|
||||
export namespace ContentStack {
|
||||
export const enum blocks {
|
||||
Accordion = "ContentPageBlocksAccordion",
|
||||
CardsGrid = "ContentPageBlocksCardsGrid",
|
||||
Content = "ContentPageBlocksContent",
|
||||
DynamicContent = "ContentPageBlocksDynamicContent",
|
||||
|
||||
Reference in New Issue
Block a user