question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Query param on Collection products

See original GitHub issue

It seems its not possible to use the query param on products array when fetching a collection. Is there a reason for this?

{
  shop{
    collections(first:10){
      edges{
        node{
          products(first: 10, query:"tag:'something'"){
            edges{
              node{
                title
              }
            }
          }
        }
      }
    }
  }
}

results in

{
  "errors": [
    {
      "message": "Field 'products' doesn't accept argument 'query'",
      "locations": [
        {
          "line": 22,
          "column": 31
        }
      ],
      "fields": [
        "query",
        "shop",
        "collections",
        "edges",
        "node",
        "products",
        "query"
      ]
    }
  ]
}

Our store, as most Shopify stores, are made up of small to very large collections. I’m not sure how else I can filter a collection’s products by tags?

Any help is appreciated

Thank you, Thomas

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
DinciPhoneDevelopercommented, May 28, 2019

@swalkinshaw now is it supported? Please let me know.

0reactions
Hanousicommented, Oct 10, 2021

@swalkinshaw What is the alternative to filtering products in a collection? I’m currently having to pull all products from the collection and filter them manually… This seems like a huge oversight.

Read more comments on GitHub >

github_iconTop Results From Across the Web

REST API query parameters for collection resources - IBM
Query parameters for collection resources ; count, A positive integer. This parameter specifies the maximum number of items to return. By default, all...
Read more >
Receiving a String collection as a query param in Java Spring ...
Just take a example for you, as following request parameters: ['abc', 'edf', 'ghi']. You can concat this strings to your url like:
Read more >
Retrieve list of collections for product - Yotpo Core API
Retrieves a paginated list of collections within your product catalog that a product belongs to.
Read more >
collections query - Shopify.dev
A collection represents a group of products that a store owner can create. The store owner can organize these product groups to make...
Read more >
Use query parameters to customize responses - Microsoft Graph
Use the $count query parameter to retrieve the count of the total number of items in a collection or matching an expression.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found