Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
Hi, anyone knows how to query all the blogs in shopify using storefront API? thanks
Solved! Go to the solution
This is an accepted solution.
This is an accepted solution.
The accepted solution works, but OP asked for Storefront API rather than the Admin API. Here is how you would query blogs in the Storefront API.
query BlogPosts($query: String!) {
articles(query: $query, first: 10) {
edges {
node {
id
title
excerpt
image {
url
altText
}
}
}
}
}
Also, keep in mind you can increase the value for "first: <value>" to however many blog posts you want to return.
Hope this helps.