is NOT a valid filter?

Gadget ai hgave me this when trying to filter out products that have a certain tag. I wonder if anyone used it?
// Filter for product variants where the product tags do NOT contain "seasonal"
const variants = await api.shopifyProductVariant.findMany({
filter: {
NOT: {
product: {
tags: {
matches: "seasonal"
}
}
}
}
});
// Filter for product variants where the product tags do NOT contain "seasonal"
const variants = await api.shopifyProductVariant.findMany({
filter: {
NOT: {
product: {
tags: {
matches: "seasonal"
}
}
}
}
});
No description
1 Reply
ljspoor94
ljspoor942mo ago
According to the docs there is notIn and notEquals (for JSON anyway) https://docs.gadget.dev/api/example-app/development/sorting-and-filtering#filtering-on-json-fields

Did you find this page helpful?