# dataconnect/connector/partner/queries.gql

query listPartner @auth(level: USER) {
  partners {
    id
    partnerName
    partnerNumber
    partnerType
  }
}

query getPartnerById(
  $id: UUID!
) @auth(level: USER) {
  partner(id: $id) {
    id
    partnerName
    partnerNumber
    partnerType
  }
}

query filterPartner(
  $partnerName: String,
  $partnerNumber: String,
  $partnerType: PartnerType
) @auth(level: USER) {
  partners(
    where: {
      partnerName: { eq: $partnerName }
      partnerNumber: { eq: $partnerNumber }
      partnerType: { eq: $partnerType }
    }
  ) {
    id
    partnerName
    partnerNumber
    partnerType
  }
}
