graqlQL field contradicts

I’d like to confirm whether this is an issue with my implementation or if it’s a bug in Shopify itself.

My query is as follows,

query($id: ID!, $after: String) {
  collection(id: $id) {
    productsCount{
        count
    }
    products(first: 100, 
    after: $after,

    ) {
      edges {
        cursor
        node {
          id
          status
          onlineStoreUrl
          resourcePublications(first:100,onlyPublished:false){
            nodes{
                isPublished
                publication{
                    name
                
                }
            }
          }
          title
        }
      }
      pageInfo {
        hasNextPage
        hasPreviousPage
        startCursor
        endCursor
      }
    }
  }
}

the response is as below:

and the returned result aligns with what is documented in Shopify (see the attached screenshot).

However, this contradicts the description of the published field provided below.

Where am I misunderstanding this? Please guide me.

1 Like

Hey @Eric_Han - is your shop’s Online Store sales channel currently password protected? The onlineStoreUrl only populates when a shop’s Online Store is publicly available. If you needed to test some functionality though, the onlineStorePreviewUrl field should work similarly. One thing to note is that Development Shops are always password protected. Just wanted to mention this in case you are using a dev shop, more info here:

Hope this helps - let me know if I can help out further!

Thanks for explaining this.

No worries @Eric_Han , happy to help. Let me know if I can clarify anything or help with anything else :slight_smile: