How can I get product tags by making a query for products in a specific collection? The error I get here: No field of name “tags” found on type “Product” in schema
const query = shopifyClient.graphQLClient.query((root) => {
root.add(
"collectionByHandle",
{ args: { handle: "collection-handle" }, alias: "collection" },
(Collection) => {
Collection.add("id");
Collection.addConnection(
"products",
{
args: {
first: 25,
},
},
(Product) => {
Product.add("title");
Product.add("handle");
Product.add("tags"); /* Couldn't get tags?! */
Product.addConnection(
"variants",
{ args: { first: 25 } },
(Variant) => {
Variant.add("price");
}
);
Product.addConnection(
"images",
{ args: { first: 1 } },
(Image) => {
Image.add("src");
}
);
}
);
}
);
});
shopifyClient.graphQLClient
.send(query)
.then(({ model }) => {
// Some logic
})
.catch((err) => {
console.log("err", err);
});
Any suggestions here? Thanks in advance.