Skip to content

Instantly share code, notes, and snippets.

@jmolivas
Created November 6, 2019 19:42
Show Gist options
  • Save jmolivas/c07a7f54f3132ca8d8f098b3098e9c0d to your computer and use it in GitHub Desktop.
Save jmolivas/c07a7f54f3132ca8d8f098b3098e9c0d to your computer and use it in GitHub Desktop.
used for demonstration purposes
export const query = graphql`
query($slug: String!) {
site {
siteMetadata {
domain
}
}
allSiteSettingEntitySite {
edges {
node {
field_name
field_slogan
field_twitter_handle
}
}
}
nodeArticle(fields: { slug: { eq: $slug } }) {
title
path {
alias
}
field_overlay_color
fields {
slug
created_formatted
markdownBody {
childMarkdownRemark {
html
rawMarkdownBody
excerpt
}
}
}
relationships {
field_tags {
name
path {
alias
}
}
field_image {
relationships {
field_media_image {
localFile {
childImageSharp {
fluid(maxWidth: 1440, maxHeight: 560, cropFocus: CENTER) {
...GatsbyImageSharpFluid
}
}
}
}
}
}
field_related_post {
id
title
field_resume
path {
alias
}
fields {
created_formatted
markdownBody {
childMarkdownRemark {
excerpt
}
}
}
relationships {
field_image {
relationships {
field_media_image {
localFile {
childImageSharp {
fluid(maxWidth: 600, maxHeight: 400, cropFocus: CENTER) {
...GatsbyImageSharpFluid
}
}
}
}
}
}
}
}
}
}
}
`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment