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
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"
}
cURL
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
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
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
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
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
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
{
"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
query ReadRolloutNode($id: ID!) {
node(id: $id) {
... on Rollout {
id
name
}
}
}
Variables
{
"id": "gid://shopify/Rollout/885624881"
}
cURL
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
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
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
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
shopify app execute \
--query \
'query ReadRolloutNode($id: ID!) {
node(id: $id) {
... on Rollout {
id
name
}
}
}' \
--variables \
'{
"id": "gid://shopify/Rollout/885624881"
}'
Direct API Access
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
{
"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
query {
node(id: "gid://shopify/Product/108828309") {
id
... on Product {
title
handle
}
}
}
cURL
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
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
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
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
shopify app execute \
--query \
'query {
node(id: "gid://shopify/Product/108828309") {
id
... on Product {
title
handle
}
}
}'
Direct API Access
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
{
"node": {
"id": "gid://shopify/Product/108828309",
"title": "Draft",
"handle": "draft"
}
}