A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Collections have a field called hasProduct.
That tells whether the collection includes the specified product
https://shopify.dev/api/admin-graphql/2022-01/objects/collection#fields
I cant get it working.
Any ideas how it could be added to the next request?
query ($first: Int, $query: String, $sort_key: CollectionSortKeys) {
collections (first: $first, query: $query, sortKey: $sort_key) {
edges {
node {
legacyResourceId
title
productsCount
updatedAt
ruleSet {
rules {
condition
}
}
}
}
pageInfo {
hasNextPage
hasPreviousPage
}
}
}
Thanks in advance.