"Represents a single tag"
type Tag implements Node & Deletable {
  "The tag ID"
  _id: ID!

  "The date and time at which this tag was created"
  createdAt: DateTime!

  "A string of the title to be displayed on a Tag Listing Page"
  displayTitle: String

  "A list of the IDs of top products in this tag"
  featuredProductIds: [ID]

  "A string containing the hero image url for a Tag Listing Page"
  heroMediaUrl: String

  """
  If `true`, this object should be considered deleted. Soft deleted objects are not
  returned in query results unless you explicitly ask for them.
  """
  isDeleted: Boolean!

  "If `true`, this tag should be shown at the top level of the tag hierarchy"
  isTopLevel: Boolean!

  "If `true`, this tag's Tag Listing Page should be visible to the public"
  isVisible: Boolean!

  "Arbitrary additional metadata about this tag"
  metafields: [Metafield]

  "The display name for the tag. This is unique within a given shop."
  name: String!

  "The tag's position relative to other tags at the same level of the tag hierarchy"
  position: Int

  "The shop to which this tag belongs"
  shop: Shop!

  "A unique URL-safe string representing this tag for links"
  slug: String

  "A list of the IDs of tags that have this tag as their parent in the tag hierarchy, in the user-defined order"
  subTagIds: [ID]!

  "The date and time at which this tag was last updated"
  updatedAt: DateTime!
}

extend type Query {
  "Returns a tag from a provided tag ID or slug. Tags with isVisible set to false are excluded by default."
  tag(
    "Slug or ID of Tag"
    slugOrId: String!,

    "The shop to which this tag belongs"
    shopId: ID!

    "Set to true if you want to include tags that have isVisible set to false"
    shouldIncludeInvisible: Boolean = false
  ): Tag
}
