Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add commonly required fields for products and variants in query strings #1

Merged
merged 1 commit into from
Apr 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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