--- title: CollectionConnection - Storefront API description: | An auto-generated type for paginating through multiple Collections. api_version: 2026-01 api_name: storefront type: connection api_type: graphql source_url: html: https://shopify.dev/docs/api/storefront/latest/connections/CollectionConnection md: https://shopify.dev/docs/api/storefront/latest/connections/CollectionConnection.md --- # Collection​Connection connection An auto-generated type for paginating through multiple Collections. ## Fields with this connection * [Product.collections](https://shopify.dev/docs/api/storefront/latest/objects/Product#field-Product.fields.collections) OBJECT Represents an item listed in a shop's catalog. Products support multiple [product variants](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant), representing different versions of the same product, and can include various [media](https://shopify.dev/docs/api/storefront/current/interfaces/Media) types. Use the [`selectedOrFirstAvailableVariant`](https://shopify.dev/docs/api/storefront/current/objects/Product#field-Product.fields.selectedOrFirstAvailableVariant) or [`variantBySelectedOptions`](https://shopify.dev/docs/api/storefront/current/objects/Product#field-Product.fields.variantBySelectedOptions) fields to help customers find the right variant based on their selections. Products can be organized into [collections](https://shopify.dev/docs/api/storefront/current/objects/Collection), associated with [selling plans](https://shopify.dev/docs/api/storefront/current/objects/SellingPlanGroup) for subscriptions, and extended with custom data through [metafields](https://shopify.dev/docs/api/storefront/current/objects/Metafield). Learn more about working with [products and collections](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/products-collections). *** ## Queries with this connection * [collections](https://shopify.dev/docs/api/storefront/latest/queries/collections) query Returns a paginated list of the shop's [collections](https://shopify.dev/docs/api/storefront/2026-01/objects/Collection). Each `Collection` object includes a nested connection to its [products](https://shopify.dev/docs/api/storefront/2026-01/objects/Collection#field-Collection.fields.products). * first [Int](https://shopify.dev/docs/api/storefront/latest/scalars/Int) ### Arguments Returns up to the first `n` elements from the list. * after [String](https://shopify.dev/docs/api/storefront/latest/scalars/String) Returns the elements that come after the specified cursor. * last [Int](https://shopify.dev/docs/api/storefront/latest/scalars/Int) Returns up to the last `n` elements from the list. * before [String](https://shopify.dev/docs/api/storefront/latest/scalars/String) Returns the elements that come before the specified cursor. * reverse [Boolean](https://shopify.dev/docs/api/storefront/latest/scalars/Boolean) Default:false Reverse the order of the underlying list. * sort​Key [Collection​Sort​Keys](https://shopify.dev/docs/api/storefront/latest/enums/CollectionSortKeys) Default:ID Sort the underlying list by the given key. * query [String](https://shopify.dev/docs/api/storefront/latest/scalars/String) Apply one or multiple filters to the query. Refer to the detailed [search syntax](https://shopify.dev/api/usage/search-syntax) for more information about using filters. * collection\_type * title * updated\_at *** *** ## Possible returns * edges [\[Collection​Edge!\]!](https://shopify.dev/docs/api/storefront/latest/objects/CollectionEdge) non-null A list of edges. * nodes [\[Collection!\]!](https://shopify.dev/docs/api/storefront/latest/objects/Collection) non-null A list of the nodes contained in CollectionEdge. * page​Info [Page​Info!](https://shopify.dev/docs/api/storefront/latest/objects/PageInfo) non-null Information to aid in pagination. * total​Count [Unsigned​Int64!](https://shopify.dev/docs/api/storefront/latest/scalars/UnsignedInt64) non-null The total count of Collections. *** ## Map ### Fields with this connection * [Product.collections](https://shopify.dev/docs/api/storefront/latest/objects/Product#field-Product.fields.collections) ### Queries with this connection * [collections](https://shopify.dev/docs/api/storefront/latest/queries/collections) ### Possible returns * [Collection​Connection.edges](https://shopify.dev/docs/api/storefront/latest/connections/CollectionConnection#returns-edges) * [Collection​Connection.nodes](https://shopify.dev/docs/api/storefront/latest/connections/CollectionConnection#returns-nodes) * [Collection​Connection.pageInfo](https://shopify.dev/docs/api/storefront/latest/connections/CollectionConnection#returns-pageInfo) * [Collection​Connection.totalCount](https://shopify.dev/docs/api/storefront/latest/connections/CollectionConnection#returns-totalCount)