combined Listing Updatemutation
Requires write
access scope. Also: The user must have permission to manage products.
Add, remove and update Combined
s of a given Product.
Combined
s are comprised of multiple products to create a single listing. There are two kinds of products used in a Combined
:
- Parent products
- Child products
The parent product is created with a product
with a Combined
of P
. Once created, you can associate child products with the parent product using this mutation. Parent products represent the idea of a product (e.g. Shoe).
Child products represent a particular option value (or combination of option values) of a parent product. For instance, with your Shoe parent product, you may have several child products representing specific colors of the shoe (e.g. Shoe - Blue). You could also have child products representing more than a single option (e.g. Shoe - Blue/Canvas, Shoe - Blue/Leather, etc...).
The combined listing is the association of parent product to one or more child products.
Learn more about Combined Listings.
Arguments
Anchor to optionsAndValuesoptionsAndValuesThe ordered options and values to be used by the combined listing. Options and values will be reordered to match the order specified here.
The ID of the parent product.
Anchor to productsAddedproductsAddedThe child products to add and their assigned options and option values.
Anchor to productsEditedproductsEditedThe child products to edit and their assigned options and option values.
Anchor to productsRemovedIdsproductsRemovedIdsThe IDs of products to be removed from the combined listing.
The updated title for the combined listing.
CombinedListingUpdatePayload returns
The parent product.
The list of errors that occurred from executing the mutation.
Code examples for MUTATION: combinedListingUpdate
Query Reference for MUTATION: combinedListingUpdate
"mutation combinedListingUpdate($parentProductId: ID!) {\n combinedListingUpdate(parentProductId: $parentProductId) {\n product {\n # Product fields\n }\n userErrors {\n field\n message\n }\n }\n}"
Input Reference for MUTATION: combinedListingUpdate
"{\n \"optionsAndValues\": [\n {\n \"linkedMetafield\": {\n \"key\": \"<your-key>\",\n \"namespace\": \"<your-namespace>\",\n \"values\": [\n \"<your-values>\"\n ]\n },\n \"name\": \"<your-name>\",\n \"optionId\": \"gid://shopify/<objectName>/10079785100\",\n \"values\": [\n \"<your-values>\"\n ]\n }\n ],\n \"parentProductId\": \"gid://shopify/<objectName>/10079785100\",\n \"productsAdded\": [\n {\n \"childProductId\": \"gid://shopify/<objectName>/10079785100\",\n \"selectedParentOptionValues\": [\n {\n \"linkedMetafieldValue\": \"<your-linkedMetafieldValue>\",\n \"name\": \"<your-name>\",\n \"value\": \"<your-value>\"\n }\n ]\n }\n ],\n \"productsEdited\": [\n {\n \"childProductId\": \"gid://shopify/<objectName>/10079785100\",\n \"selectedParentOptionValues\": [\n {\n \"linkedMetafieldValue\": \"<your-linkedMetafieldValue>\",\n \"name\": \"<your-name>\",\n \"value\": \"<your-value>\"\n }\n ]\n }\n ],\n \"productsRemovedIds\": [\n \"gid://shopify/<objectName>/10079785100\"\n ],\n \"title\": \"<your-title>\"\n}"
Schema Reference for MUTATION: combinedListingUpdate
"input OptionAndValueInput {\n linkedMetafield: LinkedMetafieldInput\n name: String!\n optionId: ID\n values: [String!]!\n}\n\ninput LinkedMetafieldInput {\n key: String!\n namespace: String!\n values: [String!]!\n}\n\ninput ChildProductRelationInput {\n childProductId: ID!\n selectedParentOptionValues: [SelectedVariantOptionInput!]!\n}\n\ninput SelectedVariantOptionInput {\n linkedMetafieldValue: String\n name: String!\n value: String!\n}\n"
Display Examples for MUTATION: combinedListingUpdate
[ { "example": { "type_name": "combinedlistingupdate", "title": "Add child products to a combined listing", "description": "Add new child products to an existing combined listing product.\n", "query_string": "mutation AddChildProductsToCombinedListing($parentProductId: ID!, $productsAdded: [ChildProductRelationInput!], $optionsAndValues: [OptionAndValueInput!]) {\n combinedListingUpdate(parentProductId: $parentProductId, productsAdded: $productsAdded, optionsAndValues: $optionsAndValues) {\n product {\n id\n combinedListing {\n combinedListingChildren(first: 10) {\n nodes {\n product {\n id\n }\n parentVariant {\n selectedOptions {\n value\n }\n }\n }\n }\n }\n }\n userErrors {\n code\n field\n message\n }\n }\n}", "variables": { "parentProductId": "gid://shopify/Product/108828309", "productsAdded": [ { "childProductId": "gid://shopify/Product/121709582", "selectedParentOptionValues": [ { "name": "color", "value": "Blue" }, { "name": "size", "value": "12" } ] }, { "childProductId": "gid://shopify/Product/912855135", "selectedParentOptionValues": [ { "name": "color", "value": "Red" }, { "name": "size", "value": "12" } ] } ], "optionsAndValues": [ { "name": "color", "values": [ "Blue", "Red" ] }, { "name": "size", "values": [ "12" ] } ] }, "response": { "data": { "combinedListingUpdate": { "product": { "id": "gid://shopify/Product/108828309", "combinedListing": { "combinedListingChildren": { "nodes": [ { "product": { "id": "gid://shopify/Product/121709582" }, "parentVariant": { "selectedOptions": [ { "value": "Blue" }, { "value": "12" } ] } }, { "product": { "id": "gid://shopify/Product/912855135" }, "parentVariant": { "selectedOptions": [ { "value": "Red" }, { "value": "12" } ] } } ] } } }, "userErrors": [] } } }, "api_name": "admin", "minimum_api_version": "2024-07", "maximum_api_version": "unstable", "location": "/components/merchandising/test/unit/graph_api/admin/mutations/combined_listings/combined_listing_update_test.rb", "curl_example": "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2024-10/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"mutation AddChildProductsToCombinedListing($parentProductId: ID!, $productsAdded: [ChildProductRelationInput!], $optionsAndValues: [OptionAndValueInput!]) { combinedListingUpdate(parentProductId: $parentProductId, productsAdded: $productsAdded, optionsAndValues: $optionsAndValues) { product { id combinedListing { combinedListingChildren(first: 10) { nodes { product { id } parentVariant { selectedOptions { value } } } } } } userErrors { code field message } } }\",\n \"variables\": {\n \"parentProductId\": \"gid://shopify/Product/108828309\",\n \"productsAdded\": [\n {\n \"childProductId\": \"gid://shopify/Product/121709582\",\n \"selectedParentOptionValues\": [\n {\n \"name\": \"color\",\n \"value\": \"Blue\"\n },\n {\n \"name\": \"size\",\n \"value\": \"12\"\n }\n ]\n },\n {\n \"childProductId\": \"gid://shopify/Product/912855135\",\n \"selectedParentOptionValues\": [\n {\n \"name\": \"color\",\n \"value\": \"Red\"\n },\n {\n \"name\": \"size\",\n \"value\": \"12\"\n }\n ]\n }\n ],\n \"optionsAndValues\": [\n {\n \"name\": \"color\",\n \"values\": [\n \"Blue\",\n \"Red\"\n ]\n },\n {\n \"name\": \"size\",\n \"values\": [\n \"12\"\n ]\n }\n ]\n }\n}'\n", "remix_example": "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n mutation AddChildProductsToCombinedListing($parentProductId: ID!, $productsAdded: [ChildProductRelationInput!], $optionsAndValues: [OptionAndValueInput!]) {\n combinedListingUpdate(parentProductId: $parentProductId, productsAdded: $productsAdded, optionsAndValues: $optionsAndValues) {\n product {\n id\n combinedListing {\n combinedListingChildren(first: 10) {\n nodes {\n product {\n id\n }\n parentVariant {\n selectedOptions {\n value\n }\n }\n }\n }\n }\n }\n userErrors {\n code\n field\n message\n }\n }\n }`,\n {\n variables: {\n \"parentProductId\": \"gid://shopify/Product/108828309\",\n \"productsAdded\": [\n {\n \"childProductId\": \"gid://shopify/Product/121709582\",\n \"selectedParentOptionValues\": [\n {\n \"name\": \"color\",\n \"value\": \"Blue\"\n },\n {\n \"name\": \"size\",\n \"value\": \"12\"\n }\n ]\n },\n {\n \"childProductId\": \"gid://shopify/Product/912855135\",\n \"selectedParentOptionValues\": [\n {\n \"name\": \"color\",\n \"value\": \"Red\"\n },\n {\n \"name\": \"size\",\n \"value\": \"12\"\n }\n ]\n }\n ],\n \"optionsAndValues\": [\n {\n \"name\": \"color\",\n \"values\": [\n \"Blue\",\n \"Red\"\n ]\n },\n {\n \"name\": \"size\",\n \"values\": [\n \"12\"\n ]\n }\n ]\n },\n },\n);\n\nconst data = await response.json();\n", "ruby_example": "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n mutation AddChildProductsToCombinedListing($parentProductId: ID!, $productsAdded: [ChildProductRelationInput!], $optionsAndValues: [OptionAndValueInput!]) {\n combinedListingUpdate(parentProductId: $parentProductId, productsAdded: $productsAdded, optionsAndValues: $optionsAndValues) {\n product {\n id\n combinedListing {\n combinedListingChildren(first: 10) {\n nodes {\n product {\n id\n }\n parentVariant {\n selectedOptions {\n value\n }\n }\n }\n }\n }\n }\n userErrors {\n code\n field\n message\n }\n }\n }\nQUERY\n\nvariables = {\n \"parentProductId\": \"gid://shopify/Product/108828309\",\n \"productsAdded\": [{\"childProductId\"=>\"gid://shopify/Product/121709582\", \"selectedParentOptionValues\"=>[{\"name\"=>\"color\", \"value\"=>\"Blue\"}, {\"name\"=>\"size\", \"value\"=>\"12\"}]}, {\"childProductId\"=>\"gid://shopify/Product/912855135\", \"selectedParentOptionValues\"=>[{\"name\"=>\"color\", \"value\"=>\"Red\"}, {\"name\"=>\"size\", \"value\"=>\"12\"}]}],\n \"optionsAndValues\": [{\"name\"=>\"color\", \"values\"=>[\"Blue\", \"Red\"]}, {\"name\"=>\"size\", \"values\"=>[\"12\"]}]\n}\n\nresponse = client.query(query: query, variables: variables)\n", "node_example": "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation AddChildProductsToCombinedListing($parentProductId: ID!, $productsAdded: [ChildProductRelationInput!], $optionsAndValues: [OptionAndValueInput!]) {\n combinedListingUpdate(parentProductId: $parentProductId, productsAdded: $productsAdded, optionsAndValues: $optionsAndValues) {\n product {\n id\n combinedListing {\n combinedListingChildren(first: 10) {\n nodes {\n product {\n id\n }\n parentVariant {\n selectedOptions {\n value\n }\n }\n }\n }\n }\n }\n userErrors {\n code\n field\n message\n }\n }\n }`,\n \"variables\": {\n \"parentProductId\": \"gid://shopify/Product/108828309\",\n \"productsAdded\": [\n {\n \"childProductId\": \"gid://shopify/Product/121709582\",\n \"selectedParentOptionValues\": [\n {\n \"name\": \"color\",\n \"value\": \"Blue\"\n },\n {\n \"name\": \"size\",\n \"value\": \"12\"\n }\n ]\n },\n {\n \"childProductId\": \"gid://shopify/Product/912855135\",\n \"selectedParentOptionValues\": [\n {\n \"name\": \"color\",\n \"value\": \"Red\"\n },\n {\n \"name\": \"size\",\n \"value\": \"12\"\n }\n ]\n }\n ],\n \"optionsAndValues\": [\n {\n \"name\": \"color\",\n \"values\": [\n \"Blue\",\n \"Red\"\n ]\n },\n {\n \"name\": \"size\",\n \"values\": [\n \"12\"\n ]\n }\n ]\n },\n },\n});\n", "php_example": "use Shopify\\Clients\\Graphql;\n\n$client = new Graphql(\"your-development-store.myshopify.com\", $accessToken);\n$query = <<<QUERY\n mutation AddChildProductsToCombinedListing($parentProductId: ID!, $productsAdded: [ChildProductRelationInput!], $optionsAndValues: [OptionAndValueInput!]) {\n combinedListingUpdate(parentProductId: $parentProductId, productsAdded: $productsAdded, optionsAndValues: $optionsAndValues) {\n product {\n id\n combinedListing {\n combinedListingChildren(first: 10) {\n nodes {\n product {\n id\n }\n parentVariant {\n selectedOptions {\n value\n }\n }\n }\n }\n }\n }\n userErrors {\n code\n field\n message\n }\n }\n }\nQUERY;\n\n$variables = [\n \"parentProductId\" => \"gid://shopify/Product/108828309\",\n \"productsAdded\" => [{\"childProductId\"=>\"gid://shopify/Product/121709582\", \"selectedParentOptionValues\"=>[{\"name\"=>\"color\", \"value\"=>\"Blue\"}, {\"name\"=>\"size\", \"value\"=>\"12\"}]}, {\"childProductId\"=>\"gid://shopify/Product/912855135\", \"selectedParentOptionValues\"=>[{\"name\"=>\"color\", \"value\"=>\"Red\"}, {\"name\"=>\"size\", \"value\"=>\"12\"}]}],\n \"optionsAndValues\" => [{\"name\"=>\"color\", \"values\"=>[\"Blue\", \"Red\"]}, {\"name\"=>\"size\", \"values\"=>[\"12\"]}],\n];\n\n$response = $client->query([\"query\" => $query, \"variables\" => $variables]);\n" }, "titleStringKey": "variables", "inputVariableEntries": [ { "arg": { "name": "parentProductId", "description": "The ID of the parent product.", "type": { "kind": "SCALAR", "name": "ID", "list": false, "non_null": true }, "defaultValue": null, "typeSignature": "ID!", "isDeprecated": false, "deprecationReason": null, "kind": "ARGUMENT" }, "key": "parentProductId", "argValue": " \"gid://shopify/Product/108828309\"", "typeKind": "MUTATION" }, { "arg": { "name": "productsAdded", "description": "The child products to add and their assigned options and option values.", "type": { "kind": "INPUT_OBJECT", "name": "ChildProductRelationInput", "list": true, "non_null": false }, "defaultValue": null, "typeSignature": "[ChildProductRelationInput!]", "isDeprecated": false, "deprecationReason": null, "kind": "ARGUMENT" }, "key": "productsAdded", "argValue": " [{\"childProductId\":\"gid://shopify/Product/121709582\",\"selectedParentOptionValues\":[{\"name\":\"color\",\"value\":\"Blue\"},{\"name\":\"size\",\"value\":\"12\"}]},{\"childProductId\":\"gid://shopify/Product/912855135\",\"selectedParentOptionValues\":[{\"name\":\"color\",\"value\":\"Red\"},{\"name\":\"size\",\"value\":\"12\"}]}]", "typeKind": "MUTATION" }, { "arg": { "name": "optionsAndValues", "description": "The ordered options and values to be used by the combined listing. Options and values will be reordered to match the order specified here.", "type": { "kind": "INPUT_OBJECT", "name": "OptionAndValueInput", "list": true, "non_null": false }, "defaultValue": null, "typeSignature": "[OptionAndValueInput!]", "isDeprecated": false, "deprecationReason": null, "kind": "ARGUMENT" }, "key": "optionsAndValues", "argValue": " [{\"name\":\"color\",\"values\":[\"Blue\",\"Red\"]},{\"name\":\"size\",\"values\":[\"12\"]}]", "typeKind": "MUTATION" } ] }, { "example": { "type_name": "combinedlistingupdate", "title": "Remove child products from a combined listing", "description": "Remove child products from an existing combined listing product.\n", "query_string": "mutation RemoveChildProductsFromCombinedListing($parentProductId: ID!, $productsRemovedIds: [ID!]) {\n combinedListingUpdate(parentProductId: $parentProductId, productsRemovedIds: $productsRemovedIds) {\n product {\n id\n combinedListing {\n combinedListingChildren(first: 10) {\n nodes {\n product {\n id\n }\n }\n }\n }\n }\n userErrors {\n code\n field\n message\n }\n }\n}", "variables": { "parentProductId": "gid://shopify/Product/362339553", "productsRemovedIds": [ "gid://shopify/Product/223392616" ] }, "response": { "data": { "combinedListingUpdate": { "product": { "id": "gid://shopify/Product/362339553", "combinedListing": { "combinedListingChildren": { "nodes": [ { "product": { "id": "gid://shopify/Product/555575834" } } ] } } }, "userErrors": [] } } }, "api_name": "admin", "minimum_api_version": "2024-07", "maximum_api_version": "unstable", "location": "/components/merchandising/test/unit/graph_api/admin/mutations/combined_listings/combined_listing_update_test.rb", "curl_example": "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2024-10/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"mutation RemoveChildProductsFromCombinedListing($parentProductId: ID!, $productsRemovedIds: [ID!]) { combinedListingUpdate(parentProductId: $parentProductId, productsRemovedIds: $productsRemovedIds) { product { id combinedListing { combinedListingChildren(first: 10) { nodes { product { id } } } } } userErrors { code field message } } }\",\n \"variables\": {\n \"parentProductId\": \"gid://shopify/Product/362339553\",\n \"productsRemovedIds\": [\n \"gid://shopify/Product/223392616\"\n ]\n }\n}'\n", "remix_example": "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n mutation RemoveChildProductsFromCombinedListing($parentProductId: ID!, $productsRemovedIds: [ID!]) {\n combinedListingUpdate(parentProductId: $parentProductId, productsRemovedIds: $productsRemovedIds) {\n product {\n id\n combinedListing {\n combinedListingChildren(first: 10) {\n nodes {\n product {\n id\n }\n }\n }\n }\n }\n userErrors {\n code\n field\n message\n }\n }\n }`,\n {\n variables: {\n \"parentProductId\": \"gid://shopify/Product/362339553\",\n \"productsRemovedIds\": [\n \"gid://shopify/Product/223392616\"\n ]\n },\n },\n);\n\nconst data = await response.json();\n", "ruby_example": "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n mutation RemoveChildProductsFromCombinedListing($parentProductId: ID!, $productsRemovedIds: [ID!]) {\n combinedListingUpdate(parentProductId: $parentProductId, productsRemovedIds: $productsRemovedIds) {\n product {\n id\n combinedListing {\n combinedListingChildren(first: 10) {\n nodes {\n product {\n id\n }\n }\n }\n }\n }\n userErrors {\n code\n field\n message\n }\n }\n }\nQUERY\n\nvariables = {\n \"parentProductId\": \"gid://shopify/Product/362339553\",\n \"productsRemovedIds\": [\"gid://shopify/Product/223392616\"]\n}\n\nresponse = client.query(query: query, variables: variables)\n", "node_example": "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation RemoveChildProductsFromCombinedListing($parentProductId: ID!, $productsRemovedIds: [ID!]) {\n combinedListingUpdate(parentProductId: $parentProductId, productsRemovedIds: $productsRemovedIds) {\n product {\n id\n combinedListing {\n combinedListingChildren(first: 10) {\n nodes {\n product {\n id\n }\n }\n }\n }\n }\n userErrors {\n code\n field\n message\n }\n }\n }`,\n \"variables\": {\n \"parentProductId\": \"gid://shopify/Product/362339553\",\n \"productsRemovedIds\": [\n \"gid://shopify/Product/223392616\"\n ]\n },\n },\n});\n", "php_example": "use Shopify\\Clients\\Graphql;\n\n$client = new Graphql(\"your-development-store.myshopify.com\", $accessToken);\n$query = <<<QUERY\n mutation RemoveChildProductsFromCombinedListing($parentProductId: ID!, $productsRemovedIds: [ID!]) {\n combinedListingUpdate(parentProductId: $parentProductId, productsRemovedIds: $productsRemovedIds) {\n product {\n id\n combinedListing {\n combinedListingChildren(first: 10) {\n nodes {\n product {\n id\n }\n }\n }\n }\n }\n userErrors {\n code\n field\n message\n }\n }\n }\nQUERY;\n\n$variables = [\n \"parentProductId\" => \"gid://shopify/Product/362339553\",\n \"productsRemovedIds\" => [\"gid://shopify/Product/223392616\"],\n];\n\n$response = $client->query([\"query\" => $query, \"variables\" => $variables]);\n" }, "titleStringKey": "variables", "inputVariableEntries": [ { "arg": { "name": "parentProductId", "description": "The ID of the parent product.", "type": { "kind": "SCALAR", "name": "ID", "list": false, "non_null": true }, "defaultValue": null, "typeSignature": "ID!", "isDeprecated": false, "deprecationReason": null, "kind": "ARGUMENT" }, "key": "parentProductId", "argValue": " \"gid://shopify/Product/362339553\"", "typeKind": "MUTATION" }, { "arg": { "name": "productsRemovedIds", "description": "The IDs of products to be removed from the combined listing.", "type": { "kind": "SCALAR", "name": "ID", "list": true, "non_null": false }, "defaultValue": null, "typeSignature": "[ID!]", "isDeprecated": false, "deprecationReason": null, "kind": "ARGUMENT" }, "key": "productsRemovedIds", "argValue": " [\"gid://shopify/Product/223392616\"]", "typeKind": "MUTATION" } ] }, { "example": { "type_name": "combinedlistingupdate", "title": "Update option values of combined listing child product", "description": "Update child products of an existing combined listing product.\n", "query_string": "mutation UpdateChildProductsOfCombinedListing($parentProductId: ID!, $productsEdited: [ChildProductRelationInput!]) {\n combinedListingUpdate(parentProductId: $parentProductId, productsEdited: $productsEdited) {\n product {\n id\n combinedListing {\n combinedListingChildren(first: 10) {\n nodes {\n product {\n id\n }\n parentVariant {\n selectedOptions {\n value\n }\n }\n }\n }\n }\n }\n userErrors {\n code\n field\n message\n }\n }\n}", "variables": { "parentProductId": "gid://shopify/Product/362339553", "productsEdited": [ { "childProductId": "gid://shopify/Product/223392616", "selectedParentOptionValues": [ { "name": "Color", "value": "green" } ] }, { "childProductId": "gid://shopify/Product/555575834", "selectedParentOptionValues": [ { "name": "Color", "value": "blue" } ] } ] }, "response": { "data": { "combinedListingUpdate": { "product": { "id": "gid://shopify/Product/362339553", "combinedListing": { "combinedListingChildren": { "nodes": [ { "product": { "id": "gid://shopify/Product/555575834" }, "parentVariant": { "selectedOptions": [ { "value": "blue" } ] } }, { "product": { "id": "gid://shopify/Product/223392616" }, "parentVariant": { "selectedOptions": [ { "value": "green" } ] } } ] } } }, "userErrors": [] } } }, "api_name": "admin", "minimum_api_version": "2024-07", "maximum_api_version": "unstable", "location": "/components/merchandising/test/unit/graph_api/admin/mutations/combined_listings/combined_listing_update_test.rb", "curl_example": "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2024-10/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"mutation UpdateChildProductsOfCombinedListing($parentProductId: ID!, $productsEdited: [ChildProductRelationInput!]) { combinedListingUpdate(parentProductId: $parentProductId, productsEdited: $productsEdited) { product { id combinedListing { combinedListingChildren(first: 10) { nodes { product { id } parentVariant { selectedOptions { value } } } } } } userErrors { code field message } } }\",\n \"variables\": {\n \"parentProductId\": \"gid://shopify/Product/362339553\",\n \"productsEdited\": [\n {\n \"childProductId\": \"gid://shopify/Product/223392616\",\n \"selectedParentOptionValues\": [\n {\n \"name\": \"Color\",\n \"value\": \"green\"\n }\n ]\n },\n {\n \"childProductId\": \"gid://shopify/Product/555575834\",\n \"selectedParentOptionValues\": [\n {\n \"name\": \"Color\",\n \"value\": \"blue\"\n }\n ]\n }\n ]\n }\n}'\n", "remix_example": "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n mutation UpdateChildProductsOfCombinedListing($parentProductId: ID!, $productsEdited: [ChildProductRelationInput!]) {\n combinedListingUpdate(parentProductId: $parentProductId, productsEdited: $productsEdited) {\n product {\n id\n combinedListing {\n combinedListingChildren(first: 10) {\n nodes {\n product {\n id\n }\n parentVariant {\n selectedOptions {\n value\n }\n }\n }\n }\n }\n }\n userErrors {\n code\n field\n message\n }\n }\n }`,\n {\n variables: {\n \"parentProductId\": \"gid://shopify/Product/362339553\",\n \"productsEdited\": [\n {\n \"childProductId\": \"gid://shopify/Product/223392616\",\n \"selectedParentOptionValues\": [\n {\n \"name\": \"Color\",\n \"value\": \"green\"\n }\n ]\n },\n {\n \"childProductId\": \"gid://shopify/Product/555575834\",\n \"selectedParentOptionValues\": [\n {\n \"name\": \"Color\",\n \"value\": \"blue\"\n }\n ]\n }\n ]\n },\n },\n);\n\nconst data = await response.json();\n", "ruby_example": "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n mutation UpdateChildProductsOfCombinedListing($parentProductId: ID!, $productsEdited: [ChildProductRelationInput!]) {\n combinedListingUpdate(parentProductId: $parentProductId, productsEdited: $productsEdited) {\n product {\n id\n combinedListing {\n combinedListingChildren(first: 10) {\n nodes {\n product {\n id\n }\n parentVariant {\n selectedOptions {\n value\n }\n }\n }\n }\n }\n }\n userErrors {\n code\n field\n message\n }\n }\n }\nQUERY\n\nvariables = {\n \"parentProductId\": \"gid://shopify/Product/362339553\",\n \"productsEdited\": [{\"childProductId\"=>\"gid://shopify/Product/223392616\", \"selectedParentOptionValues\"=>[{\"name\"=>\"Color\", \"value\"=>\"green\"}]}, {\"childProductId\"=>\"gid://shopify/Product/555575834\", \"selectedParentOptionValues\"=>[{\"name\"=>\"Color\", \"value\"=>\"blue\"}]}]\n}\n\nresponse = client.query(query: query, variables: variables)\n", "node_example": "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation UpdateChildProductsOfCombinedListing($parentProductId: ID!, $productsEdited: [ChildProductRelationInput!]) {\n combinedListingUpdate(parentProductId: $parentProductId, productsEdited: $productsEdited) {\n product {\n id\n combinedListing {\n combinedListingChildren(first: 10) {\n nodes {\n product {\n id\n }\n parentVariant {\n selectedOptions {\n value\n }\n }\n }\n }\n }\n }\n userErrors {\n code\n field\n message\n }\n }\n }`,\n \"variables\": {\n \"parentProductId\": \"gid://shopify/Product/362339553\",\n \"productsEdited\": [\n {\n \"childProductId\": \"gid://shopify/Product/223392616\",\n \"selectedParentOptionValues\": [\n {\n \"name\": \"Color\",\n \"value\": \"green\"\n }\n ]\n },\n {\n \"childProductId\": \"gid://shopify/Product/555575834\",\n \"selectedParentOptionValues\": [\n {\n \"name\": \"Color\",\n \"value\": \"blue\"\n }\n ]\n }\n ]\n },\n },\n});\n", "php_example": "use Shopify\\Clients\\Graphql;\n\n$client = new Graphql(\"your-development-store.myshopify.com\", $accessToken);\n$query = <<<QUERY\n mutation UpdateChildProductsOfCombinedListing($parentProductId: ID!, $productsEdited: [ChildProductRelationInput!]) {\n combinedListingUpdate(parentProductId: $parentProductId, productsEdited: $productsEdited) {\n product {\n id\n combinedListing {\n combinedListingChildren(first: 10) {\n nodes {\n product {\n id\n }\n parentVariant {\n selectedOptions {\n value\n }\n }\n }\n }\n }\n }\n userErrors {\n code\n field\n message\n }\n }\n }\nQUERY;\n\n$variables = [\n \"parentProductId\" => \"gid://shopify/Product/362339553\",\n \"productsEdited\" => [{\"childProductId\"=>\"gid://shopify/Product/223392616\", \"selectedParentOptionValues\"=>[{\"name\"=>\"Color\", \"value\"=>\"green\"}]}, {\"childProductId\"=>\"gid://shopify/Product/555575834\", \"selectedParentOptionValues\"=>[{\"name\"=>\"Color\", \"value\"=>\"blue\"}]}],\n];\n\n$response = $client->query([\"query\" => $query, \"variables\" => $variables]);\n" }, "titleStringKey": "variables", "inputVariableEntries": [ { "arg": { "name": "parentProductId", "description": "The ID of the parent product.", "type": { "kind": "SCALAR", "name": "ID", "list": false, "non_null": true }, "defaultValue": null, "typeSignature": "ID!", "isDeprecated": false, "deprecationReason": null, "kind": "ARGUMENT" }, "key": "parentProductId", "argValue": " \"gid://shopify/Product/362339553\"", "typeKind": "MUTATION" }, { "arg": { "name": "productsEdited", "description": "The child products to edit and their assigned options and option values.", "type": { "kind": "INPUT_OBJECT", "name": "ChildProductRelationInput", "list": true, "non_null": false }, "defaultValue": null, "typeSignature": "[ChildProductRelationInput!]", "isDeprecated": false, "deprecationReason": null, "kind": "ARGUMENT" }, "key": "productsEdited", "argValue": " [{\"childProductId\":\"gid://shopify/Product/223392616\",\"selectedParentOptionValues\":[{\"name\":\"Color\",\"value\":\"green\"}]},{\"childProductId\":\"gid://shopify/Product/555575834\",\"selectedParentOptionValues\":[{\"name\":\"Color\",\"value\":\"blue\"}]}]", "typeKind": "MUTATION" } ] } ]