---
title: node - GraphQL Admin
description: >-
  Returns a specific node (any object that implements the

  [Node](https://shopify.dev/api/admin-graphql/latest/interfaces/Node)

  interface) by ID, in accordance with the

  [Relay
  specification](https://relay.dev/docs/guides/graphql-server-specification/#object-identification).

  This field is commonly used for refetching an object.
api_version: 2026-10
source_url:
  html: 'https://shopify.dev/docs/api/admin-graphql/latest/queries/node'
  md: 'https://shopify.dev/docs/api/admin-graphql/latest/queries/node.md'
api_name: admin
api_type: graphql
type: query
---

# node

query

Returns a specific node (any object that implements the [Node](https://shopify.dev/api/admin-graphql/latest/interfaces/Node) interface) by ID, in accordance with the [Relay specification](https://relay.dev/docs/guides/graphql-server-specification/#object-identification). This field is commonly used for refetching an object.

## Arguments

* id

  [ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID)

  required

  The ID of the `Node` to return.

***

## Possible returns

* Node

  [Node](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Node)

  An object with an ID field to support global identification, in accordance with the [Relay specification](https://relay.dev/graphql/objectidentification.htm#sec-Node-Interface). This interface is used by the [node](https://shopify.dev/api/admin-graphql/unstable/queries/node) and [nodes](https://shopify.dev/api/admin-graphql/unstable/queries/nodes) queries.

  * id

    [ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID)

    non-null

    A globally-unique ID.

***

## Examples

* ### Continue one rollout treatment's changes

  #### Description

  Get the next page of changes for one treatment. Requires \`read\_rollouts\`. Use the treatment's ID and pass its \`endCursor\` as \`after\`. Keep \`changeQuery\` and \`reverse\` the same. Stop when \`hasNextPage\` is false. Each treatment needs its own cursor.

  #### Query

  ```graphql
  query ContinueTreatmentChanges($id: ID!, $after: String, $first: Int!, $changeQuery: String!, $reverse: Boolean!) {
    node(id: $id) {
      id
      ... on RolloutTreatment {
        changes(first: $first, after: $after, query: $changeQuery, reverse: $reverse) {
          nodes {
            id
            __typename
          }
          pageInfo {
            hasNextPage
            hasPreviousPage
            startCursor
            endCursor
          }
        }
      }
    }
  }
  ```

  #### Variables

  ```json
  {
    "id": "gid://shopify/RolloutTreatment/1790616808535057",
    "first": 1,
    "changeQuery": "type:RolloutDiscountActivateChange",
    "reverse": true,
    "after": "WzEsImNjZTI4M2I0NjQzNzFlMWU1OTZhMjY2MzdkZGVmNWQ0NTUwNGRlYjg5ODNkZTBhMjI2YmE3YjdjY2EyNDk2MjQiLCIyMDI2LTExLTI4VDAwOjAwOjAwLjAwMDAwMDAwMFoiLDAsIjRlMWUwZmNmYWRjNmY0YjgwYjQ0Nzg0MjUzOWI5NTAzYzNkZWFhOTI0OGZmYmY1NjNhZDRlMmM4MzBmMmU3MGYiXQ"
  }
  ```

  #### cURL

  ```bash
  curl -X POST \
  https://your-development-store.myshopify.com/admin/api/2026-10/graphql.json \
  -H 'Content-Type: application/json' \
  -H 'X-Shopify-Access-Token: {access_token}' \
  -d '{
  "query": "query ContinueTreatmentChanges($id: ID!, $after: String, $first: Int!, $changeQuery: String!, $reverse: Boolean!) { node(id: $id) { id ... on RolloutTreatment { changes(first: $first, after: $after, query: $changeQuery, reverse: $reverse) { nodes { id __typename } pageInfo { hasNextPage hasPreviousPage startCursor endCursor } } } } }",
   "variables": {
      "id": "gid://shopify/RolloutTreatment/1790616808535057",
      "first": 1,
      "changeQuery": "type:RolloutDiscountActivateChange",
      "reverse": true,
      "after": "WzEsImNjZTI4M2I0NjQzNzFlMWU1OTZhMjY2MzdkZGVmNWQ0NTUwNGRlYjg5ODNkZTBhMjI2YmE3YjdjY2EyNDk2MjQiLCIyMDI2LTExLTI4VDAwOjAwOjAwLjAwMDAwMDAwMFoiLDAsIjRlMWUwZmNmYWRjNmY0YjgwYjQ0Nzg0MjUzOWI5NTAzYzNkZWFhOTI0OGZmYmY1NjNhZDRlMmM4MzBmMmU3MGYiXQ"
    }
  }'
  ```

  #### React Router

  ```javascript
  import { authenticate } from "../shopify.server";

  export const loader = async ({request}) => {
    const { admin } = await authenticate.admin(request);
    const response = await admin.graphql(
      `#graphql
    query ContinueTreatmentChanges($id: ID!, $after: String, $first: Int!, $changeQuery: String!, $reverse: Boolean!) {
      node(id: $id) {
        id
        ... on RolloutTreatment {
          changes(first: $first, after: $after, query: $changeQuery, reverse: $reverse) {
            nodes {
              id
              __typename
            }
            pageInfo {
              hasNextPage
              hasPreviousPage
              startCursor
              endCursor
            }
          }
        }
      }
    }`,
    {
      variables: {
          "id": "gid://shopify/RolloutTreatment/1790616808535057",
          "first": 1,
          "changeQuery": "type:RolloutDiscountActivateChange",
          "reverse": true,
          "after": "WzEsImNjZTI4M2I0NjQzNzFlMWU1OTZhMjY2MzdkZGVmNWQ0NTUwNGRlYjg5ODNkZTBhMjI2YmE3YjdjY2EyNDk2MjQiLCIyMDI2LTExLTI4VDAwOjAwOjAwLjAwMDAwMDAwMFoiLDAsIjRlMWUwZmNmYWRjNmY0YjgwYjQ0Nzg0MjUzOWI5NTAzYzNkZWFhOTI0OGZmYmY1NjNhZDRlMmM4MzBmMmU3MGYiXQ"
      },
    },
    );
    const json = await response.json();
    return json.data;
  }
  ```

  #### Ruby

  ```ruby
  session = ShopifyAPI::Auth::Session.new(
    shop: "your-development-store.myshopify.com",
    access_token: access_token
  )
  client = ShopifyAPI::Clients::Graphql::Admin.new(
    session: session
  )

  query = <<~QUERY
    query ContinueTreatmentChanges($id: ID!, $after: String, $first: Int!, $changeQuery: String!, $reverse: Boolean!) {
      node(id: $id) {
        id
        ... on RolloutTreatment {
          changes(first: $first, after: $after, query: $changeQuery, reverse: $reverse) {
            nodes {
              id
              __typename
            }
            pageInfo {
              hasNextPage
              hasPreviousPage
              startCursor
              endCursor
            }
          }
        }
      }
    }
  QUERY

  variables = {
    "id": "gid://shopify/RolloutTreatment/1790616808535057",
    "first": 1,
    "changeQuery": "type:RolloutDiscountActivateChange",
    "reverse": true,
    "after": "WzEsImNjZTI4M2I0NjQzNzFlMWU1OTZhMjY2MzdkZGVmNWQ0NTUwNGRlYjg5ODNkZTBhMjI2YmE3YjdjY2EyNDk2MjQiLCIyMDI2LTExLTI4VDAwOjAwOjAwLjAwMDAwMDAwMFoiLDAsIjRlMWUwZmNmYWRjNmY0YjgwYjQ0Nzg0MjUzOWI5NTAzYzNkZWFhOTI0OGZmYmY1NjNhZDRlMmM4MzBmMmU3MGYiXQ"
  }

  response = client.query(query: query, variables: variables)
  ```

  #### Node.js

  ```javascript
  const client = new shopify.clients.Graphql({session});
  const data = await client.query({
    data: {
      "query": `query ContinueTreatmentChanges($id: ID!, $after: String, $first: Int!, $changeQuery: String!, $reverse: Boolean!) {
        node(id: $id) {
          id
          ... on RolloutTreatment {
            changes(first: $first, after: $after, query: $changeQuery, reverse: $reverse) {
              nodes {
                id
                __typename
              }
              pageInfo {
                hasNextPage
                hasPreviousPage
                startCursor
                endCursor
              }
            }
          }
        }
      }`,
      "variables": {
          "id": "gid://shopify/RolloutTreatment/1790616808535057",
          "first": 1,
          "changeQuery": "type:RolloutDiscountActivateChange",
          "reverse": true,
          "after": "WzEsImNjZTI4M2I0NjQzNzFlMWU1OTZhMjY2MzdkZGVmNWQ0NTUwNGRlYjg5ODNkZTBhMjI2YmE3YjdjY2EyNDk2MjQiLCIyMDI2LTExLTI4VDAwOjAwOjAwLjAwMDAwMDAwMFoiLDAsIjRlMWUwZmNmYWRjNmY0YjgwYjQ0Nzg0MjUzOWI5NTAzYzNkZWFhOTI0OGZmYmY1NjNhZDRlMmM4MzBmMmU3MGYiXQ"
      },
    },
  });
  ```

  #### Shopify CLI

  ```bash
  shopify app execute \
  --query \
  'query ContinueTreatmentChanges($id: ID!, $after: String, $first: Int!, $changeQuery: String!, $reverse: Boolean!) {
    node(id: $id) {
      id
      ... on RolloutTreatment {
        changes(first: $first, after: $after, query: $changeQuery, reverse: $reverse) {
          nodes {
            id
            __typename
          }
          pageInfo {
            hasNextPage
            hasPreviousPage
            startCursor
            endCursor
          }
        }
      }
    }
  }' \
  --variables \
  '{
    "id": "gid://shopify/RolloutTreatment/1790616808535057",
    "first": 1,
    "changeQuery": "type:RolloutDiscountActivateChange",
    "reverse": true,
    "after": "WzEsImNjZTI4M2I0NjQzNzFlMWU1OTZhMjY2MzdkZGVmNWQ0NTUwNGRlYjg5ODNkZTBhMjI2YmE3YjdjY2EyNDk2MjQiLCIyMDI2LTExLTI4VDAwOjAwOjAwLjAwMDAwMDAwMFoiLDAsIjRlMWUwZmNmYWRjNmY0YjgwYjQ0Nzg0MjUzOWI5NTAzYzNkZWFhOTI0OGZmYmY1NjNhZDRlMmM4MzBmMmU3MGYiXQ"
  }'
  ```

  #### Direct API Access

  ```javascript
  const response = await fetch('shopify:admin/api/2026-10/graphql.json', {
    method: 'POST',
    body: JSON.stringify({
      query: `
        query ContinueTreatmentChanges($id: ID!, $after: String, $first: Int!, $changeQuery: String!, $reverse: Boolean!) {
          node(id: $id) {
            id
            ... on RolloutTreatment {
              changes(first: $first, after: $after, query: $changeQuery, reverse: $reverse) {
                nodes {
                  id
                  __typename
                }
                pageInfo {
                  hasNextPage
                  hasPreviousPage
                  startCursor
                  endCursor
                }
              }
            }
          }
        }
      `,
      variables: {
          "id": "gid://shopify/RolloutTreatment/1790616808535057",
          "first": 1,
          "changeQuery": "type:RolloutDiscountActivateChange",
          "reverse": true,
          "after": "WzEsImNjZTI4M2I0NjQzNzFlMWU1OTZhMjY2MzdkZGVmNWQ0NTUwNGRlYjg5ODNkZTBhMjI2YmE3YjdjY2EyNDk2MjQiLCIyMDI2LTExLTI4VDAwOjAwOjAwLjAwMDAwMDAwMFoiLDAsIjRlMWUwZmNmYWRjNmY0YjgwYjQ0Nzg0MjUzOWI5NTAzYzNkZWFhOTI0OGZmYmY1NjNhZDRlMmM4MzBmMmU3MGYiXQ"
      },
    }),
  });

  const { data } = await response.json();
  console.log(data);
  ```

  #### Response

  ```json
  {
    "node": {
      "id": "gid://shopify/RolloutTreatment/1790616808535057",
      "changes": {
        "nodes": [
          {
            "id": "gid://shopify/RolloutDiscountActivateChange/aeba405d4c4b0c8c80e39a18c143f6ad330828fd0de4c53449437c6cd95fffc5",
            "__typename": "RolloutDiscountActivateChange"
          }
        ],
        "pageInfo": {
          "hasNextPage": false,
          "hasPreviousPage": true,
          "startCursor": "WzEsImNjZTI4M2I0NjQzNzFlMWU1OTZhMjY2MzdkZGVmNWQ0NTUwNGRlYjg5ODNkZTBhMjI2YmE3YjdjY2EyNDk2MjQiLCIyMDI2LTAxLTAxVDAwOjAwOjAwLjAwMDAwMDAwMFoiLDAsImFlYmE0MDVkNGM0YjBjOGM4MGUzOWExOGMxNDNmNmFkMzMwODI4ZmQwZGU0YzUzNDQ5NDM3YzZjZDk1ZmZmYzUiXQ",
          "endCursor": "WzEsImNjZTI4M2I0NjQzNzFlMWU1OTZhMjY2MzdkZGVmNWQ0NTUwNGRlYjg5ODNkZTBhMjI2YmE3YjdjY2EyNDk2MjQiLCIyMDI2LTAxLTAxVDAwOjAwOjAwLjAwMDAwMDAwMFoiLDAsImFlYmE0MDVkNGM0YjBjOGM4MGUzOWExOGMxNDNmNmFkMzMwODI4ZmQwZGU0YzUzNDQ5NDM3YzZjZDk1ZmZmYzUiXQ"
        }
      }
    }
  }
  ```

* ### Read a Rollout through its Node ID

  #### Description

  Fetch a Rollout by its global ID. This query requires \`read\_rollouts\`. See the \[Rollout reference]\(https://shopify.dev/docs/api/admin-graphql/2026-10/objects/Rollout) for available fields.

  #### Query

  ```graphql
  query ReadRolloutNode($id: ID!) {
    node(id: $id) {
      ... on Rollout {
        id
        name
      }
    }
  }
  ```

  #### Variables

  ```json
  {
    "id": "gid://shopify/Rollout/885624881"
  }
  ```

  #### cURL

  ```bash
  curl -X POST \
  https://your-development-store.myshopify.com/admin/api/2026-10/graphql.json \
  -H 'Content-Type: application/json' \
  -H 'X-Shopify-Access-Token: {access_token}' \
  -d '{
  "query": "query ReadRolloutNode($id: ID!) { node(id: $id) { ... on Rollout { id name } } }",
   "variables": {
      "id": "gid://shopify/Rollout/885624881"
    }
  }'
  ```

  #### React Router

  ```javascript
  import { authenticate } from "../shopify.server";

  export const loader = async ({request}) => {
    const { admin } = await authenticate.admin(request);
    const response = await admin.graphql(
      `#graphql
    query ReadRolloutNode($id: ID!) {
      node(id: $id) {
        ... on Rollout {
          id
          name
        }
      }
    }`,
    {
      variables: {
          "id": "gid://shopify/Rollout/885624881"
      },
    },
    );
    const json = await response.json();
    return json.data;
  }
  ```

  #### Ruby

  ```ruby
  session = ShopifyAPI::Auth::Session.new(
    shop: "your-development-store.myshopify.com",
    access_token: access_token
  )
  client = ShopifyAPI::Clients::Graphql::Admin.new(
    session: session
  )

  query = <<~QUERY
    query ReadRolloutNode($id: ID!) {
      node(id: $id) {
        ... on Rollout {
          id
          name
        }
      }
    }
  QUERY

  variables = {
    "id": "gid://shopify/Rollout/885624881"
  }

  response = client.query(query: query, variables: variables)
  ```

  #### Node.js

  ```javascript
  const client = new shopify.clients.Graphql({session});
  const data = await client.query({
    data: {
      "query": `query ReadRolloutNode($id: ID!) {
        node(id: $id) {
          ... on Rollout {
            id
            name
          }
        }
      }`,
      "variables": {
          "id": "gid://shopify/Rollout/885624881"
      },
    },
  });
  ```

  #### Shopify CLI

  ```bash
  shopify app execute \
  --query \
  'query ReadRolloutNode($id: ID!) {
    node(id: $id) {
      ... on Rollout {
        id
        name
      }
    }
  }' \
  --variables \
  '{
    "id": "gid://shopify/Rollout/885624881"
  }'
  ```

  #### Direct API Access

  ```javascript
  const response = await fetch('shopify:admin/api/2026-10/graphql.json', {
    method: 'POST',
    body: JSON.stringify({
      query: `
        query ReadRolloutNode($id: ID!) {
          node(id: $id) {
            ... on Rollout {
              id
              name
            }
          }
        }
      `,
      variables: {
          "id": "gid://shopify/Rollout/885624881"
      },
    }),
  });

  const { data } = await response.json();
  console.log(data);
  ```

  #### Response

  ```json
  {
    "node": {
      "id": "gid://shopify/Rollout/885624881",
      "name": "Black Friday sale"
    }
  }
  ```

* ### Retrieve a product using a node query

  #### Description

  The following query retrieves a product using its ID.

  #### Query

  ```graphql
  query {
    node(id: "gid://shopify/Product/108828309") {
      id
      ... on Product {
        title
        handle
      }
    }
  }
  ```

  #### cURL

  ```bash
  curl -X POST \
  https://your-development-store.myshopify.com/admin/api/2026-10/graphql.json \
  -H 'Content-Type: application/json' \
  -H 'X-Shopify-Access-Token: {access_token}' \
  -d '{
  "query": "query { node(id: \"gid://shopify/Product/108828309\") { id ... on Product { title handle } } }"
  }'
  ```

  #### React Router

  ```javascript
  import { authenticate } from "../shopify.server";

  export const loader = async ({request}) => {
    const { admin } = await authenticate.admin(request);
    const response = await admin.graphql(
      `#graphql
    query {
      node(id: "gid://shopify/Product/108828309") {
        id
        ... on Product {
          title
          handle
        }
      }
    }`,
    );
    const json = await response.json();
    return json.data;
  }
  ```

  #### Ruby

  ```ruby
  session = ShopifyAPI::Auth::Session.new(
    shop: "your-development-store.myshopify.com",
    access_token: access_token
  )
  client = ShopifyAPI::Clients::Graphql::Admin.new(
    session: session
  )

  query = <<~QUERY
    query {
      node(id: "gid://shopify/Product/108828309") {
        id
        ... on Product {
          title
          handle
        }
      }
    }
  QUERY

  response = client.query(query: query)
  ```

  #### Node.js

  ```javascript
  const client = new shopify.clients.Graphql({session});
  const data = await client.query({
    data: `query {
      node(id: "gid://shopify/Product/108828309") {
        id
        ... on Product {
          title
          handle
        }
      }
    }`,
  });
  ```

  #### Shopify CLI

  ```bash
  shopify app execute \
  --query \
  'query {
    node(id: "gid://shopify/Product/108828309") {
      id
      ... on Product {
        title
        handle
      }
    }
  }'
  ```

  #### Direct API Access

  ```javascript
  const response = await fetch('shopify:admin/api/2026-10/graphql.json', {
    method: 'POST',
    body: JSON.stringify({
      query: `
        query {
          node(id: "gid://shopify/Product/108828309") {
            id
            ... on Product {
              title
              handle
            }
          }
        }
      `,
    }),
  });

  const { data } = await response.json();
  console.log(data);
  ```

  #### Response

  ```json
  {
    "node": {
      "id": "gid://shopify/Product/108828309",
      "title": "Draft",
      "handle": "draft"
    }
  }
  ```
