记录GraphQL的简写模型

时间:2016-12-20 15:05:31

标签: graphql

如何使用GraphQL简写符号记录模型?

{ "parcelId": 123, "source": { "street": "123 Main Street", "city": "Anytown", "state": "New York" }, "destination": { "street": "456 Avenue B", "city": "Elsewhere", "state": "New Jersey" } }

假设我想为上面的类型/属性添加说明。

1 个答案:

答案 0 :(得分:2)

描述以评论的形式出现:

# Someone who uses something
type User {
  # How we refer to the user
  name: String
}

这些应该作为描述添加到从这种表示法生成的模式中。