Skip to main content
query

Fetch a specific Collection by one of its unique attributes.

•String

The handle of the Collection.

•ID

The ID of the Collection.


Was this section helpful?

•Collection

A collection represents a grouping of products that a shop owner can create to organize them or make their shops easier to browse.

•String!
non-null

Stripped description of the collection, single line with HTML tags removed.

Arguments

•Int

Truncates a string after the given length.


•HTML!
non-null

The description of the collection, complete with HTML formatting.

•String!
non-null

A human-friendly unique string for the collection automatically generated from its title. Limit of 255 characters.

•ID!
non-null

A globally-unique ID.

•Image

Image associated with the collection.

•Metafield

A custom field, including its namespace and key, that's associated with a Shopify resource for the purposes of adding and storing additional information.

Arguments

•String

The container the metafield belongs to. If omitted, the app-reserved namespace will be used.

•String!
required

The identifier for the metafield.


•[Metafield]!
non-null

A list of custom fields that a merchant associates with a Shopify resource.

Arguments

•[HasMetafieldsIdentifier!]!
required

The list of metafields to retrieve by namespace and key.

The input must not contain more than 250 values.


•URL

The URL used for viewing the resource on the shop's Online Store. Returns null if the resource is currently not published to the Online Store sales channel.

•ProductConnection!
non-null

List of products in the collection.

Arguments

•Int

Returns up to the first n elements from the list.

•String

Returns the elements that come after the specified cursor.

•Int

Returns up to the last n elements from the list.

•String

Returns the elements that come before the specified cursor.

•Boolean
Default:false

Reverse the order of the underlying list.

•ProductCollectionSortKeys
Default:COLLECTION_DEFAULT

Sort the underlying list by the given key.

•[ProductFilter!]

Returns a subset of products matching all product filters.

The input must not contain more than 250 values.


•SEO!
non-null

The collection's SEO information.

•String!
non-null

The collection’s name. Limit of 255 characters.

•String

URL parameters to be added to a page URL to track the origin of on-site search traffic for analytics reporting. Returns a result when accessed through the search or predictiveSearch queries, otherwise returns null.

•DateTime!
non-null

The date and time when the collection was last modified.


Was this section helpful?