SHOPIFY STOREFRONT GRAPHQL API WORKING ON RETRIEVING OTHER DATA EXCEPT FOR "legacyResourceId"

Excursionist
26 0 4

Hi,

I am using graphql api storefront to retrieve variants data. I can get everything except for "legacyResourceId". Exact error showing is: Field 'legacyResourceId' doesn't exist on type 'ProductVariant' 

I tried on shopify graphql tester app and it is working fine -_-

0 Likes
Shopify Staff
Shopify Staff
222 28 27

Can you post your query to confirm? Does your app have proper scopes for products? 

 

Here is an example that should work: 

query GetOnlineStoreSKUQuantities {
  productVariants(first: 250, query: "published_status:published") {
    pageInfo {
      hasNextPage
      hasPreviousPage
    }
    edges {
      cursor
      node {
        id
        title
        sku
        displayName
        inventoryQuantity
        legacyResourceId
      }
    }
  }
}

Vix | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 


0 Likes