Join us for an upcoming Shopify Partner webinar on February 27, 2024. Discover the latest Checkout Extensibility features, and deep dive on improvements to Shopify Functions and Web Pixels. Register now for either the 10am EST or 2pm EST sessions.

Issue with GraphQL products query using savedSearchId and "where collection is"

DanAtBonify
Shopify Partner
54 4 31

I have found an issue when using a products query with the savedSearchId parameter where the results are not what I am expecting. [docs]

 

Reproduction Steps

  1. Create a custom collection, Collection A
  2. Create some products (Product 1, Product 2, Product 3)
  3. Put Product 1 into Collection A
  4. Create a Saved Search using filter "where collection is Collection A"
  5. Perform the following GraphQL query

 

{
    products(first: 25, savedSearchId: "gid://shopify/SavedSearch/1234567890") {
        edges {
            node {
                title
            }
        }
    }
}

 

Expected Results

I expect to only see Product 1 in the result.

 

Actual Results

I see all products. 

 

Thoughts

The issue appears to be specifically related to the "collection is" filter. I should also note, that the Saved Search result is correct in the Shopify interface. The issue is only with the GraphQL query performed through the API.

Replies 0 (0)