younifyd
Menu

comment

Fetch a single comment by its ID.

Use it in a workflow

  1. Add a step and choose the Shopify connector.
  2. Pick the comment action (under Comment).
  3. Fill in the fields below, then reference the result from later steps as {{comment.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 Comment($id: ID!) {
  comment(id: $id) {
    article {
      author {
        name
      }
      blog {
        commentPolicy
        createdAt
        feed
        handle
        id
        tags
        templateSuffix
        title
        updatedAt
      }
      body
      createdAt
      defaultCursor
      handle
      id
      image {
        altText
        height
        id
        originalSrc
        src
        thumbhash
        width
      }
      isPublished
      publishedAt
      summary
      tags
      templateSuffix
      title
      updatedAt
    }
    author {
      email
      name
    }
    body
    bodyHtml
    createdAt
    id
    ip
    isPublished
    publishedAt
    status
    updatedAt
    userAgent
  }
}

Variables

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

idstringrequired

The ID of the `Comment` to return.

json
{
  "id": "string"
}

Response

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

articleobject
authorobject1 fields
blogobject9 fields
bodystring
createdAtstring
defaultCursorstring
handlestring
idstring
imageobject7 fields
isPublishedboolean
publishedAtstring
summarystring
tagsarray<object>
templateSuffixstring
titlestring
updatedAtstring
authorobject
emailstring
namestring
bodystring
bodyHtmlstring
createdAtstring
idstring
ipstring
isPublishedboolean
publishedAtstring
statusstring

One ofSPAMREMOVEDPUBLISHEDUNAPPROVEDPENDING

updatedAtstring
userAgentstring

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

comment — Shopify — Documentation