Collection Object
Represents a collection of products.
type Collection implements Node, ObjectWithMetadata {
id: ID!
privateMetadata: [MetadataItem!]!
privateMetafield(
key: String!
): String
privateMetafields(
keys: [String!]
): Metadata
metadata: [MetadataItem!]!
metafield(
key: String!
): String
metafields(
keys: [String!]
): Metadata
seoTitle: String
seoDescription: String
name: String!
description: JSONString
slug: String!
channel: String
descriptionJson: JSONString @deprecated
products(
filter: ProductFilterInput
where: ProductWhereInput
search: String
sortBy: ProductOrder
before: String
after: String
first: Int
last: Int
): ProductCountableConnection
backgroundImage(
size: Int
format: ThumbnailFormatEnum = ORIGINAL
): Image
translation(
languageCode: LanguageCodeEnum!
): CollectionTranslation
channelListings: [CollectionChannelListing!]
}
Fields
id ● ID!
The ID of the collection.
privateMetadata ● [MetadataItem!]!
List of private metadata items. Requires staff permissions to access.
privateMetafield ● String
A single key from private metadata. Requires staff permissions to access.
Tip: Use GraphQL aliases to fetch multiple keys.
key ● String!
privateMetafields ● Metadata
Private metadata. Requires staff permissions to access. Use keys to control which fields you want to include. The default is to include everything.
keys ● [String!]
metadata ● [MetadataItem!]!
List of public metadata items. Can be accessed without permissions.
metafield ● String
A single key from public metadata.
Tip: Use GraphQL aliases to fetch multiple keys.
key ● String!
metafields ● Metadata
Public metadata. Use keys to control which fields you want to include. The default is to include everything.
keys ● [String!]
seoTitle ● String
SEO title of the collection.
seoDescription ● String
SEO description of the collection.
name ● String!
Name of the collection.
description ● JSONString
Description of the collection.
Rich text format. For reference see https://editorjs.io/
slug ● String!
Slug of the collection.
channel ● String
Channel given to retrieve this collection. Also used by federation gateway to resolve this object in a federated query.
products ● ProductCountableConnection
List of products in this collection.
filter ● ProductFilterInput
Use where filter instead.
Filtering options for products.
where ● ProductWhereInput
Where filtering options for products.
search ● String
Search products.
sortBy ● ProductOrder
Sort products.
before ● String
Return the elements in the list that come before the specified cursor.
after ● String
Return the elements in the list that come after the specified cursor.
first ● Int
Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
last ● Int
Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
backgroundImage ● Image
Background image of the collection.
size ● Int
Desired longest side the image in pixels. Defaults to 4096. Images are never cropped. Pass 0 to retrieve the original size (not recommended).
format ● ThumbnailFormatEnum
The format of the image. When not provided, format of the original image will be used.
translation ● CollectionTranslation
Returns translated collection fields for the given language code.
languageCode ● LanguageCodeEnum!
A language code to return the translation for collection.
channelListings ● [CollectionChannelListing!]
List of channels in which the collection is available.
Show deprecated
Interfaces
Node
An object with an ID
ObjectWithMetadata
Returned By
collection query
Member Of
AssignedMultiCollectionReferenceAttribute object ● AssignedSingleCollectionReferenceAttribute object ● CollectionAddProducts object ● CollectionChannelListingUpdate object ● CollectionCountableEdge object ● CollectionCreate object ● CollectionCreated object ● CollectionDelete object ● CollectionDeleted object ● CollectionMetadataUpdated object ● CollectionRemoveProducts object ● CollectionReorderProducts object ● CollectionTranslatableContent object ● CollectionTranslate object ● CollectionUpdate object ● CollectionUpdated object ● MenuItem object ● Product object
Implemented By
_Entity union