Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sryan-mp/ecb09ecfb4e3bd8274ceee4d80d8a0b3 to your computer and use it in GitHub Desktop.
Save sryan-mp/ecb09ecfb4e3bd8274ceee4d80d8a0b3 to your computer and use it in GitHub Desktop.
Article template query
export const query = graphql`
query($id: String!) {
prismicArticle(id: { eq: $id }) {
_previewable
id
uid
type
data {
article_collection
article_type
main_image_size
sidebar_position
image {
url
alt
localFile {
childImageSharp {
gatsbyImageData
}
}
}
thumbnail {
alt
url
localFile {
childImageSharp {
gatsbyImageData
}
}
}
meta_description
intro_text
category {
uid
type
document {
... on PrismicArticleCategory {
data {
name
}
}
}
}
article_tags {
tag {
document {
... on PrismicArticleTag {
id
uid
type
data {
name
}
}
}
}
}
event_date
publish_date
title
intro_text
related_articles_title
related_articles {
article {
document {
... on PrismicArticle {
id
uid
type
data {
invisible
featured
author {
document {
... on PrismicPerson {
data {
name
}
}
}
}
intro_text
category {
document {
... on PrismicArticleCategory {
data {
name
}
}
}
}
publish_date
event_date
image {
alt
url
localFile {
childImageSharp {
gatsbyImageData
}
}
}
thumbnail {
alt
url
localFile {
childImageSharp {
gatsbyImageData
}
}
}
title
article_type
}
}
}
}
}
author {
document {
... on PrismicPerson {
data {
name
title
photo {
alt
url
localFile {
childImageSharp {
gatsbyImageData
}
}
}
}
}
}
}
collection_title
collection_icon {
alt
url
localFile {
childImageSharp {
gatsbyImageData
}
}
}
collection_start
collection_end
collection_link {
document {
... on PrismicArticle {
id
type
uid
data {
article_type
}
}
}
link_type
raw
}
collection_final
collection_category {
document {
... on PrismicCollectionCategory {
data {
name
}
}
}
}
body {
... on PrismicArticleBodyHeadline {
slice_type
primary {
text {
raw
}
}
}
... on PrismicArticleBodyText {
slice_type
primary {
text {
raw
}
}
}
... on PrismicArticleBodyPullQuote {
slice_type
primary {
quote
person
title1
}
}
... on PrismicArticleBodyDivider {
slice_type
id
}
... on PrismicArticleBodyStatistics {
slice_type
items {
body1
descriptor1
number
}
}
... on PrismicArticleBodyCodeSample {
slice_type
primary {
code
language
}
}
... on PrismicArticleBodyImage {
slice_type
primary {
alt_text
caption
image {
alt
url
localFile {
childImageSharp {
gatsbyImageData
}
}
}
}
}
... on PrismicArticleBodyLargeImage {
slice_type
primary {
alt_text
caption
image {
alt
url
localFile {
childImageSharp {
gatsbyImageData
}
}
}
}
}
... on PrismicArticleBodyForm {
slice_type
primary {
pardot_form
title1
text {
text
}
}
}
... on PrismicArticleBodyBanner {
slice_type
primary {
bannersnack
height
}
}
... on PrismicArticleBodyTriptych {
slice_type
id
primary {
title1
}
items {
title1
text {
raw
}
image1 {
alt
url
localFile {
childImageSharp {
gatsbyImageData
}
}
}
}
}
... on PrismicArticleBodyEmbed {
slice_type
id
primary {
caption
embed {
author_id
author_name
author_url
cache_age
description
embed_url
height
html
media_id
name
provider_name
provider_url
thumbnail_height
thumbnail_url
thumbnail_width
title
type
url
version
width
}
poster_text
poster_image {
alt
url
localFile {
childImageSharp {
gatsbyImageData
}
}
}
}
}
... on PrismicArticleBodyRawHtml {
slice_type
primary {
html
}
}
}
body1 {
... on PrismicArticleBody1Author {
slice_type
slice_label
}
... on PrismicArticleBody1Tags {
slice_label
slice_type
}
... on PrismicArticleBody1ShareLinks {
slice_label
slice_type
}
... on PrismicArticleBody1Company {
slice_label
slice_type
}
... on PrismicArticleBody1Integration {
slice_label
slice_type
primary {
integration_id
}
}
... on PrismicArticleBody1Download {
slice_label
slice_type
primary {
call_to_action
download_body
download_title
download {
id
}
form {
id
}
terms {
raw
}
}
}
... on PrismicArticleBody1TableOfContents {
slice_label
slice_type
id
}
... on PrismicArticleBody1Form {
id
slice_label
slice_type
primary {
title1
text {
raw
}
pardot_form
}
}
}
body2 {
... on PrismicArticleBody2Collections {
slice_type
primary {
background_color
}
}
}
}
}
}
`;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment