Open d0t15t opened 3 years ago
Hey @IsaacBigsbyTrogdon, Shopify wants a "global id", the gid is something like gid://shopify/ProductVariant/409470000
, but as base-64. You can generate the gid for a product variant like
const shopifyProductVariantId = 409470000;
const gid = btoa(`gid://shopify/ProductVariant/${shopifyProductVariantId}`);
console.log(gid); // Z2lkOi8vc2hvcGlmeS9Qdm9kdWN0LzQwOTQ3NDU1OQ==
Thanks @davidpaulsson !
Hi, thanks for your Shopify theme! It's the best : )
in Gatsby's graphQl,
shopifyProduct
(also ShopifyProductVariant and other nodes) have ashopifyId
that looks something likeZ2lkOi8vc2hvcGlmeS9Qdm9kdWN0LzQwOTQ3NDU1OQ==
. In MyShopify however, the same product has an ID like409470000
.What is the correlation between the values? Is there a way to get the integer-Id in gatsby, or to transform between the values?
Many thanks!