cancel
Showing results for 
Search instead for 
Did you mean: 

graphql and products-render-info doesnt return data for all products

graphql and products-render-info doesnt return data for all products

Im trying to load products and prices using the API. All products are available through the API call "products" but the price is missing

{{baseUrl}}/V1/products?searchCriteria?....

 

To get prices I use the "products-render-info" but it is not possible to get prices for all products...:

 

{{baseUrl}}/V1/products-render-info?

The above API call returns for some SKU's:

 
{
    "items": []
}
 

for some products purchable in the shop. 

 

I also tried the "graphql" and it is the same problem but with different products:

{{baseUrl}}/pub/graphql

Request:

{ 
  products(
    filter: { sku:{eq:"033434"} }
    pageSize: 50
    currentPage: 1
    sort: { name: DESC }
  ) {
total_count

page_info{
    total_pages
    current_page
}
    items {
      id
      sku
      name
      __typename
... on ConfigurableProduct{
    attribute_set_id
 
}
... on CustomizableProductInterface{
    options{
        required
        title
        __typename
        option_id
        ... on CustomizableDropDownOption{
            value{
                title
                price
                price_type
            }
        }
        ... on CustomizableRadioOption{
            
            value{
                title
                price
                price_type
            }
        }
    }
   
}


      price{
          regularPrice{
              amount{
                  currency 
                  value                 
              }
          }
          minimalPrice{
              amount{
                  currency
                  value
              }
          }
          maximalPrice{
              amount{
                  currency
                  value
              }
          }
      }
      categories{
            id
            name
      }
      image{
          url
          label
      }
      media_gallery_entries{
          label
          id
          file
          types
         media_type      
      }
    }
  }
}

Response:

{
    "data": {
        "products": {
            "total_count": 0,
            "page_info": {
                "total_pages": 0,
                "current_page": 1
            },
            "items": []
        }
    }
}

Why cant I get prices for all products?

1 REPLY 1

Re: graphql and products-render-info doesnt return data for all products

We know, maybe it's some other bug for you, or just a feature which is what we had...

 

"they first updated the auto load code to use GraphQL to match the product manager, after finding the Magento internal code, for example when you did a product list search, would return 95% of the products, they had to built the search themselves to guarantee a complete result set, found this in other areas, gave up and wrote the entire GraphQL code themselves"

 

https://community.magento.com/t5/Magento-2-x-Version-Upgrades/Should-I-continue-investing-my-career-... 

 

MochiGroup.net