Using gatsby-source-shopify, is not possible to get the tags added to a product.
Shopify's GraphQL explorer _does_ support this. Use the following query to see an example:
{
products(first: 10, reverse: true) {
edges {
node {
title
tags
}
}
}
}
{
allShopifyProduct {
edges {
node {
tags
}
}
}
}
Having tags in the query would allow us to set up a of filtering system that would allow you to show sets of products inside a collection. It would also make it easier to render 'similar products' on a product page.
I am aware of ProductType but this can only have one single value. Tags are a bit more versatile.
I've looked into our Shopify source plugin and it seems like we query tags
https://github.com/gatsbyjs/gatsby/blob/d196205f23b84ccdde5d0d64d25d459b9b812b9b/packages/gatsby-source-shopify/src/queries.js#L110-L185
You should be able to get it. @DSchau you were looking into some shopify examples lately, anyway we can test this? ^^
@wardpeet @DSchau I found the issue. tags breaks if none of the products you query for have a tag. Hope I didn't waste too much of your time. Thanks!
Most helpful comment
@wardpeet @DSchau I found the issue.
tagsbreaks if none of the products you query for have a tag. Hope I didn't waste too much of your time. Thanks!