Product Created via GraphQL Appears in Products but Is Not Visible in Online Store

I have an error. I created a product with Shopify GraphQL, and after finishing the creation, I found it was added to Products, but when I opened the market to view it, I couldn’t find it

image

the query I used to Create it


mutation CreateAfricaEsimProduct {
  productCreate(
    product: {
      title: "Africa eSIM"
      descriptionHtml: "Coverage: 15+ African countries Data: 10GB High-speed Validity: 15 days"
      vendor: "Esim-Market"
      status: ACTIVE
      tags: ["africa", "region"]
    }
    media: [{
      alt: "Africa eSIM Coverage Map"
      mediaContentType: IMAGE
      originalSource: "https://cdn.shopify.com/s/files/1/0723/5983/7848/files/africa-1.jpg?v=1755771387"
    }]
  ) {
    product {
      id
      title
      handle
      descriptionHtml
      vendor
      status
      tags
    }
    userErrors {
      field
      message
    }
  }
}

Response

{
  "data": {
    "productCreate": {
      "product": {
        "id": "gid://shopify/Product/8821708980376",
        "title": "Africa eSIM",
        "handle": "africa-esim",
        "descriptionHtml": "Coverage: 15+ African countries Data: 10GB High-speed Validity: 15 days",
        "vendor": "Esim-Market",
        "status": "ACTIVE",
        "tags": [
          "africa",
          "region"
        ]
      },
      "userErrors": []
    }
  },
  "extensions": {
    "cost": {
      "requestedQueryCost": 10,
      "actualQueryCost": 10,
      "throttleStatus": {
        "maximumAvailable": 2000,
        "currentlyAvailable": 1990,
        "restoreRate": 100
      }
    }
  }
}

Request at add price


mutation AddAfricaEsimVariant {
  productVariantsBulkCreate(
    productId: "gid://shopify/Product/8821708980376"
    variants: [
      {
        optionValues: [
          { optionName: "Title", name: "Default Title1" }
        ]
        price: "200.00"
        inventoryQuantities: [
          {
            availableQuantity: 100
            locationId: "gid://shopify/Location/81457807512"
          }
        ]
      }
    ]
  ) {
    productVariants {
      id
      title
      price
    }
    userErrors {
      field
      message
    }
  }
}

Response


{
  "data": {
    "productVariantsBulkCreate": {
      "productVariants": [
        {
          "id": "gid://shopify/ProductVariant/47061995946136",
          "title": "Default Title1",
          "price": "200.00"
        }
      ],
      "userErrors": []
    }
  },
  "extensions": {
    "cost": {
      "requestedQueryCost": 10,
      "actualQueryCost": 10,
      "throttleStatus": {
        "maximumAvailable": 2000,
        "currentlyAvailable": 1990,
        "restoreRate": 100
      }
    }
  }
}

You haven’t published it to any channels, you’ll need to publish it.

1 Like