A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
When using GraphQL to query allProductCategories.productTaxonomyNodes it returns an empty array. This is using 2022-10. The shop already has products mapped to product categories. Here is the query I am running along with the response.
{ shop{ allProductCategories{ productTaxonomyNode{ name } } } }
On another store it pulls the categories correctly, but for some reason the store mentioned above is returning empty []
Any ideas?
Hey @jas9, do you have an X-Request-ID from a response header for the example where the array doesn't show any information? I can take a look at the logs on our end to see if I can narrow down what may be happening. Could you also share a timeframe for that example? Hope to hear from you soon.
Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Here is both request id & timestamp of response. Thanks
x-request-id: 109158e5-649e-4811-91a9-5f344e8a4b67
date: Thu, 17 Nov 2022 22:38:52 GMT
Hey again @jas9 - thanks for sharing that information with me. I was able to do a bit of digging and from what I can see based on our logs, your API call should have retrieved the data as expected - as long as the merchant's shop has product types set up using this method. I wasn't able to replicate the error on my end, products with the correct taxonomy and category showed up through my live test store as expected. There could potentially be something related to this specific store that is preventing the data from being sent as expected.
Could you ask your merchant to reach out to us through our support channel here?
Our merchant-facing technical teams would be better able to assist them this way so that we can keep sensitive information out of the forums. They are welcome to add you to the support interaction with our team on request as well. I would just ask them to reference my post here in the forums so that the issue can potentially get looked at a bit quicker.
Hope this helps and thanks again for bringing this up - definitely an odd issue. We'll try to get this fixed/looked at.
Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
It works on my test store as well. Just not working for this merchant. I checked the products and they are mapped to types and the taxonomy correctly. We are looking to get this setup asap, is this endpoint the only way to obtain currently set TaxonomyNode's?