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
86 lines
1.5 KiB
TypeScript
86 lines
1.5 KiB
TypeScript
import { gql } from "graphql-tag"
|
|
|
|
import { Video } from "../Video.graphql"
|
|
|
|
const VideoQuoteCard = gql`
|
|
fragment VideoQuoteCard on VideoQuoteCard {
|
|
video {
|
|
...Video
|
|
}
|
|
style
|
|
quote
|
|
author
|
|
author_description
|
|
}
|
|
${Video}
|
|
`
|
|
|
|
const VideoTextCard = gql`
|
|
fragment VideoTextCard on VideoTextCard {
|
|
video {
|
|
...Video
|
|
}
|
|
style
|
|
heading
|
|
text
|
|
}
|
|
${Video}
|
|
`
|
|
|
|
export const VideoCard_ContentPage = gql`
|
|
fragment VideoCard_ContentPage on ContentPageBlocksVideoCard {
|
|
__typename
|
|
video_card {
|
|
video_cardConnection {
|
|
edges {
|
|
node {
|
|
__typename
|
|
...VideoQuoteCard
|
|
...VideoTextCard
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
${VideoQuoteCard}
|
|
${VideoTextCard}
|
|
`
|
|
|
|
export const VideoCard_CollectionPage = gql`
|
|
fragment VideoCard_CollectionPage on CollectionPageBlocksVideoCard {
|
|
__typename
|
|
video_card {
|
|
video_cardConnection {
|
|
edges {
|
|
node {
|
|
__typename
|
|
...VideoQuoteCard
|
|
...VideoTextCard
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
${VideoQuoteCard}
|
|
${VideoTextCard}
|
|
`
|
|
|
|
export const VideoCard_StartPage = gql`
|
|
fragment VideoCard_StartPage on StartPageBlocksVideoCard {
|
|
__typename
|
|
video_card {
|
|
video_cardConnection {
|
|
edges {
|
|
node {
|
|
__typename
|
|
...VideoQuoteCard
|
|
...VideoTextCard
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
${VideoQuoteCard}
|
|
${VideoTextCard}
|
|
`
|