79420838

Date: 2025-02-07 12:16:38
Score: 0.5
Natty:
Report link

Should have waited out a bit longer because it can be done with GQL - which may be helpful to others:

query productById(
  $productId: Int!
  # Use GraphQL Query Variables to inject your product ID
) {
  site {
    product(entityId: $productId) {
      id
      entityId
      name
      variants {
        edges {
          node {
            sku
            isPurchasable
          }
        }
      }
    }
  }
}

Just note that the product needs to be 'visible on storefront'

Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: jesus g_force Harris