Skip to Content
StoreOSv0.27.1
Core GraphQL APIReferenceMutations

Inventory__reorder Collections

Saves the display order of sibling collections: pass their IDs in the new order. Use inventory__updateCollection to move a collection to another parent first. Requires a signed-in staff user. Needs the `inventory__Collection` `update` permission. Send the `x-tenant` header (the gateway sets it from your API key).

MUTATIONinventory__reorderCollections(input: ReorderCollectionsInput!): BulkCollectionsMutationResult!

Saves the display order of sibling collections: pass their IDs in the new order. Use inventory__updateCollection to move a collection to another parent first. Requires a signed-in staff user. Needs the inventory__Collection update permission. Send the x-tenant header (the gateway sets it from your API key).

Arguments

input*

Returns

  1. inventory__reorderCollections
affectedCount*Int!
requestedCount*Int!
Example Request
mutation Inventory__reorderCollections($input: ReorderCollectionsInput!) {  inventory__reorderCollections(input: $input) {    affectedCount    requestedCount  }}
Variables
{  "input": {    "ids": [      "1"    ]  }}
Example Response
{  "data": {    "inventory__reorderCollections": {      "affectedCount": 10,      "requestedCount": 10    }  }}