[GraphQL] Set variable and default value & alias
Posted answer1215
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[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
以上是关于[GraphQL] Set variable and default value & alias的主要内容,如果未能解决你的问题,请参考以下文章
[GraphQL] Create an Input Object Type for Complex Mutations
Postman测试Graphql 接口测试与报错:Must provide an operation