Have a strange GraphQL Issue. I am querying the Harmonized system code and country of origin on a inventory_item I just updated and am getting null as a return value.
It’s curious you are not getting a result using GraphQL - I just tested your exact same call in my development store and I was able to get the results for both HS Code and Country Of Origin as expected. I wondering if it might be store or permission based but we would need you to go through our Partner Support to get an authenticated look at the store in question.
You can contact Partner Support under “Support” in your partner dashboard and reference this post.
Thanks for your reply! It cant be a permissions thing since I have the permissions to run both of the queries otherwise I would receive the appropriate error message indicating the missing scopes.
Oh, I get a result now. I just didn’t get a result then… My analysis of the issue leads me to the conclusion that the graphql results are being cached based on the query parameters for a specific duration of time.
Here are the replication Steps:
Run the GraphQL query above against an inventory item id that has the HS code defined. Save the result.
Execute a GET against inventory_items rest endpoint for the same inventory_item_id. Save the result.
Modify the country of origin / hs code for the inventory item id in steps 1 and 2
Rerun steps 1 and 2 directly after step 3 and compare. They should be the same.. they are not.
choose a different inventory item and enter in new or modify existing origin and hs code
run the graphql query from above. The query results will reflect the newly changed data.
change the information back to the original values
run the graphql query. The results will be from step 6 e.g. unchanged even though the data has changed.
Caching results for things that don’t change frequently is a great way to improve performance. Its just in this situation it kinda sucks.