Hi,
I’m using the unoptimised buy SDK to create a query to get the tags on product items.
The docs here have a nice example:
https://shopify.github.io/js-buy-sdk/
// Build a custom products query using the unoptimized version of the SDK
const productsQuery = client.graphQLClient.query((root) => {
root.addConnection('products', {args: {first: 10}}, (product) => {
product.add('title');
product.add('tags');// Add fields to be returned
});
});
However, when I send this query I always get null returned. If I remove the tags then it works as expected. E.g this deos work:
// Build a custom products query using the unoptimized version of the SDK
const productsQuery = client.graphQLClient.query((root) => {
root.addConnection('products', {args: {first: 10}}, (product) => {
product.add('title');
// tags removed and it works
});
});
From testing I seem to be able to add any field, apart from the tags.
Any ideas how to get the tags returned?
Many thanks for any help in advance.