POST https://toby-test-store-1002.myshopify.com/admin/api/2025-01/graphql.json
QUERY
mutation ProductSet($input: ProductSetInput!) {
productSet(input: $input) { product { title vendor tags status id options { name position optionValues { name id } } descriptionHtml handle onlineStoreUrl variants(first: 2000) { nodes { price barcode compareAtPrice inventoryPolicy id position inventoryItem { sku id measurement { weight { value unit } } tracked unitCost { amount currencyCode } } taxable selectedOptions { value } } } } }
}
VARIABLES {
"input": {
"title": "The Complete Snowboard",
"vendor": "Snowboard Vendor",
"tags": [
"Fulfilled by Canal"
],
"status": "DRAFT",
"descriptionHtml": "This <b>PREMIUM</b> <i>snowboard</i> is so <b>SUPER</b><i>DUPER</i> awesome!<br><br>Fulfilled by toby-test-store-104",
"productOptions": [
{
"name": "Color",
"position": null,
"values": [
{
"name": "Ice"
},
{
"name": "Dawn"
},
{
"name": "Powder"
},
{
"name": "Electric"
},
{
"name": "Sunset"
}
]
}
],
"variants": [
{
"price": "699.95",
"barcode": null,
"compareAtPrice": null,
"inventoryPolicy": "DENY",
"optionValues": [
{
"name": "Ice",
"optionName": "Color"
}
],
"inventoryItem": {
"sku": "CANAL_SKU_3AAE30E03B7948059A87B562904E4E8F",
"measurement": {
"weight": {
"value": 10.0,
"unit": "POUNDS"
}
},
"tracked": true,
"cost": null
},
"inventoryQuantities": [
{
"locationId": "gid://shopify/Location/73145024674",
"name": "available",
"quantity": 0
}
]
},
{
"price": "699.95",
"barcode": null,
"compareAtPrice": null,
"inventoryPolicy": "DENY",
"optionValues": [
{
"name": "Dawn",
"optionName": "Color"
}
],
"inventoryItem": {
"sku": "CANAL_SKU_AC22DA74509A4885BAB13F9DD943CADA",
"measurement": {
"weight": {
"value": 10.0,
"unit": "POUNDS"
}
},
"tracked": true,
"cost": null
},
"inventoryQuantities": [
{
"locationId": "gid://shopify/Location/73145024674",
"name": "available",
"quantity": 0
}
]
},
{
"price": "699.95",
"barcode": null,
"compareAtPrice": null,
"inventoryPolicy": "DENY",
"optionValues": [
{
"name": "Powder",
"optionName": "Color"
}
],
"inventoryItem": {
"sku": "CANAL_SKU_AD97832DD8D44B2389C9BED566EEC3B6",
"measurement": {
"weight": {
"value": 10.0,
"unit": "POUNDS"
}
},
"tracked": true,
"cost": null
},
"inventoryQuantities": [
{
"locationId": "gid://shopify/Location/73145024674",
"name": "available",
"quantity": 0
}
]
},
{
"price": "699.95",
"barcode": null,
"compareAtPrice": null,
"inventoryPolicy": "DENY",
"optionValues": [
{
"name": "Electric",
"optionName": "Color"
}
],
"inventoryItem": {
"sku": "CANAL_SKU_7D7A9F38A99440DAACFF00682ACBB45C",
"measurement": {
"weight": {
"value": 10.0,
"unit": "POUNDS"
}
},
"tracked": true,
"cost": null
},
"inventoryQuantities": [
{
"locationId": "gid://shopify/Location/73145024674",
"name": "available",
"quantity": 0
}
]
},
{
"price": "699.95",
"barcode": null,
"compareAtPrice": null,
"inventoryPolicy": "DENY",
"optionValues": [
{
"name": "Sunset",
"optionName": "Color"
}
],
"inventoryItem": {
"sku": "CANAL_SKU_1723D45867A443A0B2824630B4699BD2",
"measurement": {
"weight": {
"value": 10.0,
"unit": "POUNDS"
}
},
"tracked": true,
"cost": null
},
"inventoryQuantities": [
{
"locationId": "gid://shopify/Location/73145024674",
"name": "available",
"quantity": 0
}
]
}
]
}
}
RESPONSE {
"errors": [
{
"message": "first cannot exceed 250. To query larger amounts of data with fewer limits, bulk operations should be used instead.\nSee https://shopify.dev/api/usage/bulk-operations/queries for usage details.\n",
"locations": [
{
"line": 3,
"column": 168
}
],
"path": [
"productSet",
"product",
"variants"
]
}
],
"data": {
"productSet": {
"product": null
}
},
"extensions": {
"cost": {
"requestedQueryCost": 99,
"actualQueryCost": 53,
"throttleStatus": {
"maximumAvailable": 2000.0,
"currentlyAvailable": 1947,
"restoreRate": 100.0
}
}
}
}
based on this post Enhanced variant query limits for single product queries — Shopify developer changelog I assumed I would be able to query up to 2000 variants, but its still telling me that “first” cannot exceed 250. how can I query all 2000 variants at once?