How to filter products exclude with multiple tags by using API's or Graphql?

Hello everyone ,

I want to filter products exclude some tags using Graphql but I didn’t found any syntax to achieve this.

They provide me all the products listing using this query.

query{
                products(first:150,query:"-tags:[tag1,tag2]"){ 
                 edges{ 
                    node{ 
                        id 
                        title 
                    } 
                  }
                } 
            }

I want the product listing with exclude some tags product.

Is there any way to achieve this ?

Thanks !

Hello @DSLR

query {
  products(first: 150, query: "NOT tagged_with:tag1 AND NOT tagged_with:tag2" ) {
    edges {
      node {
        id
        title
      }
    }
  }
}

To exclude those products, you can use the none Tagged With filter:
In this query, the NOT operator is used to exclude products with the specified tags. The none Tagged With filter is used to ensure that products with tag1 and tag2 are not included in the results.