type Tag {
  id: ID!
  name: String!
  "Value that does not appear in the UI but overrides name for sorting"
  sort_name: String
  description: String
  aliases: [String!]!
  ignore_auto_tag: Boolean!
  created_at: Time!
  updated_at: Time!
  favorite: Boolean!
  stash_ids: [StashID!]!
  image_path: String # Resolver
  scene_count(depth: Int): Int! # Resolver
  scene_marker_count(depth: Int): Int! # Resolver
  image_count(depth: Int): Int! # Resolver
  gallery_count(depth: Int): Int! # Resolver
  performer_count(depth: Int): Int! # Resolver
  studio_count(depth: Int): Int! # Resolver
  group_count(depth: Int): Int! # Resolver
  movie_count(depth: Int): Int! @deprecated(reason: "use group_count instead") # Resolver
  parents: [Tag!]!
  children: [Tag!]!

  parent_count: Int! # Resolver
  child_count: Int! # Resolver
  custom_fields: Map!
}

input TagCreateInput {
  name: String!
  "Value that does not appear in the UI but overrides name for sorting"
  sort_name: String
  description: String
  "Duplicate aliases and those equal to name will be ignored (case-insensitive)"
  aliases: [String!]
  ignore_auto_tag: Boolean
  favorite: Boolean
  "This should be a URL or a base64 encoded data URL"
  image: String
  stash_ids: [StashIDInput!]

  parent_ids: [ID!]
  child_ids: [ID!]

  custom_fields: Map
}

input TagUpdateInput {
  id: ID!
  name: String
  "Value that does not appear in the UI but overrides name for sorting"
  sort_name: String
  description: String
  "Duplicate aliases and those equal to name will be ignored (case-insensitive)"
  aliases: [String!]
  ignore_auto_tag: Boolean
  favorite: Boolean
  "This should be a URL or a base64 encoded data URL"
  image: String
  stash_ids: [StashIDInput!]

  parent_ids: [ID!]
  child_ids: [ID!]

  custom_fields: CustomFieldsInput
}

input TagDestroyInput {
  id: ID!
}

type FindTagsResultType {
  count: Int!
  tags: [Tag!]!
}

input TagsMergeInput {
  source: [ID!]!
  destination: ID!
  # values defined here will override values in the destination
  values: TagUpdateInput
}

input BulkTagUpdateInput {
  ids: [ID!]
  description: String
  "Duplicate aliases and those equal to name will result in an error (case-insensitive)"
  aliases: BulkUpdateStrings
  ignore_auto_tag: Boolean
  favorite: Boolean

  parent_ids: BulkUpdateIds
  child_ids: BulkUpdateIds
}
