Module: GraphQL::Define::AssignConnection

Defined in:
lib/graphql/define/assign_connection.rb

Class Method Summary collapse

Class Method Details

.call(type_defn, *field_args, max_page_size: nil, **field_kwargs, &field_block) ⇒ Object


5
6
7
8
9
10
# File 'lib/graphql/define/assign_connection.rb', line 5

def self.call(type_defn, *field_args, max_page_size: nil, **field_kwargs, &field_block)
  underlying_field = GraphQL::Define::AssignObjectField.call(type_defn, *field_args, **field_kwargs, &field_block)
  underlying_field.connection_max_page_size = max_page_size
  underlying_field.connection = true
  type_defn.fields[underlying_field.name] = underlying_field
end