GQL: How does the QueryRoot.products query, "error_feedback" work?

I’m trying to get all products where feedback is not null. Below is an example:

{
  products(first: 20, query:"error_feedback:*") {
    edges {
      node {
        id
        title
        feedback {
          details {
            app {
              id
            }
            messages {
              message
            }
          }
          summary
        }
      }
    }
  }
}

When I query without this param, the results look like below:

{
  "data": {
    "products": {
      "edges": [
        {
          "node": {
            "id": "gid://shopify/Product/THIS_ONE_DOES_NOT_HAVE_AN_IMAGE",
            "title": "Product Without an Image",
            "feedback": {
              "details": [
                {
                  "app": {
                    "id": "gid://shopify/App/MY_APP"
                  },
                  "messages": [
                    {
                      "message": "Missing image.."
                    }
                  ]
                }
              ],
              "summary": "This product couldn’t be published to {STORE}"
            }
          }
        },
        {
          "node": {
            "id": "gid://shopify/Product/THIS_ONE_HAS_AN_IMAGE",
            "title": "Just a Shirt",
            "feedback": null
          }
        }
      ]
    }
  }
}

What’s the correct syntax, then, for query:“error_feedback”? I can’t find samples of it anywhere!

Hey @jdg_fms

Something like this works my end, and I’m returned the feedback objects holding data on the first 20 products.

{
  products(first: 20, query:"feedback:*") {
    edges {
      node {
        id
        title
        feedback {
          details {
            app {
              id
            }
            messages {
              message
            }
          }
          summary
        }
      }
    }
  }
}

Let me know if that helps!

This doesn’t work, and is also not mentioned in the dev docs anywhere!

The error_feedback is not working here too!

The “error_feedback” parameter should contain your app’s public apiKey (clientId) in order to retrieve all products with publishing errors. You can retrieve that same key with graphQL with the following query:

{
  app {
    apiKey
  }
}

You products query could end up looking something like this:

{
  products(first: 100, query:"error_feedback:zExg0zsWDuUrNse8kgNtID5WBlK0J78D") {
    edges{
      node {
        legacyResourceId
      }
    }
  }
}