2
私はGraphqlを初めて使用しています。シンプルなユースケースの場合は、のは、私は単純なモデルを持っているとしましょう、以下Graphqlルビのフィールドと接続の違いは?
class Post < ActiveRecord::Base
has_many :comments
end
は私のgraphql query_type.rb
PostType = GraphQL::ObjectType.define do
#field :comments, types[CommentType]
#connection :comments, CommentType.connection_type
end
私にとってはどちらもfield and connection
作品内のコードです。しかし、どちらが正しい方法です。