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
fullDescription: JSONString
slug: String!
externalReference: String
channel: String
descriptionJson: JSONString @deprecated(reason: "Use the `description` field instead.")
products(filter: ProductFilterInput @deprecated(reason: "Use `where` filter instead."), where: ProductWhereInput, search: String, sortBy: ProductOrder, before: String, after: String, first: Int, last: Int): ProductCountableConnection
backgroundImage(size: Int, sizeRounding: ThumbnailSizeRoundingEnum = NEAREST, format: ThumbnailFormatEnum = ORIGINAL): Image
translation(languageCode: LanguageCodeEnum!): CollectionTranslation
channelListings: [CollectionChannelListing!]
}
Interfaces
Fields
id
id · ID!
The ID of the collection.
privateMetadata
privateMetadata · [MetadataItem!]!
List of private metadata items. Requires staff permissions to access.
privateMetafield
privateMetafield · String
A single key from private metadata. Requires staff permissions to access.
Tip: Use GraphQL aliases to fetch multiple keys.
key
key · String!
privateMetafields
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
keys · [String!]
metadata
metadata · [MetadataItem!]!
List of public metadata items. Can be accessed without permissions.
metafield
metafield · String
A single key from public metadata.
Tip: Use GraphQL aliases to fetch multiple keys.
key
key · String!
metafields
metafields · Metadata
Public metadata. Use keys to control which fields you want to include. The default is to include everything.
keys
keys · [String!]
seoTitle
seoTitle · String
SEO title of the collection.
seoDescription
seoDescription · String
SEO description of the collection.
name
name · String!
Name of the collection.
description
description · JSONString
Description of the collection.
Rich text format. For reference see https://editorjs.io/
fullDescription
fullDescription · JSONString
Full description of the collection. Returns null when unset.
Rich text format. For reference see https://editorjs.io/
Added in Saleor 3.23slug
slug · String!
Slug of the collection.
externalReference
externalReference · String
External ID of this collection.
Added in Saleor 3.23channel
channel · String
Channel given to retrieve this collection. Also used by federation gateway to resolve this object in a federated query.
descriptionJson
descriptionJson · JSONString
Description of the collection.
Rich text format. For reference see https://editorjs.io/
products
products · ProductCountableConnection
List of products in this collection.
filter
filter · ProductFilterInput
Filtering options for products.
where
where · ProductWhereInput
Where filtering options for products.
search
search · String
Search products.
sortBy
sortBy · ProductOrder
Sort products.
before
before · String
Return the elements in the list that come before the specified cursor.
after
after · String
Return the elements in the list that come after the specified cursor.
first
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
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
backgroundImage · Image
Background image of the collection.
size
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). Thumbnails are generated only in the available sizes: 32, 64, 128, 256, 512, 1024, 2048, 4096; sizeRounding determines which one is used.
sizeRounding
sizeRounding · ThumbnailSizeRoundingEnum
Determines how the requested size is matched to an available thumbnail size.
Added in Saleor 3.23Default: NEAREST.
format
format · ThumbnailFormatEnum
The format of the image. When not provided, format of the original image will be used.
Default: ORIGINAL.
translation
translation · CollectionTranslation
Returns translated collection fields for the given language code.
languageCode
languageCode · LanguageCodeEnum!
A language code to return the translation for collection.
channelListings
channelListings · [CollectionChannelListing!]
List of channels in which the collection is available.
Used by
- AssignedMultiCollectionReferenceAttribute (objects)
- AssignedSingleCollectionReferenceAttribute (objects)
- MenuItem (objects)
- _Entity (unions)
- CollectionAddProducts (objects)
- CollectionChannelListingUpdate (objects)
- CollectionCountableEdge (objects)
- CollectionCreate (objects)
- CollectionCreated (objects)
- CollectionDelete (objects)
- CollectionDeleted (objects)
- CollectionMetadataUpdated (objects)
- CollectionRemoveProducts (objects)
- CollectionReorderProducts (objects)
- CollectionTranslatableContent (objects)
- CollectionTranslate (objects)
- CollectionUpdate (objects)
- CollectionUpdated (objects)
- Product (objects)
- collection (queries)
Schema: Saleor 3.23.43. Download SDL.