Skip to Content
StoreOSv0.27.1
Core GraphQL APIReferenceQueries

Inventory__collection

Only collection that the user has access to will be returned. Requires a signed-in staff user. Needs the `inventory__Collection` `read` permission. Send the `x-tenant` header (the gateway sets it from your API key).

QUERYinventory__collection(where: CommonFindDocumentDto!): Collection!

Only collection that the user has access to will be returned. Requires a signed-in staff user. Needs the inventory__Collection read permission. Send the x-tenant header (the gateway sets it from your API key).

Arguments

where*

Returns

  1. inventory__collection
_id*ID!
children?

Child subcollections (populated via virtual)

commits?
createdAt?DateTime

A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.

description?String
isDemo?Boolean
level?Int

Depth level in the hierarchy

logo?
name?String
parentCategory?ID

Parent collection ID for subcollection hierarchy

slug?String

URL handle used in storefront links (/collections/{slug})

sortOrder?Int

Position among sibling collections (ascending). Ties sort by name.

tenant?String
updatedAt?DateTime

A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.

Example Request
query Inventory__collection($where: CommonFindDocumentDto!) {  inventory__collection(where: $where) {    _id    children {      _id      children {        _id        createdAt        description        isDemo        level        name        parentCategory        slug      }      commits {        action        committedAt        note      }      createdAt      description      isDemo      level      name      parentCategory      slug    }    commits {      action      commitedBy {        email        name        phoneNumber        referenceId      }      committedAt      note    }    createdAt    description    isDemo    level    name    parentCategory    slug  }}
Variables
{  "where": {    "and": [      {        "and": [          {            "and": [              {                "and": [                  {}                ],                "key": "string"              }            ],            "key": "string"          }        ],        "key": "string"      }    ],    "key": "string"  }}
Example Response
{  "data": {    "inventory__collection": {      "_id": "1",      "children": [        {          "_id": "1",          "children": [            {              "_id": "1",              "createdAt": "<DateTime>",              "description": "string",              "isDemo": true,              "level": 10,              "name": "string",              "parentCategory": "1",              "slug": "string"            }          ],          "commits": [            {              "action": "string",              "committedAt": "<DateTime>",              "note": "string"            }          ],          "createdAt": "<DateTime>",          "description": "string",          "isDemo": true,          "level": 10,          "name": "string",          "parentCategory": "1",          "slug": "string"        }      ],      "commits": [        {          "action": "string",          "commitedBy": {            "email": "string",            "name": "string",            "phoneNumber": "string",            "referenceId": "1"          },          "committedAt": "<DateTime>",          "note": "string"        }      ],      "createdAt": "<DateTime>",      "description": "string",      "isDemo": true,      "level": 10,      "name": "string",      "parentCategory": "1",      "slug": "string"    }  }}