[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
    }
  }
}

posted @ 2019-08-16 22:08  Zhentiw  阅读(214)  评论(0)    收藏  举报