Re: [Bug] The Storefront API Only Not Returned All Product match with query

[Bug] The Storefront API Only Not Returned All Product match with query

ankur_1302
Shopify Partner
2 0 1
Hi!

I am writing to report an issue regarding a missing product while querying on Storefront API. Despite this, I can see products in stores. Only new products not coming and any new changes on existing products are not reflected on the Storefront query.

This issue happens in the past also.

We using Graphql `/api/2022-07/graphql.json`

This is the query
 
{
    "operationName": "getProducts",
    "variables": {
        "first": 15,
        "query": "vendor:\"SnoozeShade\"",
        "sortKey": "CREATED_AT",
        "reverse": true
    },
    "query": "query getProducts($first: Int, $after: String, $query: String, $sortKey: ProductSortKeys, $reverse: Boolean) {\n  products(\n    first: $first\n    after: $after\n    query: $query\n    sortKey: $sortKey\n    reverse: $reverse\n  ) {\n    edges {\n      cursor\n      node {\n        id\n        title\n        handle\n        vendor\n        productType\n        tags\n        createdAt\n        metafield(key: \"life_stage\", namespace: \"custom\") {\n          value\n          __typename\n        }\n        options {\n          id\n          name\n          values\n          __typename\n        }\n        priceRange {\n          maxVariantPrice {\n            amount\n            currencyCode\n            __typename\n          }\n          minVariantPrice {\n            amount\n            currencyCode\n            __typename\n          }\n          __typename\n        }\n        variants(first: 100) {\n          edges {\n            node {\n              id\n              title\n              quantityAvailable\n              currentlyNotInStock\n              priceV2 {\n                amount\n                currencyCode\n                __typename\n              }\n              compareAtPriceV2 {\n                amount\n                currencyCode\n                __typename\n              }\n              selectedOptions {\n                name\n                value\n                __typename\n              }\n              __typename\n            }\n            __typename\n          }\n          __typename\n        }\n        featuredImage {\n          id\n          altText\n          url\n          __typename\n        }\n        __typename\n      }\n      __typename\n    }\n    pageInfo {\n      startCursor\n      endCursor\n      hasNextPage\n      hasPreviousPage\n      __typename\n    }\n    __typename\n  }\n}"
}

Not being able to rely on the Storefront API is stressing me out
Replies 5 (5)

CollagerieTech
Shopify Partner
4 0 2

Noticing the exact same issue. Query variable is completely useless at the moment.

Liam
Community Manager
3108 341 881

Hi Ankur_1302,

 

It's possible that there might be an issue with the visibility of the products on the correct sales channel. Are the products you're creating available on the "Online Store" sales channel, as the Storefront API only fetches products that are available on this channel? Also product visibility can be controlled at the collection level - can you make sure the collections containing the new products are also visible on the "Online Store" sales channel? 

 

If you check these settings and you're still having issue, let us know here. Hope this helps!

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me 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

CollagerieTech
Shopify Partner
4 0 2

I have personally checked all these settings on our end store and we are getting the issue still. I have also raised an issue on the storefront API SDK as it is impacting the Contentful CMS shopify App too.

ankur_1302
Shopify Partner
2 0 1

Hey Liam,

 

Thank you for your reply.

 

As per you given suggestion I had checked my product configuration and it's available on Online Store Sales Channel.


If you search product on https://bndle-live.myshopify.com/ then you can check there are 4 products coming but using only 2 product come. 


New Products that are created after 1 July not coming from API.

Let me know if you need any extra information from my end. 

Thank you.

Liam
Community Manager
3108 341 881

Hi again Ankur_1302,

 

I'm looking into this a bit deeper with internal folks - will update here when I have more info. 

 

Cheers,

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me 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