App reviews, troubleshooting, and recommendations
Hi,
Looks like I have discovered a bug in ProductVariants - Product - publishedInContext endpoint, please correct me if I am wrong.
Let's consider a scenario for B2B store, when a product is not published on Online Store (but Active). And this product is in a catalog "Test Catalog":
Then we assign this catalog to a Company Location "Test Location":
We assume that for a B2B customer ordering for the location "Test Location" that product is available, even though the product may be not published on the Online Store. The Catalog "Test Catalog" overwrites rules.
And it works like expected when I try to search the product on the Online Store itself as logged in B2B customer ordering for that Location.
Now I want to get publishedInContext using Admin GraphQL API:
publishedInContext(
context: { companyLocationId: "gid://shopify/CompanyLocation/[ID]" }
Here are results I got when testing, in both tests the product in the "Test Catalog" and not published on Online Store.
1 - the "Test Catalog" is assigned to the Company Location "Test Location":
* publishedInContext = true
The product can be found on the Online Store.
2 - the "Test Catalog" is NOT assigned to the Company Location "Test Location":
* publishedInContext = true
The product can NOT be found on the Online Store.
As you can see in the second test the publishedInContext is expected to be false.
Would very much appreciate any help!
====
Actually I am using:
publishedInContext(
context: { companyLocationId: "gid://shopify/CompanyLocation/[ID]", country: [current_location_shipping_address_country_code] }
But for this query it does not work as well.
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025