mutation CreateInvoice(
  $invoiceNumber: String!,
  $amount: Float!,
  $status: InvoiceStatus!,
  $issueDate: Timestamp!,
  $dueDate: Timestamp!,
  $disputedItems: String,
  $isAutoGenerated: Boolean
) @auth(level: USER) {
  invoice_insert(
    data: {
      invoiceNumber: $invoiceNumber
      amount: $amount
      status: $status
      issueDate: $issueDate
      dueDate: $dueDate
      disputedItems: $disputedItems
      isAutoGenerated: $isAutoGenerated
    }
  )
}

mutation UpdateInvoice(
  $id: UUID!,
  $invoiceNumber: String,
  $amount: Float,
  $status: InvoiceStatus,
  $issueDate: Timestamp,
  $dueDate: Timestamp,
  $disputedItems: String,
  $isAutoGenerated: Boolean
) @auth(level: USER) {
  invoice_update(
    id: $id,
    data: {
      invoiceNumber: $invoiceNumber
      amount: $amount
      status: $status
      issueDate: $issueDate
      dueDate: $dueDate
      disputedItems: $disputedItems
      isAutoGenerated: $isAutoGenerated
    }
  )
}

mutation DeleteInvoice(
  $id: UUID!
) @auth(level: USER) {
  invoice_delete(id: $id)
}
