In the Shopify admin, you can view and modify the publications for products that are in draft. The products aren’t actually published, but they will be once the product is active.
However, the API returns no publications for draft products. For example:
query products {
products(first: 10, query: "status:DRAFT") {
nodes {
id
title
availablePublicationsCount {
count
}
resourcePublicationsCount {
count
}
resourcePublicationsV2(first: 10) {
nodes {
publication {
id
}
}
}
}
}
}
Returns 0 for the counts and an empty list for publications. After setting the status to active, it will have all the ones available that are shown in the admin.
I think it should match the behavior of the Shopify admin, or at least add a flag to the query so we can still fetch the publications that are ready to be published once the product is active. Otherwise, it causes a discrepancy with the admin and confuses merchants since we have to display the product with no publications in the app while it’s in draft.