Development discussions around Shopify APIs
Hey @Developer07
I couldn't be 100% sure actually without checking the logs - by any chance are you logging an x-request_id? Supplying that could help us try to figure out what's happening. Please feel free to share the query you're making, that would help. Thanks!
query($handle: String!) {
collection: shopifyCollection(handle: { eq: $handle }) {
handle
description
descriptionHtml
title
image {
localFile {
childImageSharp {
gatsbyImageData
}
}
originalSrc
}
storefrontId
metafields {
key
value
}
products {
}
}
products: allShopifyProduct{
edges {
node {
...ProductCard
}
}
}
}
I use fragment for product item:
fragment ProductCard on ShopifyProduct {
id
handle
tags
title
description
descriptionHtml
storefrontId
productType
options {
name
values
id
}
priceRangeV2 {
maxVariantPrice {
amount
currencyCode
}
minVariantPrice {
amount
currencyCode
}
}
metafields {
key
value
}
images {
id
originalSrc
altText
localFile {
childImageSharp {
gatsbyImageData
}
}
}
variants {
availableForSale
storefrontId
image {
id
altText
localFile {
childImageSharp {
gatsbyImageData
}
}
originalSrc
}
metafields {
key
value
}
price
title
}
}
Hey @Developer07
Thanks! So, I’d been looking at ProductImageSortKeys(here in our GraphQL docs) which seemed like it could help you and allow you to sort the images but it's not available as something to use in the Gatsby client.
Alas, without a request ID I won't be able to see the underlying reason for the ordering. Yet I do note, that this behaviour you'd seen has been logged as an issue in the Gatsby Repo itself; as somebody else had been testing the Admin API in April and seeing the same. Feel free to check out the issues here and the further discussion here (it's a feature request).
User | RANK |
---|---|
8 | |
7 | |
3 | |
3 | |
3 |
Connect your PayPal account to allow your customers to checkout using the PayPal gateway a...
ByYour online store speed can enhance your store’s discoverability, boost conversion rates a...
ByShopping is at our fingertips with mobile devices. Is your theme optimized to be user-frie...
By