query listInvoice @auth(level: USER) {
  invoices {
    id
    invoiceNumber
    amount
    status
    issueDate
    dueDate
    disputedItems
    isAutoGenerated
  }
}

query getInvoiceById(
  $id: UUID!
) @auth(level: USER) {
  invoice(id: $id) {
    id
    invoiceNumber
    amount
    status
    issueDate
    dueDate
    disputedItems
    isAutoGenerated
  }
}

query filterInvoices(
  $invoiceNumber: String,
  $status: InvoiceStatus,
  $isAutoGenerated: Boolean,
  $amount: Float
) @auth(level: USER) {
  invoices(
    where: {
      invoiceNumber: { eq: $invoiceNumber }
      status: { eq: $status }
      isAutoGenerated: { eq: $isAutoGenerated }
      amount: { eq: $amount }
    }
  ) {
    id
    invoiceNumber
    amount
    status
    issueDate
    dueDate
    isAutoGenerated
  }
}
