From 579b489df91b02644e39947eb5d2e85db4842137 Mon Sep 17 00:00:00 2001 From: Kshitish Deshpande Date: Wed, 6 Apr 2022 10:22:58 +0530 Subject: [PATCH] feat(product): add commonly required fields for products and variants in query strings --- product.go | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/product.go b/product.go index a6ac18d..0494742 100644 --- a/product.go +++ b/product.go @@ -84,6 +84,7 @@ const productBaseQuery = ` tags title description + descriptionPlainSummary priceRangeV2{ minVariantPrice{ amount @@ -104,6 +105,14 @@ const productBaseQuery = ` title } templateSuffix + customProductType + featuredImage{ + id + altText + height + width + url + } ` var productQuery = fmt.Sprintf(` @@ -113,11 +122,20 @@ var productQuery = fmt.Sprintf(` node{ id legacyResourceId + title + displayName sku selectedOptions{ name value } + image { + id + altText + height + width + url + } compareAtPrice price inventoryQuantity @@ -125,6 +143,7 @@ var productQuery = fmt.Sprintf(` id legacyResourceId } + availableForSale } } pageInfo{ @@ -152,12 +171,20 @@ var productBulkQuery = fmt.Sprintf(` node{ id legacyResourceId + title + displayName sku selectedOptions{ name value } - position + image { + id + altText + height + width + url + } compareAtPrice price inventoryQuantity @@ -165,6 +192,7 @@ var productBulkQuery = fmt.Sprintf(` id legacyResourceId } + availableForSale } } }