A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
I'm migrating to the latest API and am trying to use productSet to create a parent bundle product.
When using productSet - the newly created bundle product is not being associated with the app that created it.
When using productCreate - the newly created bundle product is correctly being associated with the app that created it.
In the examples below, I'm using GraphiQL to create the products with 2024-10
productCreate
mutation createProductMetafields($input: ProductInput!) {
productCreate(input: $input) {
product {
id
title
tags
status
productType
}
userErrors {
message
field
}
}
}
{
"input": {
"title": "GraphiQL productCreate Product",
"productType": "Bundle",
"tags": "graphiql-bundle-product",
"status": "ACTIVE",
"claimOwnership": {
"bundles": true
}
}
}
productCreate result
productSet
mutation createProductSynchronous($productSet: ProductSetInput!, $synchronous: Boolean!) {
productSet(synchronous: $synchronous, input: $productSet) {
product {
id
title
status
templateSuffix
variants(first: 10) {
edges {
node {
id
title
price
compareAtPrice
requiresComponents
inventoryPolicy
}
}
}
}
userErrors {
code
field
message
}
}
}
{
"productSet": {
"claimOwnership": {
"bundles": true
},
"productOptions": [
{
"name": "Title",
"values": [
{
"name": "Default Title"
}
]
}
],
"productType": "Bundle",
"status": "ACTIVE",
"tags": "graphiql-bundle-product",
"title": "Graphiql productSet product",
"variants": [
{
"compareAtPrice": 38,
"inventoryPolicy": "DENY",
"optionValues": [
{
"name": "Default Title",
"optionName": "Title"
}
],
"price": 34.2,
"requiresComponents": true
}
]
},
"synchronous": true
}
result