Returns a specific node by ID.


Anchor to id
id
required

The ID of the Node to return.


Was this section helpful?

An object with an ID field to support global identification, in accordance with the Relay specification. This interface is used by the node and nodes queries.


Was this section helpful?
Retrieve product variants
Hide code
DescriptionCopy
query getProductVariantsFromNode($id: ID!) {
  node(id: $id) {
    id
    ... on Product {
      variants(first: 5) {
        edges {
          node {
            id
          }
        }
      }
    }
  }
}
Hide code
Response
JSON
{
  "node": {
    "id": "gid://shopify/ProductVariant/1001658048"
  }
}