GraphQL Collection -> Products -> Query (does not work).

Shopify Partner
12 0 7

Pretty simple, the GraphQL is broken when you use "Collections" with a "Products" connection and a "query" filter on the products.
As documented, this Should Work: https://help.shopify.com/en/api/graphql-admin-api/reference/object/collection

(See "Connections" -> "products" -> "query")

It works WITHOUT a "query" filter.  Even with a blank query filter (query="").  But when anything is put inside the "query" filter, it doesn't  work.

Notes:

Made sure the Collection is a "smart" collection.

Made sure the query filter is formatted properly.
Tried querying without the "query" filter: (as mentioned, this works).
Trying another collection with the "query" filter: doesn't work.
Putting other things inside the "query" filter: doesn't work.
Made sure I have access (since obviously querying without the "query" filter works).
Checked docs

Examples:
Doesn't work:

        query {
          collection(id: "gid://shopify/Collection/134156681321") {
            products(first:10, query:"title:test") {
              edges {
                node {
                  id
                }
              }
            }
          }
        }


Works:

        query {
          collection(id: "gid://shopify/Collection/134156681321") {
            products(first:10, query:"") {
              edges {
                node {
                  id
                }
              }
            }
          }
        }

Only difference:
The version that doesn't work has anything... Anything inside the "query" filter.

 

Please help ASAP

Thanks!

 

0 Likes