queryTag

Get details about a hashtag

Interface

GraphQL Schema
type Tag {
  id: String
  name: String
  stats: TagStats
  posts: [Post]
  comments: [Comment]
  mirrors: [Mirror]
}

type TagStats {
  totalPosts: Int
  totalComments: Int
  totalMirrors: Int
}

A Tag entry provides statistics and all Publications that a single hashtags it. We provide a query operation for you to get statistics and related publications based on hashtags.

GraphQL Schema
type Query {
  tag(name: String!): Tag
}

Input field:

  • name: [Required] The name of the hashtag

Operation

GraphQL Operation
query Tag {
  tag(name: "web3") {
    id
    name
    stats {
      totalPosts
      totalComments
      totalMirrors
    }
    posts {
      id
      postId
      profileId
      # ... any other Post fields
    }
    mirrors {
      id
      mirrorId
      profileId
      # ... any other Mirror fields
    }
  }
}

Response

{
  "data": {
    "tag": {
      "id": "50",
      "name": "web3",
      "stats": {
        "totalPosts": 8,
        "totalComments": 1,
        "totalMirrors": 2
      },
      "posts": [
        {
          "id": "60",
          "postId": "0xd-0x1",
          "profileId": "0xd"
        },
        {
          "id": "58",
          "postId": "0x6-0x2",
          "profileId": "0x6"
        },
        {
          "id": "57",
          "postId": "0x2-0x2",
          "profileId": "0x2"
        },
        {
          "id": "55",
          "postId": "0xb-0x1",
          "profileId": "0xb"
        },
        {
          "id": "53",
          "postId": "0x10-0x0",
          "profileId": "0x10"
        },
        // ...
      ],
      "mirrors": [
        {
          "id": "5",
          "mirrorId": null,
          "profileId": "0x15"
        },
        {
          "id": "4",
          "mirrorId": null,
          "profileId": "0x2"
        },
        // ...
      ]
    }
  }
}

Last updated