【发布时间】:2019-05-06 00:25:56
【问题描述】:
我正在关注this guide 学习带有Ruby后端的GraphQL,在“查询返回链接”部分,有以下代码:
# defines a new GraphQL type
Types::LinkType = GraphQL::ObjectType.define do
# this type is named `Link`
name 'Link'
# it has the following fields
field :id, !types.ID
field :url, !types.String
field :description, !types.String
end
我知道感叹号只是一个“非”运算符,但有人可以在这里解释一下它的用途吗?
【问题讨论】:
标签: ruby-on-rails ruby graphql