Feat(SW-3708): refactor contentstack fetching (removing all refs) and cache invalidation * Remove all REFS * Revalidate correct language * PR fixes * PR fixes * Throw when errors from contentstack api Approved-by: Joakim Jäderberg
69 lines
1.7 KiB
TypeScript
69 lines
1.7 KiB
TypeScript
import { gql } from "graphql-tag"
|
|
|
|
import { Accordion_AccountPage } from "../../Fragments/Blocks/Accordion.graphql"
|
|
import { DynamicContent_AccountPage } from "../../Fragments/Blocks/DynamicContent.graphql"
|
|
import { Shortcuts_AccountPage } from "../../Fragments/Blocks/Shortcuts.graphql"
|
|
import { TextContent_AccountPage } from "../../Fragments/Blocks/TextContent.graphql"
|
|
import { System } from "../../Fragments/System.graphql"
|
|
|
|
export const GetAccountPage = gql`
|
|
query GetAccountPage($locale: String!, $uid: String!) {
|
|
account_page(locale: $locale, uid: $uid) {
|
|
heading
|
|
preamble
|
|
hero_image
|
|
hero_image_active
|
|
title
|
|
url
|
|
content {
|
|
__typename
|
|
...Accordion_AccountPage
|
|
...DynamicContent_AccountPage
|
|
...Shortcuts_AccountPage
|
|
...TextContent_AccountPage
|
|
}
|
|
system {
|
|
...System
|
|
created_at
|
|
updated_at
|
|
}
|
|
}
|
|
trackingProps: account_page(locale: "en", uid: $uid) {
|
|
url
|
|
}
|
|
}
|
|
${System}
|
|
${Accordion_AccountPage}
|
|
${DynamicContent_AccountPage}
|
|
${Shortcuts_AccountPage}
|
|
${TextContent_AccountPage}
|
|
`
|
|
|
|
export const GetDaDeEnUrlsAccountPage = gql`
|
|
query GetDaDeEnUrlsAccountPage($uid: String!) {
|
|
de: account_page(locale: "de", uid: $uid) {
|
|
url
|
|
}
|
|
en: account_page(locale: "en", uid: $uid) {
|
|
url
|
|
}
|
|
da: account_page(locale: "da", uid: $uid) {
|
|
url
|
|
}
|
|
}
|
|
`
|
|
|
|
export const GetFiNoSvUrlsAccountPage = gql`
|
|
query GetFiNoSvUrlsAccountPage($uid: String!) {
|
|
fi: account_page(locale: "fi", uid: $uid) {
|
|
url
|
|
}
|
|
no: account_page(locale: "no", uid: $uid) {
|
|
url
|
|
}
|
|
sv: account_page(locale: "sv", uid: $uid) {
|
|
url
|
|
}
|
|
}
|
|
`
|