"Product configuration data"
type ProductConfiguration {
  "The Product ID"
  productId: ID!

  "The ProductVariant ID"
  productVariantId: ID!
}

"A bulk write error type"
type WriteError {
  "The documentId(_id) on which the error occurred"
  documentId: Int

  "Error message for a documentId"
  errorMsg: String
}

"Input for adding tags to products in bulk"
input ProductTagsOperationInput {
  "An optional string identifying the mutation call, which will be returned in the response payload"
  clientMutationId: String

  "An array of product productIds to which an array of tags will be added"
  productIds: [ID]

  "The shop id"
  shopId: ID!

  "An array of tag ids to add to an array of products"
  tagIds: [ID]
}

"Response payload managing tags on products"
type ProductTagsOperationPayload  {
  "The same string you sent with the mutation params, for matching mutation calls with their responses"
  clientMutationId: String

  "The number of products found"
  foundCount: Int

  "The number of products for which a match was not found"
  notFoundCount: Int

  "The number of products successfully updated"
  updatedCount: Int

  "An array of write errors if any were generated"
  writeErrors: [WriteError]
}

extend type Mutation {
  "Bulk operation for adding an array of tags to an array of products"
  addTagsToProducts(
    "input which must includes an array of product ids and an array of tag ids"
    input: ProductTagsOperationInput!
  ): ProductTagsOperationPayload!

  "Bulk operation for removing an array of tags from an array of products"
  removeTagsFromProducts(
    "input which must includes an array of product ids and an array of tag ids"
    input: ProductTagsOperationInput!
  ): ProductTagsOperationPayload!
}
