Skip to main content

Collection

Represents a collection of products.

type Collection implements Node, ObjectWithMetadata {
id: ID!
metadata: [MetadataItem!]!
privateMetadata: [MetadataItem!]!
name: String!
slug: String!
description: String
descriptionHtml: String
publicationDate: Date
seoTitle: String
seoDescription: String
isVisible: Boolean!
isPublished: Boolean!
type: CollectionTypeEnum
backgroundImage(
size: Int
): Image
onSale: Boolean!
customFields: [SelectedAttribute!]!
products(
filter: ProductFilterInput
sortBy: ProductOrder
before: String
after: String
first: Int
last: Int
): ProductCountableConnection!
variants(
filter: ProductVariantFilterInput
sortBy: VariantSortingInput
before: String
after: String
first: Int
last: Int
): ProductVariantCountableConnection!
sales: [Sale!]!
vouchers: [Voucher!]!
}
Show more ↓

Fields

Collection.id ● ID! non-null scalar

The Globally Unique ID of this object

Collection.metadata ● [MetadataItem!]! non-null object

List of public metadata items. Can be accessed without permissions.

Collection.privateMetadata ● [MetadataItem!]! non-null object

List of private metadata items. Requires proper staff permissions to access.

Collection.name ● String! non-null scalar

Name of the collection

Collection.slug ● String! non-null scalar

Slug identifier

Collection.description ● String scalar

Description of the collection

Collection.descriptionHtml ● String scalar

Description as HTML

Collection.publicationDate ● Date scalar

Publication date of the collection

Collection.seoTitle ● String scalar

SEO title

Collection.seoDescription ● String scalar

SEO meta description

Collection.isVisible ● Boolean! non-null scalar

Whether the collection is visible

Collection.isPublished ● Boolean! non-null scalar

Whether the collection is published

Collection.type ● CollectionTypeEnum enum

Collection type.

Collection.backgroundImage ● Image object

Background image for the collection

Collection.backgroundImage.size ● Int scalar

Collection.onSale ● Boolean! non-null scalar

Whether any product in the collection is on sale

Collection.customFields ● [SelectedAttribute!]! non-null object

List of custom fields assigned to this collection

Collection.products ● ProductCountableConnection! non-null object

List of products in this collection.

Collection.products.filter ● ProductFilterInput input
Collection.products.sortBy ● ProductOrder input
Collection.products.before ● String scalar

Returns the items in the list that come before the specified cursor.

Collection.products.after ● String scalar

Returns the items in the list that come after the specified cursor.

Collection.products.first ● Int scalar

Returns the first n items from the list.

Collection.products.last ● Int scalar

Returns the items in the list that come after the specified cursor.

Collection.variants ● ProductVariantCountableConnection! non-null object

List of variants in this collection.

Collection.variants.filter ● ProductVariantFilterInput input
Collection.variants.sortBy ● VariantSortingInput input
Collection.variants.before ● String scalar

Returns the items in the list that come before the specified cursor.

Collection.variants.after ● String scalar

Returns the items in the list that come after the specified cursor.

Collection.variants.first ● Int scalar

Returns the first n items from the list.

Collection.variants.last ● Int scalar

Returns the items in the list that come after the specified cursor.

Collection.sales ● [Sale!]! non-null object

List of sales associated with the collection.

Collection.vouchers ● [Voucher!]! non-null object

List of vouchers associated with the collection.

Interfaces

Node interface

An object with a Globally Unique ID

ObjectWithMetadata interface

An object that supports metadata.

Returned By

collection query

Member Of

CollectionAddProducts object ● CollectionAddVariants object ● CollectionCountableEdge object ● CollectionCreate object ● CollectionDelete object ● CollectionRemoveProducts object ● CollectionRemoveVariants object ● CollectionReorderProducts object ● CollectionUpdate object ● MenuItem object ● Product object

Implemented By

CustomFieldInstance union

Was this page helpful?