generated from UCLALibrary/nuxt3-starter-template
-
Notifications
You must be signed in to change notification settings - Fork 0
FTVAArticleDetail Query for Craft
JenDiamond edited this page Sep 24, 2024
·
12 revisions
This is a useful tool https://www.convertsimple.com/convert-json-to-javascript/
In the Query variables section add this (or the slug you want to view):
{"slug": "test-coronae-borealis-nova"}
If you don't need the Flexible Page Blocks just delete or comment out the ...AllFtvaFpb and delete all the fragments except for Image.
You can copy everything below into craft and get the query:
query FTVAArticleDetail($slug: [String!]) {
ftvaArticle: entry(section: "ftvaArticle", slug: $slug) {
id
typeHandle
postDate
title
slug
uri
imageCarousel {
... on imageCarousel_imageCarousel_BlockType {
image {
...Image
}
creditText
}
}
# CardMeta
articleCategories {
title
}
contributors {
... on contributors_externalContributor_BlockType {
byline
contributor
}
externalContributor {
id
byline
contributor
}
}
aboutTheAuthor
# SectionTeaserCard (Recent posts)
# Flexible Page Block Collection (FPBs)
...AllFpb
}
}
fragment AllFtvaFpb on ElementInterface {
blocks:allFtvaFpb {
typeHandle
... on allFtvaFpb_callToAction_BlockType {
... BlockCallToActionFragment
}
... on allFtvaFpb_contactInfo_BlockType {
... BlockContactInfoFragment
}
... on allFtvaFpb_form_BlockType {
... BlockFormFragment
}
... on allFtvaFpb_horizontalDivider_BlockType {
... BlockHorizontalDividerFragment
}
... on allFtvaFpb_impactNumberCards_BlockType {
... BlockImpactNumberCardsFragment
}
... on allFtvaFpb_mediaGallery_BlockType {
... BlockMediaGalleryFragment
}
... on allFtvaFpb_mediaWithText_BlockType {
... BlockMediaWithTextFragment
}
... on allFtvaFpb_pullQuote_BlockType {
... BlockPullQuoteFragment
}
... on allFtvaFpb_richText_BlockType {
... BlockRichTextFragment
}
... on allFtvaFpb_simpleCards_BlockType {
... BlockSimpleCardsFragment
}
... on allFtvaFpb_textColumns_BlockType {
... BlockTextColumnsFragment
}
}
}
fragment Image on AssetInterface {
id
src: url(transform: "fullscreen")
height(transform: "fullscreen")
width(transform: "fullscreen")
srcset(sizes: ["375", "960", "1280", "1920", "2560"])
alt: altText
focalPoint
}
fragment MediaAsset on AssetInterface {
dataId: id
src: url(transform: "fullscreen")
srcset(sizes: ["375", "960", "1280", "1920", "2560"])
height(transform: "fullscreen")
width(transform: "fullscreen")
title
focalPoint
kind
type: mimeType
alt: altText
}
fragment BlockCallToActionFragment on ElementInterface {
id
typeHandle
callToAction {
... on callToAction_callToAction_BlockType {
id
titleCta
summary
icon
buttonText
buttonUrl: buttonLink
backgroundColor
}
}
}
fragment BlockContactInfoFragment on ElementInterface {
id
typeHandle
contactInfo {
... on contactInfo_contactInfo_BlockType {
id
}
}
}
fragment BlockFormFragment on ElementInterface {
id
form
typeHandle
sectionTitle: titleGeneral
sectionSummary: summary
}
fragment BlockHorizontalDividerFragment on ElementInterface {
id
typeHandle
horizontalDivider
}
fragment BlockImpactNumberCardsFragment on ElementInterface {
id
typehandle
sectionSummary: summary
sectionTitle: titleGeneral
impactNumberCards {
... on impactNumberCards_impactNumberCard_BlockType {
id
title: titleGeneral
text: description
impactNumber
}
}
... on impactReportFpb_impactNumberCards_BlockType {
id
typehandle
sectionSummary: summary
sectionTitle: titleGeneral
impactNumberCards {
... on impactNumberCards_impactNumberCard_BlockType {
id
title: titleGeneral
text: description
impactNumber
}
}
}
}
fragment BlockMediaGalleryFragment on ElementInterface {
dataId: id
sectionTitle: titleGeneral
sectionSummary: summary
mediaGalleryStyle
mediaGallery {
dataId: id
captionTitle: captionHeading
captionText: caption
altText
sortOrder
... on mediaGallery_image_BlockType {
item: imageFile {
...MediaAsset
}
}
... on mediaGallery_audio_BlockType {
item: audioFile {
...MediaAsset
}
embedCode: audioEmbedCode
coverImage {
...MediaAsset
}
}
... on mediaGallery_video_BlockType {
item: videoFile {
...MediaAsset
}
embedCode: embedCode
coverImage {
...MediaAsset
}
}
}
}
fragment BlockMediaWithTextFragment on ElementInterface {
dataId : id
typeHandle
sectionTitle: titleGeneral
sectionSummary: summary
mediaWithText {
... on mediaWithText_mediaEmbed_BlockType {
titleLink: titleEmbed
description
coverImage {
...MediaAsset
}
buttonText
buttonUrl
embedCode
typeMedia
}
... on mediaWithText_mediaUpload_BlockType {
titleUpload
description
buttonText
buttonUrl
coverImage {
...MediaAsset
}
item: upload {
...MediaAsset
}
typeMedia
}
}
}
fragment BlockPullQuoteFragment on ElementInterface {
id
typeHandle
pullQuote {
... on pullQuote_pullQuote_BlockType {
text
attribution
}
}
}
fragment BlockRichTextFragment on ElementInterface {
richText
typeHandle
sectionTitle: titleGeneral
}
fragment BlockSimpleCardsFragment on ElementInterface {
id
typeHandle
sectionTitle: titleGeneral
sectionSummary: summary
cards: simpleCards {
... on simpleCards_internalServiceOrResource_BlockType {
id
typeHandle
contentLink {
id
uri
slug
title
summary
externalResourceUrl
}
}
... on simpleCards_externalServiceOrResource_BlockType {
id
typeHandle
title: titleGeneral
summary
externalLink
}
}
}
fragment BlockTextColumnsFragment on ElementInterface {
id
typeHandle
sectionTitle: titleGeneral
sectionSummary: summary
textColumns {
titleHeading
mainText
}
}
{
data: {
ftvaArticle: {
title: "TEST - Coronae Borealis Nova",
imageCarousel: [
{
image: [
{
id: "3264676",
src: "https://static.library.ucla.edu/craftassetstest/FTVA/_fullscreen/T-Coronae-Borealis-nova.jpg",
height: 1426,
width: 2560,
srcset: "https://static.library.ucla.edu/craftassetstest/FTVA/_375xAUTO_crop_center-center_none/T-Coronae-Borealis-nova.jpg 375w, https://static.library.ucla.edu/craftassetstest/FTVA/_960xAUTO_crop_center-center_none/T-Coronae-Borealis-nova.jpg 960w, https://static.library.ucla.edu/craftassetstest/FTVA/_1280xAUTO_crop_center-center_none/T-Coronae-Borealis-nova.jpg 1280w, https://static.library.ucla.edu/craftassetstest/FTVA/_1920xAUTO_crop_center-center_none/T-Coronae-Borealis-nova.jpg 1920w, https://static.library.ucla.edu/craftassetstest/FTVA/_2560xAUTO_crop_center-center_none/T-Coronae-Borealis-nova.jpg 2560w",
alt: null,
focalPoint: [
0.5,
0.5
]
}
],
creditText: "Source: lanouvellerepublique.fr"
}
],
articleCategories: [
{
title: "Interview"
}
],
contributors: [
{
byline: "Contributed by",
contributor: "Vaonis"
}
],
aboutTheAuthor: "<p><strong><em><a href=\"https://vaonis.com/about-us\">Vaonis</a></em></strong> stemmed from a powerful ambition to revolutionize the practice of Astronomy and shake up its codes. We believe Astronomy should be more accessible to everyone. To achieve this, we had to follow unexplored pathways.</p>,
blocks: [
{
typeHandle: "callToAction",
id: "3266217",
callToAction: [
{
id: "3266218",
titleCta: "Blaze Star explosion expected to happen in September: How to see the rare nova event",
summary: "A star system 3,000 lightyears away is set to become visible to the naked eye this year, in an event that will see its apparent brightness temporarily increase.",
icon: "svg-call-to-action-find",
buttonText: "Read More",
buttonUrl: "https://www.skyatnightmagazine.com/space-science/t-coronae-borealis-nova",
backgroundColor: "false"
}
]
},
{
typeHandle: "contactInfo",
id: "3266219",
contactInfo: [
{
id: "3266220"
}
]
},
{
typeHandle: "horizontalDivider",
id: "3266221",
horizontalDivider: true
},
{
typeHandle: "impactNumberCards",
id: "3266222",
sectionSummary: "<h1>Astronomers Await Rare Nova Explosion</h1>",
sectionTitle: null,
impactNumberCards: [
{
id: "3266223",
title: "Light-years",
text: "Blaze Star, is a binary star and a recurrent nova about 3,000 light-years away in the constellation Corona Borealis.",
impactNumber: "3000"
},
{
id: "3266224",
title: "Magnitude",
text: "So bright it will be visible on Earth with the naked eye",
impactNumber: "10"
}
]
},
{
typeHandle: "mediaGallery",
dataId: "3266536",
sectionTitle: "Once every 80 years",
sectionSummary: "<p><em>If predictions are correct, a key outburst star could put on a show in early 2024.</em></p>",
mediaGallery: [
{
dataId: "3266537",
captionTitle: "Recurrent Nova",
captionText: "If predictions are correct, a key outburst star could put on a show in early 2024.",
sortOrder: 1,
item: [
{
dataId: "3266312",
src: "https://static.library.ucla.edu/craftassetstest/images/_fullscreen/Recurrent-nova_0-1.jpg",
srcset: "https://static.library.ucla.edu/craftassetstest/images/_375xAUTO_crop_center-center_none/Recurrent-nova_0-1.jpg 375w, https://static.library.ucla.edu/craftassetstest/images/_960xAUTO_crop_center-center_none/Recurrent-nova_0-1.jpg 960w, https://static.library.ucla.edu/craftassetstest/images/_1280xAUTO_crop_center-center_none/Recurrent-nova_0-1.jpg 1280w, https://static.library.ucla.edu/craftassetstest/images/_1920xAUTO_crop_center-center_none/Recurrent-nova_0-1.jpg 1920w, https://static.library.ucla.edu/craftassetstest/images/_2560xAUTO_crop_center-center_none/Recurrent-nova_0-1.jpg 2560w",
height: 1946,
width: 2560,
title: "Recurrent nova 0 1",
focalPoint: [
0.5,
0.5
],
kind: "image",
type: "image/jpeg",
alt: null
}
]
},
{
dataId: "3266538",
captionTitle: null,
captionText: "This finder chart covers about as much sky as the field of view in a typical pair of 7-power binoculars",
sortOrder: 2,
item: [
{
dataId: "3266330",
src: "https://static.library.ucla.edu/craftassetstest/images/_fullscreen/T-CrB-finder-ST-larger.jpg",
srcset: "https://static.library.ucla.edu/craftassetstest/images/_375xAUTO_crop_center-center_none/T-CrB-finder-ST-larger.jpg 375w, https://static.library.ucla.edu/craftassetstest/images/_960xAUTO_crop_center-center_none/T-CrB-finder-ST-larger.jpg 960w, https://static.library.ucla.edu/craftassetstest/images/_1280xAUTO_crop_center-center_none/T-CrB-finder-ST-larger.jpg 1280w, https://static.library.ucla.edu/craftassetstest/images/_1920xAUTO_crop_center-center_none/T-CrB-finder-ST-larger.jpg 1920w, https://static.library.ucla.edu/craftassetstest/images/_2560xAUTO_crop_center-center_none/T-CrB-finder-ST-larger.jpg 2560w",
height: 2301,
width: 2560,
title: "T Cr B finder ST larger",
focalPoint: [
0.5,
0.5
],
kind: "image",
type: "image/jpeg",
alt: null
}
]
}
]
},
{
typeHandle: "mediaWithText",
dataId: "3266539",
sectionTitle: "Coronae Borealis last made a splash just after World War II",
sectionSummary: "<p>Does its current restive state hint at an imminent outburst?</p>",
mediaWithText: [
{
titleLink: "Rare Stellar Explosion Will Ignite a “New Star”",
description: "The star system will become bright enough to see with the naked eye for several days before it dims again for about 80 years.",
coverImage: [
{
dataId: "3266535",
src: "https://static.library.ucla.edu/craftassetstest/_fullscreen/NASA-Accretion_Disk_Binary_System_ST.jpg",
srcset: "https://static.library.ucla.edu/craftassetstest/_375xAUTO_crop_center-center_none/NASA-Accretion_Disk_Binary_System_ST.jpg 375w, https://static.library.ucla.edu/craftassetstest/_960xAUTO_crop_center-center_none/NASA-Accretion_Disk_Binary_System_ST.jpg 960w, https://static.library.ucla.edu/craftassetstest/_1280xAUTO_crop_center-center_none/NASA-Accretion_Disk_Binary_System_ST.jpg 1280w, https://static.library.ucla.edu/craftassetstest/_1920xAUTO_crop_center-center_none/NASA-Accretion_Disk_Binary_System_ST.jpg 1920w, https://static.library.ucla.edu/craftassetstest/_2560xAUTO_crop_center-center_none/NASA-Accretion_Disk_Binary_System_ST.jpg 2560w",
height: 1682,
width: 2560,
title: "NASA Accretion Disk Binary System ST",
focalPoint: [
0.5,
0.5
],
kind: "image",
type: "image/jpeg",
alt: null
}
],
buttonText: null,
buttonUrl: null,
embedCode: "<p><iframe width=\"560\" height=\"315\" src=\"<a href=\"https://www.youtube.com/embed/ZIn_XDVTqmQ?si=1iP6WNczGZjUKz8X\" title=\"YouTube video player\"></a></p>,
typeMedia: "video"
}
]
},
{
typeHandle: "simpleCards",
id: "3266626",
sectionTitle: "Film Series about other stuff",
sectionSummary: "<p>There will always be something going on at the Hammer. Checkout these great series we have coming up.</p>",
cards: [
{
id: "3266627",
typeHandle: "internalServiceOrResource",
contentLink: [
{
id: "3260303",
uri: "series/a-film-series-for-you-celebrating-giant-robot-äôs-30th-anniversary",
slug: "a-film-series-for-you-celebrating-giant-robot-äôs-30th-anniversary",
title: "A Film Series for You: Celebrating Giant Robot’s 30th Anniversary"
}
]
},
{
id: "3266628",
typeHandle: "internalServiceOrResource",
contentLink: [
{
id: "3260317",
uri: "series/summer-sci-fi",
slug: "summer-sci-fi",
title: "Summer Sci-Fi"
}
]
},
{
id: "3266629",
typeHandle: "internalServiceOrResource",
contentLink: [
{
id: "3197229",
uri: "series/series-with-no-upcoming-events",
slug: "series-with-no-upcoming-events",
title: "Series with no upcoming events"
}
]
}
]
},
{
typeHandle: "pullQuote",
id: "3266541",
pullQuote: [
{
text: "<p>I alone am to blame for being remiss in my duties, nevertheless, I still have the feeling that T could have shown me more consideration<em>. </em>We had been friends for many years; on thousands of nights I had watched over it as it slept, and then it arose in my hour of weakness as I nodded at my post. I still am watching it but now it is with a wary eye. There is no warmth between us any more.</p>",
attribution: "Leslie C. Peltier"
}
]
},
{
typeHandle: "richText",
richText: "<p>The stars are behaving similarly to the way they did in the time leading up to the last explosion, so it will happen within the next few months.</p>\n<p>Imagine a star, typically visible only through a telescope, that might suddenly brighten so intensely it becomes visible to the naked eye, as if a brand new celestial body has emerged in the heavens. This is precisely what is about to happen with <strong>T Coronae Borealis</strong>, located 2,600 years away from our planet. Classified as <strong>symbiotic binary star</strong>, its luminosity undergoes fluctuations over time. These abrupt surges in brightness termed “novae” – Latin for “new” – manifest when the star erupts in brilliance beyond its radiance.</p>,
sectionTitle: "When will the star explosion happen?"
},
{
typeHandle: "textColumns",
id: "3266809",
sectionTitle: "Corona Borealis Constellation",
sectionSummary: "<p><span>The constellation has only four stars brighter than magnitude 3.00. It was first catalogued by the Greek astronomer Ptolemy in the 2nd century.</span><br /></p>",
textColumns: [
{
titleHeading: "Discovery",
mainText: "<p>Corona Borealis. It was <strong>first discovered in outburst in 1866 by John Birmingham, though it had been observed earlier as a 10th magnitude star</strong>.</p>"
},
{
titleHeading: "Facts, location and map",
mainText: "<p>Corona Borealis is the 73rd constellation in size, occupying an area of 179 square degrees. It lies in the third quadrant of the northern hemisphere (NQ3) and can be seen at latitudes between +90° and -50°. The neighboring constellations are <a href=\"https://www.constellation-guide.com/constellation-list/bootes-constellation/\">Boötes</a>, <a href=\"https://www.constellation-guide.com/constellation-list/hercules-constellation/\">Hercules</a>, and <a href=\"https://www.constellation-guide.com/constellation-list/serpens-constellation/\">Serpens Caput</a>.</p>
},
{
titleHeading: "Corona Borealis stars",
mainText: "<p><a href=\"https://www.star-facts.com/alphecca/\">Alpha Coronae Borealis</a> is the brightest of the seven stars that make up Ariadne’s crown. It is an eclipsing binary star classified as an EA variable, with a period of 17.36 days. The star has an apparent magnitude that varies between 2.21 and 2.32. It is approximately 75 light years distant.</p>
}
]
}
]
}
}
}