Encounter INTERNAL SERVER ERROR when use graphql

I am using GraphQL api to create variant for a product, and I kept running in to this error:

{
    "errors": [
        {
            "message": "Internal error. Looks like something went wrong on our end.\nRequest ID: 47948838-1972-4158-9a89-2c85ee548a0d-1721804614 (include this in support requests).",
            "extensions": {
                "code": "INTERNAL_SERVER_ERROR",
                "requestId": "47948838-1972-4158-9a89-2c85ee548a0d-1721804614"
            }
        }
    ]
}

Here is my query:

mutation productVariantsBulkCreate($productId: ID!, $variants: [ProductVariantsBulkInput!]!) {
    productVariantsBulkCreate(productId: $productId, variants: $variants) {
      productVariants {
        id
        selectedOptions{
            value
        }
        title
        image{
            url
        }
        inventoryItem{
            id
        }
      }
      userErrors {
        field
        message
      }
    }
  }

The store was built on 2024/07/05, and so was the product. Is it possible to due to the new product API? What’s the constraint of creating a variant now.

We are running an APP that has user productVariantBulkCreate GraphQL mutation, would need to solve this issue if create variant for new product is an issue.

1 Like

Hi @jeff07232

Here are my request parameters, you can compare and refer to them, or provide your request parameters for analysis together

{"productId":"gid://shopify/Product/9208345362707","strategy":"REMOVE_STANDALONE_VARIANT","variants":[{"price":"15","sku":"2-964654651-1","optionValues":[{"optionName":"size","name":"x"},{"optionName":"color","name":"p"}]},{"price":"15","sku":"2-964654652-1","optionValues":[{"optionName":"size","name":"x"},{"optionName":"color","name":"r"}]},{"price":"15","sku":"2-964654653-1","optionValues":[{"optionName":"size","name":"x"},{"optionName":"color","name":"w"}]},{"price":"15","sku":"2-964654659-1","optionValues":[{"optionName":"size","name":"s"},{"optionName":"color","name":"p"}]},{"price":"15","sku":"2-964654658-1","optionValues":[{"optionName":"size","name":"s"},{"optionName":"color","name":"r"}]},{"price":"14","sku":"2-964654657-1","optionValues":[{"optionName":"size","name":"s"},{"optionName":"color","name":"w"}]},{"price":"15","sku":"2-964654656-1","optionValues":[{"optionName":"size","name":"m"},{"optionName":"color","name":"p"}]},{"price":"13.5","sku":"2-964654655-1","optionValues":[{"optionName":"size","name":"m"},{"optionName":"color","name":"r"}]},{"price":"15","sku":"2-964654654-1","optionValues":[{"optionName":"size","name":"m"},{"optionName":"color","name":"w"}]}]}

Hello,

Which version of API you are using. My server has a old version of shopify api, and we might need some time to migrate it. So the question is that is the issue related to the new version of product? I saw there is a “REMOVE_STANDALONE_VARIANT” input in your request.

Hi @jeff07232

The API version I am using is 2024-04, and I suspect it may not be related to the version, but rather due to some issues with your parameters.