younifyd
Menu

collection

Retrieves a single Collection by its ID or handle. Use the products field to access items in the collection.

Use it in a workflow

  1. Add a step and choose the Shopify Storefront connector.
  2. Pick the collection action (under Collection).
  3. Fill in the fields below, then reference the result from later steps as {{collection.response.data}}.

Query

This is the query the action sends by default. Edit it in the step's Query field to change which fields come back.

graphql
query Collection($id: ID, $handle: String) {
  collection(id: $id, handle: $handle) {
    descriptionHtml
    handle
    id
    image {
      altText
      height
      id
      originalSrc
      src
      thumbhash
      width
    }
    onlineStoreUrl
    seo {
      description
      title
    }
    title
    trackingParameters
    updatedAt
  }
}

Variables

Pass these as a JSON object in the step's Variables field.

idstring

The ID of the `Collection`.

handlestring

The handle of the `Collection`.

json
{
  "id": "string",
  "handle": "string"
}

Response

Read the result with {{collection.response.data.data.collection}}. If the API returns errors, the step fails and they are at {{collection.response.data.errors}}.

descriptionHtmlstring
handlestring
idstring
imageobject
altTextstring
heightnumber
idstring
originalSrcstring
srcstring
thumbhashstring
widthnumber
onlineStoreUrlstring
seoobject
descriptionstring
titlestring
titlestring
trackingParametersstring
updatedAtstring

Need more? See the Shopify Storefront guide for connection setup and behaviour shared by every action.