-
DescriptionHi there. I'm using
Expected resultI'd need to pull a direct product ID like this: |
Beta Was this translation helpful? Give feedback.
Answered by
LekoArts
Feb 15, 2021
Replies: 1 comment 1 reply
-
You'll need to convert the ID: const storefrontId = "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0LzEwMDc5Nzg1MTAw";
const adminGraphqlId = atob(storefrontId);
console.log(adminGraphqlId) // prints "gid://shopify/Product/10079785100" |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
code-mat
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please see https://community.shopify.com/c/Shopify-APIs-SDKs/Storefront-API-variantId-different-than-Rest-API-variantId/m-p/607819/highlight/true#M41291
You'll need to convert the ID: