which provides a common interface between the client and the server for data fetching and manipulations. The client asks for various data from the GraphQL server via queries.
for this schema' field :post do type PostType description 'The post' argument :id, types.Int, 'Post id' resolve -> (obj, args, context) do Post.find args['id'] end end end Ruby Example
:title, types.String field :tagline, types.String field :votes_count, types.Int field :comments_count, types.Int field :thumbnail_url, types.String field :hunter do type -> { UserType } resolve -> (obj, args, context) do obj.user end end field :makers do type -> { types[UserType] } resolve -> (obj, args, context) do obj.makers end end end Ruby Example