Home > @vsf-enterprise/commercetools-api > productsQuery
# productsQuery variable
Portion of the GraphQL query used in the getProduct
API endpoint
Signature:
productsQuery = "\n fragment Images on ProductVariant {\n images {\n url\n label\n }\n }\n\n fragment Price on ProductVariant {\n price(currency: $currency, country: $country, channelId: $channelId) {\n ...DefaultProductPrice\n }\n }\n\n fragment Attributes on ProductVariant {\n attributesRaw {\n name\n value\n attributeDefinition {\n type {\n name\n }\n label(locale: $locale)\n }\n }\n }\n\n fragment Availability on ProductVariant {\n availability {\n noChannel {\n isOnStock\n restockableInDays\n availableQuantity\n }\n channels(\n includeChannelIds: $includeChannelIds \n excludeChannelIds: $excludeChannelIds \n limit: $channelLimit\n offset: $channelOffset\n ) {\n limit\n offset\n total\n results {\n channelRef {\n id\n }\n availability {\n isOnStock\n restockableInDays\n availableQuantity\n }\n channel {\n ...ChannelFragment\n }\n }\n }\n }\n }\n\n fragment DefaultVariant on ProductVariant {\n id\n sku\n ...Images\n ...Price\n ...Attributes\n ...Availability\n }\n\n fragment category on Category {\n id\n slug(acceptLanguage: $acceptLanguage)\n name(acceptLanguage: $acceptLanguage)\n }\n\n query products(\n $where: String\n $sort: [String!]\n $limit: Int\n $offset: Int\n $skus: [String!]\n $locale: Locale!\n $acceptLanguage: [Locale!]\n $currency: Currency!\n $country: Country!\n $channelId: String\n $includeChannelIds: [String!]\n $excludeChannelIds: [String!]\n $channelLimit: Int\n $channelOffset: Int\n ) {\n products(\n where: $where\n sort: $sort\n limit: $limit\n offset: $offset\n skus: $skus\n ) {\n offset\n count\n total\n results {\n id\n reviewRatingStatistics {\t\n averageRating,\n ratingsDistribution,\n count\n }\n masterData {\n current {\n slug(acceptLanguage: $acceptLanguage)\n name(acceptLanguage: $acceptLanguage)\n metaTitle(acceptLanguage: $acceptLanguage)\n metaKeywords(acceptLanguage: $acceptLanguage)\n metaDescription(acceptLanguage: $acceptLanguage)\n description(acceptLanguage: $acceptLanguage)\n categoriesRef {\n id\n }\n categories {\n ...category\n parent {\n ...category\n parent {\n ...category\n parent {\n ...category\n }\n }\n }\n }\n allVariants {\n ...DefaultVariant\n }\n masterVariant {\n ...DefaultVariant\n }\n }\n }\n }\n }\n }\n"