Created
May 18, 2020 12:11
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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