如何使用GraphQL简写符号记录模型?
{
"parcelId": 123,
"source": {
"street": "123 Main Street",
"city": "Anytown",
"state": "New York"
},
"destination": {
"street": "456 Avenue B",
"city": "Elsewhere",
"state": "New Jersey"
}
}
假设我想为上面的类型/属性添加说明。
答案 0 :(得分:2)
描述以评论的形式出现:
# Someone who uses something
type User {
# How we refer to the user
name: String
}
这些应该作为描述添加到从这种表示法生成的模式中。