I am new to Graphql. For a simple use case, Let's say i have simple model,
class Post < ActiveRecord::Base
has_many :comments
end
Below is the code in my graphql query_type.rb
PostType = GraphQL::ObjectType.define do
#field :comments, types[CommentType]
#connection :comments, CommentType.connection_type
end
Both field and connection
works for me. But which one is the right way to go.