Discuss all the new features introduced with the new product model in GraphQL.
i'm using api version 2024-07
i got INTERNAL_SERVER_ERROR when i send graphQL request on postman.
mutation productVariantsBulkCreate($productId: ID!, $variants: [ProductVariantsBulkInput!]!) {
productVariantsBulkCreate(productId: $productId, variants: $variants) {
product {
id
}
productVariants {
id
}
userErrors {
field
message
}
}
}
{ "productId": "gid://shopify/Product/10008656740625", "strategy": "REMOVE_STANDALONE_VARIANT", "variants": [ { "price": "15", "inventoryItem": { "sku": "2-964654651-1" }, "optionValues": [ { "optionName": "size", "name": "x" }, { "optionName": "Color", "name": "p" } ] } ] }
response:
{ "errors": [ { "message": "Internal error. Looks like something went wrong on our end.\nRequest ID: 12ac3a5b-2154-4455-b326-f771b81e53e5-1723557009 (include this in support requests).", "extensions": { "code": "INTERNAL_SERVER_ERROR", "requestId": "12ac3a5b-2154-4455-b326-f771b81e53e5-1723557009" } } ] }
even if i remove "strategy": "REMOVE_STANDALONE_VARIANT" on variables.
still got same error
Hi @xskj
Looks like you are missing SKU value for the variant.
Will make sure to pass this to the team to improve the error message