I need to filter products by productTaxonomyNode id, but I don’t found a solution, I have this
if (filters?.categoryId) {
_query += `productCategory.productTaxonomyNode.id:gid://shopify/ProductTaxonomyNode/334 `;
}
const query = `
query {
products(
${_query.length > 0 ? `query: "${_query}"` : ''}
first: ${pageSize}) {
edges {
node {
id
title
createdAt
description
descriptionHtml
hasOnlyDefaultVariant
hasOutOfStockVariants
totalInventory
totalVariants
tracksInventory
featuredImage{
url
}
productCategory{
productTaxonomyNode{
id
name
}
}
priceRange {
minVariantPrice {
amount
currencyCode
}
}
options{
id
name
position
values
}
variants(first:250){
edges{
node{
availableForSale
barcode
compareAtPrice
price
id
image{
url
originalSrc
src
}
inventoryQuantity
position
sku
title
weight
requiresShipping
}
}
}
}
}
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
}
}
`;
this code print:
query {
products(
query: "productCategory.productTaxonomyNode.id:gid://shopify/ProductTaxonomyNode/334"
first: 25) {
edges {
node {
id
title
createdAt
description
descriptionHtml
hasOnlyDefaultVariant
hasOutOfStockVariants
totalInventory
totalVariants
tracksInventory
featuredImage{
url
}
productCategory{
productTaxonomyNode{
id
name
}
}
priceRange {
minVariantPrice {
amount
currencyCode
}
}
options{
id
name
position
values
}
variants(first:250){
edges{
node{
availableForSale
barcode
compareAtPrice
price
id
image{
url
originalSrc
src
}
inventoryQuantity
position
sku
title
weight
requiresShipping
}
}
}
}
}
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
}
}
but I don’t have the products filtered by the productTaxonomyNode id, what I can do?