Skip to content

Commit

Permalink
Merge pull request #1 from navana-tech/products-query-fields
Browse files Browse the repository at this point in the history
Add commonly required fields for products and variants in query strings
  • Loading branch information
ksdfg-navana authored Apr 6, 2022
2 parents b35996f + 579b489 commit eee8ef0
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion product.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ const productBaseQuery = `
tags
title
description
descriptionPlainSummary
priceRangeV2{
minVariantPrice{
amount
Expand All @@ -104,6 +105,14 @@ const productBaseQuery = `
title
}
templateSuffix
customProductType
featuredImage{
id
altText
height
width
url
}
`

var productQuery = fmt.Sprintf(`
Expand All @@ -113,18 +122,28 @@ var productQuery = fmt.Sprintf(`
node{
id
legacyResourceId
title
displayName
sku
selectedOptions{
name
value
}
image {
id
altText
height
width
url
}
compareAtPrice
price
inventoryQuantity
inventoryItem{
id
legacyResourceId
}
availableForSale
}
}
pageInfo{
Expand Down Expand Up @@ -152,19 +171,28 @@ var productBulkQuery = fmt.Sprintf(`
node{
id
legacyResourceId
title
displayName
sku
selectedOptions{
name
value
}
position
image {
id
altText
height
width
url
}
compareAtPrice
price
inventoryQuantity
inventoryItem{
id
legacyResourceId
}
availableForSale
}
}
}
Expand Down

0 comments on commit eee8ef0

Please sign in to comment.