Module: GraphQL::SmartSelect

Defined in:
lib/graphql/smart_select.rb,
lib/graphql/smart_select/options.rb,
lib/graphql/smart_select/version.rb,
lib/graphql/smart_select/resolver.rb,
lib/graphql/smart_select/assosiations.rb,
lib/graphql/smart_select/connections_proxy.rb

Overview

Apply additional scope to the AR query which selects only the required fields

Defined Under Namespace

Modules: ConnectionsProxy Classes: Assosiations, Options, Resolver

Constant Summary collapse

VERSION =
'0.1.3'

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#db_columnsObject (readonly)

Returns the value of attribute db_columns.



12
13
14
# File 'lib/graphql/smart_select.rb', line 12

def db_columns
  @db_columns
end

#smart_selectObject (readonly)

Returns the value of attribute smart_select.



12
13
14
# File 'lib/graphql/smart_select.rb', line 12

def smart_select
  @smart_select
end

Instance Method Details

#initialize(*args, **kwargs, &block) ⇒ Object



14
15
16
17
18
# File 'lib/graphql/smart_select.rb', line 14

def initialize(*args, **kwargs, &block)
  @smart_select = kwargs.delete(:smart_select)
  @db_columns = kwargs.delete(:db_columns)
  super
end