Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

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

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

DanAtBonify
Shopify Partner
57 4 42

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)