-
Notifications
You must be signed in to change notification settings - Fork 2
Flexible Page Block Queries
JenDiamond edited this page Jun 28, 2022
·
3 revisions
Paste into https://test-craft.library.ucla.edu/admin/graphiql
It returns: https://github.com/UCLALibrary/library-website-nuxt/wiki/Article-Page-Query-Return
This has the correct return for: Flexible/BlockAssociatedTopicCardsFragment.gql
This has the correct return for: Flexible/BlockImpactNumbersCarouselFragment.gql
The return for this is working in the Craft graphiql but then is not working on the page. Flexible/BlockHighlightFragment.gql
(There may be some tweaking but they are pretty close.)
The stories are are not using the data as it really exists.
Flexible/BlockAssociatedTopicCardsFragment.gql
Flexible/BlockImpactNumbersCarouselFragment.gql
Flexible/BlockHighlightFragment.gql
query ArticleNewsDetail {
entry(section: "article", slug: "turtles") {
... on article_article_Entry {
id
articleType
title
text: summary
dateCreated
heroImage {
... on heroImage_heroImage_BlockType {
id
image {
...Image
}
}
}
category: articleCategories {
id
title
uri
}
byline: staffMember {
id
... on staffMember_staffMember_Entry {
id
nameFirst
nameLast
fullName
}
}
locations: associatedLocations {
id
title
to: uri
... on location_location_Entry {
id
email
}
}
department {
id
title
uri
}
associatedStaffMember {
... on staffMember_staffMember_Entry {
id
email
phone: phoneNumber
jobTitle: staffMemberJobTitle
nameFirst
nameLast
to: slug
consultation: bookAConsultation
departments: staffDepartment(orderBy: "level") {
id
title
}
locations: staffAssociatedLocations {
id
title
to: slug
}
image: staffPortrait {
...Image
}
}
}
allFpb {
... on allFpb_associatedTopicCards_BlockType {
id
title: titleGeneral
summary: plainText
associatedTopicsFlexiblePageBlock {
... on associatedTopicsFlexiblePageBlock_associatedTopics_BlockType {
typeHandle
topics {
title
... on externalResource_externalResource_Entry {
title
summary
uri
url
}
... on generalContentPage_generalContentPage_Entry {
title
summary
uri
}
... on helpTopic_helpTopic_Entry {
title
summary
uri
}
... on serviceOrResource_serviceOrResource_Entry {
title
summary
uri
url
}
... on workshopOrEventSeries_workshopOrEventSeries_Entry {
title
summary
uri
}
}
}
}
}
... on allFpb_bannerFeatured_BlockType {
id
title
typeHandle
uri
status
}
... on allFpb_cardWithImage_BlockType {
id
title
typeHandle
uri
cardWithImage {
... on cardWithImage_cardWithImage_BlockType {
id
uri
summary
title
typeHandle
dateOrAuthor
dateCreated
articleEventOrExhibit {
title
uri
typeHandle
prev {
title
uri
author {
fullName
}
}
next {
uri
title
}
author {
fullName
}
}
cardTitle
image {
id
}
}
}
slug
}
... on allFpb_form_BlockType {
id
slug
title
form
dateCreated
uri
typeHandle
}
... on allFpb_highlight_BlockType {
id
typeHandle
highlight {
... on highlight_highlight_BlockType {
id
title
to: uri
prompt: buttonText
text: summary
location {
title
uri
... on workshopOrEventSeries_workshopOrEventSeries_Entry {
id
title
summary
author {
fullName
}
}
... on event_event_Entry {
id
title
uri
}
}
image {
...Image
}
dateOrAuthor
articleEventOrExhibit {
title
uri
author {
dateCreated
fullName
}
}
}
}
}
... on allFpb_impactNumbersCarousel_BlockType {
id
typeHandle
impactNumbersCarousel {
... on impactNumbersCarousel_impactNumbersCarousel_BlockType {
largeText: impactNumber
mediumText: impactText
smallDescriptor: summary
image {
...Image
}
}
}
}
... on allFpb_mediaGallery_BlockType {
uri
title
typeHandle
status
summary
}
... on allFpb_mediaWithText_BlockType {
id
dateCreated
title
typeHandle
uri
status
summary
}
... on allFpb_pullQuote_BlockType {
id
uri
typeHandle
slug
status
title
language
pullQuote {
... on pullQuote_pullQuote_BlockType {
id
}
}
}
... on allFpb_richText_BlockType {
id
uri
typeHandle
title
richText
}
... on allFpb_simpleCards_BlockType {
id
dateCreated
uri
typeHandle
simpleCards {
... on simpleCards_internalServiceOrResource_BlockType {
id
title
typeHandle
uri
dateCreated
}
... on simpleCards_externalServiceOrResource_BlockType {
id
title
uri
typeHandle
dateCreated
}
}
}
... on allFpb_callToAction_BlockType {
id
uri
title
typeHandle
callToAction {
... on callToAction_callToAction_BlockType {
id
uri
typeHandle
title
titleCta
dateCreated
}
}
}
}
}
allFpb {
... on allFpb_form_BlockType {
id
title
form
}
}
}
}
fragment Image on AssetInterface {
id
src: url(transform: "fullscreen")
height(transform: "fullscreen")
width(transform: "fullscreen")
srcset(sizes: ["375", "960", "1280", "1920", "2560"])
alt: title
focalPoint
}