Zack Saadioui
1/25/2025
1
productCreate
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
mutation productCreate($input: ProductInput!) { productCreate(input: $input) { product { id title variants(first: 5) { edges { node { id title price sku } } } } userErrors { field message } } }
1 2 3 4 5 6 7 8 9 10 11 12
{ "input": { "title": "Cool T-Shirt", "variants": [ { "title": "Small - Red", "sku": "CTR-S", "price": "20.00" }, { "title": "Medium - Red", "sku": "CTR-M", "price": "20.00" }, { "title": "Large - Red", "sku": "CTR-L", "price": "20.00" }, { "title": "Small - Blue", "sku": "CTB-S", "price": "20.00" }, { "title": "Medium - Blue", "sku": "CTB-M", "price": "20.00" } ] } }
1
productVariantsBulkCreate
1 2 3 4 5 6 7 8 9 10 11 12 13
mutation productVariantsBulkCreate($input: [ProductVariantInput!]!) { productVariantsBulkCreate(input: $input) { productVariants { id title price } userErrors { field message } } }
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
{ "input": [ { "productId": "gid://shopify/Product/123456789", "title": "Extra-Large - Red", "sku": "CTR-XL", "price": "22.00" }, { "productId": "gid://shopify/Product/123456789", "title": "Extra-Large - Blue", "sku": "CTB-XL", "price": "22.00" } ] }
1
userErrors
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
query getProductWithVariants($id: ID!) { product(id: $id) { id title variants(first: 10) { edges { node { id title price } } } } }
1
productVariantUpdate
1 2 3 4 5 6 7 8 9 10 11 12 13
mutation productVariantUpdate($input: ProductVariantInput!) { productVariantUpdate(input: $input) { productVariant { id title price } userErrors { field message } } }
1
productVariantDelete
1 2 3 4 5 6 7 8 9
mutation productVariantDelete($id: ID!) { productVariantDelete(input: { id: $id }) { deletedVariantId userErrors { field message } } }
Copyright © Arsturn 2025