Skip to content
This repository was archived by the owner on Nov 20, 2023. It is now read-only.

variantBySelectedOptions field doesn't exist on Product #131

Description

@jibinycricket

Has this field been deprecated? I see it in the docs but it isn't found when I run the query below

Documentation
https://shopify.dev/docs/storefront-api/reference/products/product?api%5Bversion%5D=2021-01#fields-2021-01
image

query

{
  node(id: "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0LzYxOTc2OTU1NzgyOTk=") {
    ... on Product {
      id
      variantBySelectedOptions(selectedOptions: [{name: "Size", value: "Full/Queen"}, {name: "Color", value: "Sienna"}])
    }
  }
}

response

{
  "errors": [
    {
      "message": "Field 'variantBySelectedOptions' doesn't exist on type 'Product'",
      "locations": [
        {
          "line": 5,
          "column": 7
        }
      ],
      "path": [
        "query",
        "node",
        "... on Product",
        "variantBySelectedOptions"
      ],
      "extensions": {
        "code": "undefinedField",
        "typeName": "Product",
        "fieldName": "variantBySelectedOptions"
      }
    }
  ]
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions