Class: GraphQL::Types::Relay::BaseField

Inherits:
Schema::Field show all
Defined in:
lib/graphql/types/relay/base_field.rb

Constant Summary

Constants included from Schema::FindInheritedValue::EmptyObjects

Schema::FindInheritedValue::EmptyObjects::EMPTY_ARRAY, Schema::FindInheritedValue::EmptyObjects::EMPTY_HASH

Instance Attribute Summary

Attributes inherited from Schema::Field

#deprecation_reason, #description, #max_page_size, #method_str, #method_sym, #name, #original_name, #owner, #relay_node_field, #resolver_method, #subscription_scope, #trace, #type

Instance Method Summary collapse

Methods inherited from Schema::Field

#accessible?, #authorized?, #complexity, #connection?, connection_extension, #extension, #extensions, #extras, #fetch_extra, from_options, #method_conflict_warning?, #resolve, #resolve_field, #resolve_field_method, #resolver, #scoped?, #visible?

Methods included from Schema::Member::HasPath

#path

Methods included from Schema::Member::HasAstNode

#ast_node

Methods included from Schema::Member::HasArguments

#add_argument, #argument, #argument_class, #arguments, #own_arguments

Methods included from Schema::Member::CachedGraphQLDefinition

#graphql_definition, #initialize_copy, #type_class

Constructor Details

#initialize(edge_class: nil, **rest, &block) ⇒ BaseField

Returns a new instance of BaseField.



7
8
9
10
# File 'lib/graphql/types/relay/base_field.rb', line 7

def initialize(edge_class: nil, **rest, &block)
  @edge_class = edge_class
  super(**rest, &block)
end

Instance Method Details

#to_graphqlObject



12
13
14
15
16
17
18
# File 'lib/graphql/types/relay/base_field.rb', line 12

def to_graphql
  field = super
  if @edge_class
    field.edge_class = @edge_class
  end
  field
end