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

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

Instance Attribute Summary

Attributes inherited from Schema::Field

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

Instance Method Summary collapse

Methods inherited from Schema::Field

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

Methods included from Schema::Member::HasPath

#path

Methods included from Schema::Member::HasArguments

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

Methods included from Schema::Member::CachedGraphQLDefinition

#graphql_definition, #initialize_copy

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