Class: GraphQL::Query::BaseExecution::ValueResolution::BaseResolution

Inherits:
Object
  • Object
show all
Defined in:
lib/graphql/query/base_execution/value_resolution.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value, field_type, target, parent_type, ast_field, query, execution_strategy) ⇒ BaseResolution

Returns a new instance of BaseResolution.



12
13
14
15
16
17
18
19
20
# File 'lib/graphql/query/base_execution/value_resolution.rb', line 12

def initialize(value, field_type, target, parent_type, ast_field, query, execution_strategy)
  @value = value
  @field_type = field_type
  @target = target
  @parent_type = parent_type
  @ast_field = ast_field
  @query = query
  @execution_strategy = execution_strategy
end

Instance Attribute Details

#ast_fieldObject (readonly)

Returns the value of attribute ast_field.



10
11
12
# File 'lib/graphql/query/base_execution/value_resolution.rb', line 10

def ast_field
  @ast_field
end

#execution_strategyObject (readonly)

Returns the value of attribute execution_strategy.



10
11
12
# File 'lib/graphql/query/base_execution/value_resolution.rb', line 10

def execution_strategy
  @execution_strategy
end

#field_typeObject (readonly)

Returns the value of attribute field_type.



10
11
12
# File 'lib/graphql/query/base_execution/value_resolution.rb', line 10

def field_type
  @field_type
end

#parent_typeObject (readonly)

Returns the value of attribute parent_type.



10
11
12
# File 'lib/graphql/query/base_execution/value_resolution.rb', line 10

def parent_type
  @parent_type
end

#queryObject (readonly)

Returns the value of attribute query.



10
11
12
# File 'lib/graphql/query/base_execution/value_resolution.rb', line 10

def query
  @query
end

#targetObject (readonly)

Returns the value of attribute target.



10
11
12
# File 'lib/graphql/query/base_execution/value_resolution.rb', line 10

def target
  @target
end

#valueObject (readonly)

Returns the value of attribute value.



10
11
12
# File 'lib/graphql/query/base_execution/value_resolution.rb', line 10

def value
  @value
end

Instance Method Details

#get_strategy_for_kind(*args) ⇒ Object



26
27
28
# File 'lib/graphql/query/base_execution/value_resolution.rb', line 26

def get_strategy_for_kind(*args)
  GraphQL::Query::BaseExecution::ValueResolution.get_strategy_for_kind(*args)
end

#resultObject

Raises:

  • (NotImplementedError)


22
23
24
# File 'lib/graphql/query/base_execution/value_resolution.rb', line 22

def result
  raise NotImplementedError, "Should return a value based on initialization params"
end