Skip to Content
StoreOSv0.27.1
Core GraphQL APIReferenceQueries

Inventory__collections

Only collections 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__collections(where: CommonPaginationDto): CollectionsWithPagination!

Only collections 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__collections
meta?
nodes?
Example Request
query Inventory__collections {  inventory__collections {    meta {      currentPage      hasNextPage      totalCount      totalPages    }    nodes {      _id      children {        _id        createdAt        description        isDemo        level        name        parentCategory        slug      }      commits {        action        committedAt        note      }      createdAt      description      isDemo      level      name      parentCategory      slug    }  }}
Example Response
{  "data": {    "inventory__collections": {      "meta": {        "currentPage": 10.5,        "hasNextPage": true,        "totalCount": 10.5,        "totalPages": 10.5      },      "nodes": [        {          "_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"        }      ]    }  }}