I am using the following graphql bulk operation request to get all products with tag: “TAG1” from a shopify store:
mutation {
bulkOperationRunQuery(
query: """
{
products (first: 250, query: "tag:tag1 OR tag:tag2") {
edges {
cursor
node {
id,
tags
}
}
pageInfo {
hasNextPage
}
}
}
"""
) {
bulkOperation {
id
status
}
userErrors {
field
message
}
}
}
This request returns the operation id, when it is completed I download the result. However, the result contains one product only whereas there are many products with this “tag1” or “tag2”.
Why one product only is returned?
The AND operator works fine however. So it seems that Shopify’s GraphQL API does not directly support filtering products using the OR operator for tags in a single query.