[GraphQL] Set variable and default value & alias

query($category:PetCategory=CAT, $status:PetStatus=AVAILABLE) {
  #availablePets is the alias
  availablePets:totalPets(status: AVAILABLE),
  #checkoutPets is the alias
  checkoutPets:totalPets(status: CHECKEDOUT),
  totalPets,
  totalCustomers,
  allPets(status: $status, category:$category) {
    category,
    name,
    weight,
    photo {
      thumb
    }
  }
}

原文地址:https://www.cnblogs.com/Answer1215/p/11366624.html