Storefront GraphQL APIReferenceQueries
Collection
QUERY
collection(id: String!): StorefrontCollectionArguments
id*String!Returns
- collection
_id*ID!logo?name?Stringslug?StringURL handle used in storefront links (/collections/{slug})
description?StringparentCategory?IDParent collection ID for subcollection hierarchy
level?IntDepth level in the hierarchy
sortOrder?IntPosition among sibling collections (ascending). Ties sort by name.
children?Child subcollections (populated via virtual)
tenant?StringcreatedAt?DateTimeA date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.
updatedAt?DateTimeA date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.
Example Request
query Collection($id: String!) { collection(id: $id) { _id logo { fileAssetId provider key external alt } name slug description parentCategory level sortOrder children { _id logo { fileAssetId provider key external alt } name slug description parentCategory level sortOrder children { _id name slug description parentCategory level sortOrder isDemo } isDemo } tenant }}{ "id": "string"}{ "data": { "collection": { "_id": "1", "logo": { "fileAssetId": "1", "provider": "CLOUDINARY", "key": "string", "external": "string", "alt": "string" }, "name": "string", "slug": "string", "description": "string", "parentCategory": "1", "level": 10, "sortOrder": 10, "children": [ { "_id": "1", "logo": { "fileAssetId": "1", "provider": "CLOUDINARY", "key": "string", "external": "string", "alt": "string" }, "name": "string", "slug": "string", "description": "string", "parentCategory": "1", "level": 10, "sortOrder": 10, "children": [ { "_id": "1", "name": "string", "slug": "string", "description": "string", "parentCategory": "1", "level": 10, "sortOrder": 10, "isDemo": true } ], "isDemo": true } ], "tenant": "string" } }}