Skip to content

Instantly share code, notes, and snippets.

@diveddie
Created May 18, 2020 12:11
Show Gist options
  • Save diveddie/d02b0dcf4070dc847e6fd52f796827cd to your computer and use it in GitHub Desktop.
Save diveddie/d02b0dcf4070dc847e6fd52f796827cd to your computer and use it in GitHub Desktop.
This is an example of a graphql query for pulling blogs from Contentful
const result = await graphql(`
query {
allContentfulBlogPost {
edges {
node {
contentful_id
id
tags
title
description {
description
}
heroImage {
file {
url
}
}
body {
childMarkdownRemark {
internal {
content
}
}
}
}
}
}
}
`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment