Skip to Content
StoreOSv0.27.1
Core GraphQL APIReferenceMutations

Inventory__detach Collection From Products

Removes one collection from products, leaving their other collections intact. Requires a signed-in staff user. Needs the `inventory__Product` `update` permission. Send the `x-tenant` header (the gateway sets it from your API key).

MUTATIONinventory__detachCollectionFromProducts(input: DetachCollectionFromProductsInput!): BulkProductsMutationResult!

Removes one collection from products, leaving their other collections intact. Requires a signed-in staff user. Needs the inventory__Product update permission. Send the x-tenant header (the gateway sets it from your API key).

Arguments

input*

Returns

  1. inventory__detachCollectionFromProducts
affectedCount*Int!
requestedCount*Int!
Example Request
mutation Inventory__detachCollectionFromProducts($input: DetachCollectionFromProductsInput!) {  inventory__detachCollectionFromProducts(input: $input) {    affectedCount    requestedCount  }}
Variables
{  "input": {    "collectionId": "1"  }}
Example Response
{  "data": {    "inventory__detachCollectionFromProducts": {      "affectedCount": 10,      "requestedCount": 10    }  }}